hxp
2022-03-15 27851e45dc926af04efcbdefbeb951d3560deb58
9415 【BT】【后端】古神战场(采集积分墙可增加个人积分)
1个文件已修改
9 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
@@ -78,7 +78,8 @@
ScoreType_GuardKillPlayer, # 守卫击杀玩家     4
ScoreType_HurtBoss, # 对boss造成伤害     5
ScoreType_Aura, # 积分光环     6
) = range(7)
ScoreType_Wall, # 积分墙     7
) = range(8)
## 战场公共世界管理类
class BattleWorld():
@@ -409,6 +410,8 @@
        return helpInfo
    
    def addPlayerScore(self, curPlayer, addValue, scoreType=ScoreType_Default, scoreTimes=1, isCheckVictory=True):
        if not addValue:
            return
        addValue *= scoreTimes
        befScore = self.score
        self.score = max(0, self.score + addValue)
@@ -1989,12 +1992,14 @@
    playerID = curPlayer.GetPlayerID()
    faction = curPlayer.GetFaction()
    
    GameWorld.Log("玩家采集积分墙: npcID=%s,faction=%s,eventNPCHP=%s,tick=%s" % (npcID, faction, worldObj.eventNPCHP, tick), playerID)
    addPlayerScore = IpyGameDataPY.GetFuncCfg("CrossBattlefieldScoreWall", 4)
    battleObj = GetBattlePlayerObj(playerID)
    battleObj.wallCollCnt += 1
    battleObj.addPlayerScore(curPlayer, addPlayerScore, ScoreType_Wall)
    
    factionObj = GetBattleFactionObj(faction)
    addValue = IpyGameDataPY.GetFuncCfg("CrossBattlefieldScoreWall", 3)
    GameWorld.Log("玩家采集积分墙: npcID=%s,faction=%s,eventNPCHP=%s,tick=%s" % (npcID, faction, worldObj.eventNPCHP, tick), playerID)
    factionObj.addFactionScore(addValue)
    PlayerControl.FBNotify("CrossBattlefieldWallCollectOK", [faction, curPlayer.GetPlayerName(), npcID, addValue])
    if worldObj.eventNPCHP <= 0: