From 27851e45dc926af04efcbdefbeb951d3560deb58 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 17:00:16 +0800
Subject: [PATCH] 9415 【BT】【后端】古神战场(采集积分墙可增加个人积分)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
index 4c756f4..8d2278b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
+++ b/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:

--
Gitblit v1.8.0