Преглед изворни кода

修改异界之战中被占领的城池被另外公会占据据点后,占领公会没有更新问题

gitxsm пре 7 месеци
родитељ
комит
8a2d21e24d
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      script/module/anotherWorldBattle/AnotherWorldBattleCS.lua

+ 7 - 1
script/module/anotherWorldBattle/AnotherWorldBattleCS.lua

@@ -179,7 +179,7 @@ local function grouping()
     if not joinUnionArr then
         -- 没有公会参加, 本轮活动结束
         local now = os.time()
-        AnotherWorldBattleDB.UpdateLastRoundStartTime(now)
+        -- AnotherWorldBattleDB.UpdateLastRoundStartTime(now)
         return AnotherWorldBattleDB.UpdateStage(AnotherWorldBattleDefine.AB_STATE_END)
     end
 
@@ -1294,6 +1294,12 @@ local function challenge_Win(msg)
     local cityNum, pointNum = 0, 1
     local pointWeight = AnotherWorldBattleConfig.city[targetCityId].pointWeight
 
+
+    -- 如果城池之前被占领了, 则重置占领城池的公会Id
+    if cityData.occupyUnion then
+        cityData.occupyUnion = nil
+    end
+
     -- 防守方是真实玩家
     if pointData.unionId and pointData.playerUuid then
         -- 更新防守方公会数据