9415 【BT】【后端】古神战场(采集积分墙可增加个人积分)
| | |
| | | ScoreType_GuardKillPlayer, # 守卫击杀玩家 4
|
| | | ScoreType_HurtBoss, # 对boss造成伤害 5
|
| | | ScoreType_Aura, # 积分光环 6
|
| | | ) = range(7)
|
| | | ScoreType_Wall, # 积分墙 7
|
| | | ) = range(8)
|
| | |
|
| | | ## 战场公共世界管理类
|
| | | class BattleWorld():
|
| | |
| | | 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)
|
| | |
| | | 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:
|