From 8a951e63f3a9df81b288b410d8a3c73b8c1a6d08 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 27 八月 2024 19:00:14 +0800
Subject: [PATCH] 10251 【越南】【砍树】骑宠养成-新增养成战令

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py
index 181c6ea..f6c1cca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py
@@ -23,6 +23,7 @@
 import FunctionNPCCommon
 import PlayerBillboard
 import ChPyNetSendPack
+import PlayerZhanling
 import NetPackCommon
 import PlayerActTask
 import GameWorld
@@ -87,6 +88,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_ActHorsePetTrainScore % actNum)
+    PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_HorsePetTrain, score)
     
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActHorsePetTrainID % actNum, actID)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActHorsePetTrainScore % actNum, 0)
@@ -198,6 +201,17 @@
     GameWorld.Log("骑宠养成活动发送GameServer: %s, %s" % (msgType, dataMsg), playerID)
     return
 
+def GetActHorsePetTrainScore(curPlayer):
+    ## 获取活动中养成积分
+    actScore = 0
+    for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_HorsePetTrain, {}).values():
+        actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+        if not actInfo.get(ShareDefine.ActKey_State):
+            continue
+        score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActHorsePetTrainScore % actNum)
+        actScore = max(score, actScore)
+    return actScore
+
 def Sync_HorsePetTrainActionInfo(curPlayer, actNum):
     ## 通知活动信息
     

--
Gitblit v1.8.0