From 6407dfe630550c637710b089dca7bdaf7823603b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 02 九月 2024 18:36:28 +0800
Subject: [PATCH] 10241 【越南】【砍树】【主干】【港台】古宝养成(增加古宝养成积分货币46;增加古宝养成战令8;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py
index 9c568d2..bfab5a0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py
@@ -22,6 +22,7 @@
 import CrossRealmPlayer
 import PlayerBillboard
 import ChPyNetSendPack
+import PlayerZhanling
 import NetPackCommon
 import GameWorld
 import ChConfig
@@ -85,6 +86,8 @@
     
     GameWorld.DebugLog("古宝养成重置! actNum=%s,actID=%s,playerActID=%s,state=%s,cfgID=%s" 
                        % (actNum, actID, playerActID, state, cfgID), playerID)
+    score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
+    PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_GubaoTrain, score)
     
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoID % actNum, actID)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoScore % actNum, 0)
@@ -190,6 +193,7 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoScore % actNum, updScore)
     GameWorld.DebugLog("古宝活动增加积分: actNum=%s,addScore=%s,updScore=%s" % (actNum, addScore, updScore))
     Sync_GubaoPlayerInfo(curPlayer, actNum)
+    PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_GubaoTrainScore, addScore, "ActGubaoTrain")
     PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_GubaoScore, updScore, autoSort=True)
     SendToGameServer_Gubao(curPlayer, "AddGubaoScore", [addScore, updScore, isRelationCrossAct])
     return updScore
@@ -201,6 +205,17 @@
     GameWorld.Log("古宝养成发送GameServer: %s, %s" % (msgType, dataMsg), playerID)
     return
 
+def GetActGubaoTrainScore(curPlayer):
+    ## 获取活动中养成积分
+    actScore = 0
+    for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_Gubao, {}).values():
+        actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+        if not actInfo.get(ShareDefine.ActKey_State):
+            continue
+        score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
+        actScore = max(score, actScore)
+    return actScore
+
 def Sync_GubaoActionInfo(curPlayer, actNum):
     ## 通知活动信息
     

--
Gitblit v1.8.0