GoldLine.lua 638 B

12345678910111213141516
  1. GoldLine = {}
  2. function GoldLine.GetGoldMapInfo(actor, mapCfgId)
  3. local mapLineConfig = ConfigDataManager.getTableValue("cfg_map_line", "mapline", "id", mapCfgId)
  4. if string.isNullOrEmpty(mapLineConfig) then
  5. return
  6. end
  7. local lineMap = string.toStringStringMap(mapLineConfig, "#", "|")
  8. local result = {}
  9. for _, line in pairs(lineMap) do
  10. local playerCount = getmapplayercount(actor, mapCfgId, line)
  11. local mapItem = { mapCfgId = mapCfgId, line = line, playerCount = playerCount }
  12. table.insert(result, mapItem)
  13. end
  14. sendluamsg(actor, LuaMessageIdToClient.RES_MAP_INFO, result)
  15. end