|
|
@@ -14,7 +14,6 @@ local AnotherWorldBattleConfig = require("excel.anotherWorldBattle")
|
|
|
local wDay
|
|
|
|
|
|
|
|
|
-
|
|
|
local function updateWDay()
|
|
|
wDay = Util.getWeekDay()
|
|
|
end
|
|
|
@@ -91,9 +90,12 @@ local function newRoundHandle()
|
|
|
-- 更新活动开始时间
|
|
|
local now = os.time()
|
|
|
AnotherWorldBattleDB.UpdateLastRoundStartTime(now)
|
|
|
+
|
|
|
+ -- 通知所有普通服, 新一轮活动开启了
|
|
|
+ ActOpen(now)
|
|
|
end
|
|
|
|
|
|
--- 能否进入新一轮的报名阶段
|
|
|
+-- 进入新一轮报名阶段检测
|
|
|
local function joinStageCheck()
|
|
|
local stage = AnotherWorldBattleDB.GetStage()
|
|
|
|
|
|
@@ -202,6 +204,7 @@ local function grouping()
|
|
|
|
|
|
AnotherWorldBattleDB.UpdateGroupArray(newGroupArray)
|
|
|
end
|
|
|
+
|
|
|
-- 给各个分组中的公会随机分配出生点
|
|
|
local function randomBaseCity()
|
|
|
local baseCityIdArr = {}
|
|
|
@@ -281,7 +284,7 @@ local function genUnionOccupyInfo(unionId, union, playerListData)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
- -- 防止本次没有正常发放奖励,后续补发时, 结束时间异常的情况
|
|
|
+ -- 防止本次没有正常发放奖励, 后续补发时, 结束时间异常的情况
|
|
|
union.baseCityEndTime = now
|
|
|
AnotherWorldBattleDB.UpdateUnionData(unionId, union)
|
|
|
|
|
|
@@ -312,14 +315,14 @@ end
|
|
|
-- 检测活动各阶段状态及相关处理
|
|
|
local function timedStageHandle()
|
|
|
-- 处于报名阶段
|
|
|
- -- if table.find(AnotherWorldBattleDefine.AB_JOIN_WDAY_AREA, wDay) then
|
|
|
- -- joinStageCheck()
|
|
|
- -- end
|
|
|
-
|
|
|
- if wDay == AnotherWorldBattleDefine.AB_JOIN_WDAY then
|
|
|
+ if table.find(AnotherWorldBattleDefine.AB_JOIN_WDAY_AREA, wDay) then
|
|
|
joinStageCheck()
|
|
|
end
|
|
|
|
|
|
+ -- if wDay == AnotherWorldBattleDefine.AB_JOIN_WDAY then
|
|
|
+ -- joinStageCheck()
|
|
|
+ -- end
|
|
|
+
|
|
|
local now = os.time()
|
|
|
|
|
|
-- 报名阶段 -> 战斗阶段
|
|
|
@@ -411,16 +414,26 @@ local function pointLose(sourceServerId, playerUuid, loseCityId, losePointIdx)
|
|
|
InnerMsg.sendMsg(fd, msgData)
|
|
|
end
|
|
|
|
|
|
+-- 通知所有普通服, 活动开启
|
|
|
+function ActOpen(ti)
|
|
|
+ local msgData = InnerMsg.wl.WL_ANOTHERWORLDBATTLE_ACT_START
|
|
|
+ msgData.startTime = ti or os.time()
|
|
|
+
|
|
|
+ local fdList = MiddleManager.MiddleManager_GetAllFD()
|
|
|
+ for _, fd in pairs(fdList) do
|
|
|
+ InnerMsg.sendMsg(fd, msgData)
|
|
|
+ end
|
|
|
+end
|
|
|
|
|
|
------------------------------------N2C---------------------------------------------------
|
|
|
|
|
|
--- 获取自己公会的组Id
|
|
|
+-- 获取自己公会所在分组的Id
|
|
|
local function getMyUnionGourpId(myUnionId)
|
|
|
local groupId = AnotherWorldBattleDB.GetUnionGroupId(myUnionId)
|
|
|
return groupId
|
|
|
end
|
|
|
|
|
|
--- 获取自己公会/所在区服第一公会的组Id
|
|
|
+-- 获取自己公会/所在区服第一公会所在分组Id
|
|
|
local function getGroupId(myUnionId, myServerId)
|
|
|
local groupId = getMyUnionGourpId(myUnionId)
|
|
|
if not groupId then
|
|
|
@@ -476,7 +489,7 @@ local function calcOccupyCityNum(occupCityList, cityLv)
|
|
|
return num
|
|
|
end
|
|
|
|
|
|
--- 统计公会占领的据点所属城池数组
|
|
|
+-- 统计公会占领的据点所属城池Id数组
|
|
|
local function calcOccupyPointArr(occupCityList)
|
|
|
local pointInfoArr = {}
|
|
|
|
|
|
@@ -548,7 +561,6 @@ local function calcPlayerOccupyPointNum(playerUuid)
|
|
|
return playerOccupyPonitNum
|
|
|
end
|
|
|
|
|
|
-
|
|
|
-- 检查某个据点是否能被玩家挑战
|
|
|
local function isCanChallengePoint(targetCityId, targetPointIdx, myUnionId, playerUuid)
|
|
|
-- 活动未开启
|
|
|
@@ -577,7 +589,7 @@ local function isCanChallengePoint(targetCityId, targetPointIdx, myUnionId, play
|
|
|
return 2
|
|
|
end
|
|
|
|
|
|
- -- 据点已被本公会占领
|
|
|
+ -- 城池已被本公会占领
|
|
|
if tagetCityData.occupyUnion and tagetCityData.occupyUnion == myUnionId then
|
|
|
return -4
|
|
|
end
|
|
|
@@ -639,7 +651,7 @@ end
|
|
|
local function getPlayerChallengeTimesInfo(playerUuid)
|
|
|
local playerData = AnotherWorldBattleDB.GetPlayerData(playerUuid)
|
|
|
if not playerData then
|
|
|
- return AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_TIMES, 0
|
|
|
+ return AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_INIT_TIMES, 0
|
|
|
end
|
|
|
|
|
|
local now = os.time()
|
|
|
@@ -647,10 +659,10 @@ local function getPlayerChallengeTimesInfo(playerUuid)
|
|
|
|
|
|
if subSex >= AnotherWorldBattleDefine.AB_PLAYER_CHALLENGETIMES_SEC then
|
|
|
local addTimes = math.floor(subSex / AnotherWorldBattleDefine.AB_PLAYER_CHALLENGETIMES_SEC)
|
|
|
- playerData.challengeTimes = math.min(playerData.challengeTimes + addTimes, AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_TIMES)
|
|
|
+ playerData.challengeTimes = math.min(playerData.challengeTimes + addTimes, AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_MAX_TIMES)
|
|
|
playerData.lastTime = playerData.lastTime + addTimes* AnotherWorldBattleDefine.AB_PLAYER_CHALLENGETIMES_SEC
|
|
|
|
|
|
- if playerData.challengeTimes == AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_TIMES then
|
|
|
+ if playerData.challengeTimes == AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_MAX_TIMES then
|
|
|
playerData.lastTime = 0
|
|
|
end
|
|
|
|
|
|
@@ -685,6 +697,30 @@ local function getCityState(cityData)
|
|
|
return state
|
|
|
end
|
|
|
|
|
|
+-- 获取公会占领据点的数据
|
|
|
+local function getOccupPointData(unionId)
|
|
|
+ local t2 = {}
|
|
|
+
|
|
|
+ local unionData = AnotherWorldBattleDB.GetUnionData(unionId)
|
|
|
+ if not unionData then
|
|
|
+ return t2
|
|
|
+ end
|
|
|
+
|
|
|
+ for cityId, cityIno in pairs(unionData.occupCityList or {}) do
|
|
|
+ for _, pointInfo in pairs(cityIno.occupyPointList) do
|
|
|
+ t2[#t2+1] = {cityId, pointInfo.occupyTimeArr}
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 出生点算5个据点
|
|
|
+ local baseCiyuTimeArr = { {unionData.baseCityStartTime, unionData.baseCityEndTime or now } }
|
|
|
+ for i=1, AnotherWorldBattleDefine.AB_POINT_MAX_NUM do
|
|
|
+ t2[#t2+1] = {unionData.baseCityId, baseCiyuTimeArr}
|
|
|
+ end
|
|
|
+
|
|
|
+ return t2
|
|
|
+end
|
|
|
+
|
|
|
|
|
|
-- 查询状态
|
|
|
function N2C_Get_State(msg)
|
|
|
@@ -814,6 +850,7 @@ function N2C_AllCity_Query(msg)
|
|
|
local challengeTimes, leftTime = getPlayerChallengeTimesInfo(msg.playerUuid)
|
|
|
msgData.challengeTimes = challengeTimes
|
|
|
msgData.lastTime = leftTime
|
|
|
+ msgData.occupyPointData = getOccupPointData(myUnionId)
|
|
|
|
|
|
InnerMsg.sendMsg(fd, msgData)
|
|
|
end
|
|
|
@@ -1295,7 +1332,7 @@ local function challenge_Win(msg)
|
|
|
local pointWeight = AnotherWorldBattleConfig.city[targetCityId].pointWeight
|
|
|
|
|
|
|
|
|
- -- 如果城池之前被占领了, 则重置占领城池的公会Id
|
|
|
+ -- 如果城池之前被占领了, 则删除占领城池的公会Id
|
|
|
if cityData.occupyUnion then
|
|
|
cityData.occupyUnion = nil
|
|
|
end
|
|
|
@@ -1305,32 +1342,38 @@ local function challenge_Win(msg)
|
|
|
-- 更新防守方公会数据
|
|
|
local defUnionData = AnotherWorldBattleDB.GetUnionData(pointData.unionId)
|
|
|
local defOccupCityList = defUnionData.occupCityList
|
|
|
+ local defTargerCityData = defOccupCityList[targetCityId]
|
|
|
+
|
|
|
+ -- 更新防守方公会对该据点的占领状态和最后占领时间
|
|
|
+ if defTargerCityData and defTargerCityData.occupyPointList and defTargerCityData.occupyPointList[targetPointIdx] then
|
|
|
+ local defTargetPointData = defTargerCityData.occupyPointList[targetPointIdx]
|
|
|
+ if defTargetPointData then
|
|
|
+ -- 删除占领该据点的玩家uuid
|
|
|
+ defTargetPointData.playerUuid = nil
|
|
|
+
|
|
|
+ -- 更新对该据点最后占领时间段的结束时间
|
|
|
+ if defTargetPointData.occupyTimeArr then
|
|
|
+ local lastOccupyTimeTb = defTargetPointData.occupyTimeArr[#defTargetPointData.occupyTimeArr]
|
|
|
+ lastOccupyTimeTb[2] = now
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
|
|
|
- -- 防守方之前占领了城池
|
|
|
- if defOccupCityList[targetCityId].isOccupy then
|
|
|
-
|
|
|
- -- 修改防守方的占领状态
|
|
|
- defOccupCityList[targetCityId].isOccupy = false
|
|
|
-
|
|
|
- -- 更新防守方对该城池的最后占领时间
|
|
|
- local defOccupyPointList = defOccupCityList[targetCityId].occupyPointList
|
|
|
- local defPointInfo = defOccupyPointList[targetPointIdx]
|
|
|
- local defOccupyTimeArr = defPointInfo.occupyTimeArr
|
|
|
- defOccupyTimeArr[#defOccupyTimeArr][2] = now
|
|
|
-
|
|
|
- -- 删除防守方的该据点的占领者
|
|
|
- defPointInfo.playerUuid = nil
|
|
|
+ -- 删除防守方玩家的防守阵容数据
|
|
|
+ local defPlayData = AnotherWorldBattleDB.GetPlayerData(pointData.playerUuid)
|
|
|
+ if defPlayData then
|
|
|
+ defPlayData.heroList[targetCityId][targetPointIdx] = nil
|
|
|
+ AnotherWorldBattleDB.UpdatePlayerData(pointData.playerUuid, defPlayData)
|
|
|
+ end
|
|
|
|
|
|
- -- 删除防守方玩家的防守阵容数据
|
|
|
- local defPlayData = AnotherWorldBattleDB.GetPlayerData(pointData.playerUuid)
|
|
|
- if defPlayData then
|
|
|
- defPlayData.heroList[targetCityId][targetPointIdx] = nil
|
|
|
- AnotherWorldBattleDB.UpdatePlayerData(pointData.playerUuid, defPlayData)
|
|
|
- end
|
|
|
|
|
|
+ -- 如果防守方公会之前占领了城池, 则修改占领状态
|
|
|
+ if defTargerCityData and defTargerCityData.isOccupy then
|
|
|
+ defTargerCityData.isOccupy = false
|
|
|
cityNum = -1
|
|
|
end
|
|
|
|
|
|
+
|
|
|
-- 更新防守方公会的排行榜数据
|
|
|
AnotherWorldBattleDB.UpdateUnionRankList(groupId, pointData.unionId, cityNum, pointNum)
|
|
|
-- 更新防守方玩家的排行榜数据
|
|
|
@@ -1347,7 +1390,7 @@ local function challenge_Win(msg)
|
|
|
pointData.unionId = myUnionId
|
|
|
pointData.playerUuid = playerUuid
|
|
|
|
|
|
- -- 据点挑战结束
|
|
|
+ -- 重置据点被挑战标识
|
|
|
pointData.battleTime = nil
|
|
|
|
|
|
-- 更新进攻方公会数据—— 据点占有者, 最新的据点占有时间
|
|
|
@@ -1371,7 +1414,7 @@ local function challenge_Win(msg)
|
|
|
atkPlayerData.power = playerShowInfo.power
|
|
|
atkPlayerData.unionId = myUnionId
|
|
|
-- 更新挑战次数
|
|
|
- atkPlayerData.challengeTimes = (atkPlayerData.challengeTimes or AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_TIMES) - 1
|
|
|
+ atkPlayerData.challengeTimes = (atkPlayerData.challengeTimes or AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_INIT_TIMES) - 1
|
|
|
if not atkPlayerData.lastTime or atkPlayerData.lastTime == 0 then
|
|
|
atkPlayerData.lastTime = os.time()
|
|
|
end
|
|
|
@@ -1438,7 +1481,7 @@ local function challenge_Fail(msg)
|
|
|
playerData.lv = playerData.lv
|
|
|
playerData.power = playerData.power
|
|
|
playerData.unionId = myUnionId
|
|
|
- playerData.challengeTimes = (playerData.challengeTimes or AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_TIMES) - 1
|
|
|
+ playerData.challengeTimes = (playerData.challengeTimes or AnotherWorldBattleDefine.AB_PLAYER_CHALLENGE_INIT_TIMES) - 1
|
|
|
if not playerData.lastTime or playerData.lastTime == 0 then
|
|
|
playerData.lastTime = os.time()
|
|
|
end
|
|
|
@@ -1475,10 +1518,10 @@ function N2C_Update_Player_Data(msg)
|
|
|
return
|
|
|
end
|
|
|
|
|
|
- local isUpdatePower = false
|
|
|
+ local isUpdate = false
|
|
|
for k,v in pairs(msg.updateData) do
|
|
|
- if k == "power" then
|
|
|
- isUpdatePower = true
|
|
|
+ if k == "power" or k == "name" then
|
|
|
+ isUpdate = true
|
|
|
end
|
|
|
|
|
|
playerData[k] = v
|
|
|
@@ -1486,8 +1529,8 @@ function N2C_Update_Player_Data(msg)
|
|
|
|
|
|
AnotherWorldBattleDB.UpdatePlayerData(playerUuid, playerData)
|
|
|
|
|
|
- -- 如果是战力更新, 更新玩家排行榜
|
|
|
- if isUpdatePower then
|
|
|
+ -- 如果是战力/名字更新, 更新玩家排行榜
|
|
|
+ if isUpdate then
|
|
|
AnotherWorldBattleDB.UpdatePlayerRankList(groupId, playerUuid, 0, 0, playerData.power)
|
|
|
end
|
|
|
|
|
|
@@ -1510,10 +1553,10 @@ function N2C_Update_Union_Data(msg)
|
|
|
return
|
|
|
end
|
|
|
|
|
|
- local isUpdatePower = false
|
|
|
+ local isUpdate = false
|
|
|
for k,v in pairs(msg.updateData) do
|
|
|
- if k == "power" then
|
|
|
- isUpdatePower = true
|
|
|
+ if k == "power" or k == "name" then
|
|
|
+ isUpdate = true
|
|
|
end
|
|
|
unionData[k] = v
|
|
|
end
|
|
|
@@ -1521,7 +1564,7 @@ function N2C_Update_Union_Data(msg)
|
|
|
AnotherWorldBattleDB.UpdateUnionData(myUnionId, unionData)
|
|
|
|
|
|
-- 如果是战力更新, 更新公会排行榜
|
|
|
- if isUpdatePower then
|
|
|
+ if isUpdate then
|
|
|
AnotherWorldBattleDB.UpdateUnionRankList(groupId, myUnionId, 0, 0, unionData.power)
|
|
|
end
|
|
|
end
|
|
|
@@ -1561,4 +1604,150 @@ function N2C_Update_Point_Lineup(msg)
|
|
|
msgData.helpList = msg.helpList
|
|
|
local fd = MiddleManager.getFDBySvrIndex(msg.sourceServerId)
|
|
|
InnerMsg.sendMsg(fd, msgData)
|
|
|
+end
|
|
|
+
|
|
|
+-- 更新玩家英雄数据
|
|
|
+function N2C_Update_HeroData(msg)
|
|
|
+ if not isRunning() then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local playerUuid = msg.playerUuid
|
|
|
+ local playerData = AnotherWorldBattleDB.GetPlayerData(playerUuid)
|
|
|
+ if not playerData then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local heroList = playerData.heroList
|
|
|
+ if not heroList then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local targetCityId, targetPointIdx = msg.targetCityId, msg.targetPointIdx
|
|
|
+ if not heroList[targetCityId] or not heroList[targetCityId][targetPointIdx] then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local isUpdate = false
|
|
|
+ local newHeroData = msg.heroData
|
|
|
+ local heroArr = heroList[targetCityId][targetPointIdx]
|
|
|
+
|
|
|
+ for _, heroData in ipairs(heroArr) do
|
|
|
+ if heroData.heroUuid == newHeroData.heroUuid then
|
|
|
+ for k, v in pairs(newHeroData) do
|
|
|
+ heroData[k] = v
|
|
|
+ end
|
|
|
+
|
|
|
+ isUpdate = true
|
|
|
+ break
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if isUpdate then
|
|
|
+ AnotherWorldBattleDB.UpdatePlayerData(playerUuid, playerData)
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
+-- 放弃据点
|
|
|
+function N2C_Leave_Point(msg)
|
|
|
+ local playerUuid = msg.playerUuid
|
|
|
+ local myUnionId = msg.myUnionId
|
|
|
+ local targetCityId = msg.targetCityId
|
|
|
+ local targetPointIdx = msg.targetPointIdx
|
|
|
+
|
|
|
+ if not isRunning() then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local groupId = getMyUnionGourpId(myUnionId)
|
|
|
+ local cityData = AnotherWorldBattleDB.GetCityData(groupId, targetCityId)
|
|
|
+ local targetPointData = cityData.pointArr[targetPointIdx]
|
|
|
+
|
|
|
+ if not targetPointData.unionId or targetPointData.unionId ~= myUnionId or targetPointData.playerUuid ~= playerUuid then
|
|
|
+ return errTips(msg.sourceServerId, msg.playerUuid, AnotherWorldBattleDefine.ERR_CODE_5)
|
|
|
+ end
|
|
|
+
|
|
|
+ local playerData = AnotherWorldBattleDB.GetPlayerData(playerUuid)
|
|
|
+ if not playerData then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local heroList = playerData.heroList
|
|
|
+ if not heroList or not heroList[targetCityId] or not heroList[targetCityId][targetPointIdx] then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+
|
|
|
+ local defUnionData = AnotherWorldBattleDB.GetUnionData(targetPointData.unionId)
|
|
|
+ if not defUnionData then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local defOccupCityList = defUnionData.occupCityList
|
|
|
+ if not defOccupCityList then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local defTargerCityData = defOccupCityList[targetCityId]
|
|
|
+ if not defTargerCityData or not defTargerCityData.occupyPointList or not defTargerCityData.occupyPointList[targetPointIdx] then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local cityNum, pointNum = 0, -1
|
|
|
+
|
|
|
+ -- 更新城池数据, 如果城池之前被本公会占领了, 则删除
|
|
|
+ if cityData.occupyUnion and cityData.occupyUnion == myUnionId then
|
|
|
+ cityData.occupyUnion = nil
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 更新据点数据, 删除据点的 unionId, playerUuid
|
|
|
+ targetPointData.unionId = nil
|
|
|
+ targetPointData.playerUuid = nil
|
|
|
+
|
|
|
+ -- 更新公会数据, 删除公会数据中占领该据点的玩家uuid
|
|
|
+ local defTargetPointData = defTargerCityData.occupyPointList[targetPointIdx]
|
|
|
+ defTargetPointData.playerUuid = nil
|
|
|
+
|
|
|
+ -- 更新公会数据, 更新该据点最后占领时间段的结束时间
|
|
|
+ if defTargetPointData.occupyTimeArr then
|
|
|
+ local lastOccupyTimeTb = defTargetPointData.occupyTimeArr[#defTargetPointData.occupyTimeArr]
|
|
|
+ lastOccupyTimeTb[2] = now
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 更新公会数据, 如果本公会之前占领了城池, 则修改占领状态
|
|
|
+ if defTargerCityData and defTargerCityData.isOccupy then
|
|
|
+ defTargerCityData.isOccupy = false
|
|
|
+ cityNum = -1
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 更新玩家数据, 删除玩家数据中该据点的防守数据
|
|
|
+ heroList[targetCityId][targetPointIdx] = nil
|
|
|
+ if not next(heroList[targetCityId]) then
|
|
|
+ heroList[targetCityId] = nil
|
|
|
+ end
|
|
|
+
|
|
|
+
|
|
|
+ -- 更新公会数据
|
|
|
+ AnotherWorldBattleDB.UpdateUnionData(myUnionId, defUnionData)
|
|
|
+ -- 更新玩家数据
|
|
|
+ AnotherWorldBattleDB.UpdatePlayerData(playerUuid, playerData)
|
|
|
+
|
|
|
+ -- 更新公会的排行榜数据
|
|
|
+ AnotherWorldBattleDB.UpdateUnionRankList(groupId, myUnionId, cityNum, pointNum)
|
|
|
+ -- 更新玩家的排行榜数据
|
|
|
+ local pointWeight = AnotherWorldBattleConfig.city[targetCityId].pointWeight
|
|
|
+ AnotherWorldBattleDB.UpdatePlayerRankList(groupId, playerUuid, pointNum, -pointWeight)
|
|
|
+
|
|
|
+ -- 更新城池数据
|
|
|
+ AnotherWorldBattleDB.UpdateCityData(groupId, targetCityId, cityData)
|
|
|
+
|
|
|
+ -- 通知普通服, 放弃据点成功
|
|
|
+ local msgData = InnerMsg.wl.WL_ANOTHERWORLDBATTLE_LEAVE_POINT
|
|
|
+ msgData.playerUuid = playerUuid
|
|
|
+ msgData.targetCityId = targetCityId
|
|
|
+ msgData.targetPointIdx = targetPointIdx
|
|
|
+ local fd = MiddleManager.getFDBySvrIndex(msg.sourceServerId)
|
|
|
+ InnerMsg.sendMsg(fd, msgData)
|
|
|
+
|
|
|
+ N2C_AllCity_Query(msg)
|
|
|
end
|