hxp
2022-03-11 9f22ca0294f38f6490679798e1c06baf28c87002
9415 【BT】【后端】古神战场(增加被采集中的水晶资源NPCID同步)
2个文件已修改
18 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
@@ -118,6 +118,14 @@
            worldInfo["eventEndTick"] = max(0, self.eventEndTick - tick) # 事件结束剩余时间,单位毫秒
        if self.eventNPCHP:
            worldInfo["eventNPCHP"] = self.eventNPCHP
        crystalAtkedList = []
        for npcID in GetCrystalNPCIDList():
            curNPC = GameWorld.FindNPCByNPCID(npcID)
            if not curNPC:
                continue
            if curNPC.GetPlayerHurtList().GetHurtCount() > 0:
                crystalAtkedList.append(npcID)
        worldInfo["crystalAtkedList"] = crystalAtkedList
        return {"worldInfo":worldInfo}
    
    def RandSuperTask(self):
@@ -1114,7 +1122,7 @@
    
    eventRefresCD = IpyGameDataPY.GetFuncCfg("CrossBattlefieldEvent", 4) * 1000
    if worldObj.lastEventEndTick and eventRefresCD and (tick - worldObj.lastEventEndTick) < eventRefresCD:
        GameWorld.DebugLog("事件刷新CD中!")
        #GameWorld.DebugLog("事件刷新CD中!")
        return
    
    fbPropertyID = GameWorld.GetGameWorld().GetPropertyID()
@@ -1679,6 +1687,12 @@
        
    return True
## 开始采集
def OnBeginCollect(curPlayer, curNPC):
    tick = GameWorld.GetGameWorld().GetTick()
    FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0, refreshCrossBattlefield)
    return
##玩家收集成功(塔, 旗)
def OnCollectOK(curPlayer, npcID, tick):
    GameWorld.DebugLog("OnCollectOK npcID=%s" % npcID, curPlayer.GetPlayerID())
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5663,9 +5663,9 @@
    if collectNPCIpyData.GetLostHPPer():
        curPlayer.SetDict(ChConfig.Def_PlayerKey_CollectLostHPTick, tick)
        
    FBLogic.OnBeginCollect(curPlayer, curNPC)
    ##添加这个NPC的伤血列表,用于判断可否同时采集,改为字典判断
    AttackCommon.AddHurtValue(curNPC, curPlayer.GetPlayerID(), ChConfig.Def_NPCHurtTypePlayer, 1)
    FBLogic.OnBeginCollect(curPlayer, curNPC)
    return
def SetCollectNPC(curPlayer, curNPC):