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

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py |    6 +++++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py           |    7 +++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py |   15 +++++++++++++++
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                                |    7 +++++--
 4 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 0cc3934..2f5a5c6 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1145,7 +1145,8 @@
 CDBPlayerRefresh_GatherSoul, # 聚魂精华 263
 CDBPlayerRefresh_BossFinalHurtPer,  # Boss最终输出伤害百分比 264
 CDBPlayerRefresh_HorsePetTrainScore, # 骑宠养成积分 265
-) = range(146, 266)
+CDBPlayerRefresh_GubaoTrainScore, # 古宝养成积分 266
+) = range(146, 267)
 
 TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
 TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1179,6 +1180,7 @@
 TYPE_Price_BossTrial = 43    # boss历练凭证积分
 TYPE_Price_GatherSoul = 44    # 聚魂精华
 TYPE_Price_HorsePetTrainScore = 45    # 骑宠养成积分
+TYPE_Price_GubaoTrainScore = 46    # 古宝养成积分
 TYPE_Price_PayCoin = 99    # 代币
 
 #key可用于遍历所有货币,value仅GM相关会用到
@@ -1186,7 +1188,7 @@
                  1:"仙玉", 2:"绑玉", 3:"铜钱", 6:"战盟贡献度", 10:"战盟仓库积分", 13:"境界修行点", 14:"符印融合石", 15:"仙盟活跃令", 
                  16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘", 
                  29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值", 33:"GM令", 34:"古神币", 35:"功德点", 
-                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 99:"代币"
+                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 99:"代币"
                  }
 
 #以下是旧的金钱类型
@@ -1221,6 +1223,7 @@
                            TYPE_Price_BossTrial:CDBPlayerRefresh_BossTrial,
                            TYPE_Price_GatherSoul:CDBPlayerRefresh_GatherSoul,
                            TYPE_Price_HorsePetTrainScore:CDBPlayerRefresh_HorsePetTrainScore,
+                           TYPE_Price_GubaoTrainScore:CDBPlayerRefresh_GubaoTrainScore,
                            }
 
 # 支持负值的货币及对应0418刷新类型
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):
     ## 通知活动信息
     
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
index b9f3c00..4e4c966 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py
@@ -22,6 +22,7 @@
 import ChPyNetSendPack
 import PlayerGatherTheSoul
 import PlayerActHorsePetTrain
+import PlayerActGubao
 import ItemControler
 import IPY_GameWorld
 import PlayerGubao
@@ -37,7 +38,8 @@
 ZhanlingType_Login,
 ZhanlingType_GatherTheSoulLV,
 ZhanlingType_HorsePetTrain,
-) = range(1, 1 + 7)
+ZhanlingType_GubaoTrain,
+) = range(1, 1 + 8)
 
 def OnPlayerLogin(curPlayer):
     for zhanlingType in ZhanlingTypeList:
@@ -180,6 +182,8 @@
         curValue = PlayerGatherTheSoul.GetGatherTheSoulTotalLV(curPlayer)
     elif zhanlingType == ZhanlingType_HorsePetTrain:
         curValue = PlayerActHorsePetTrain.GetActHorsePetTrainScore(curPlayer)
+    elif zhanlingType == ZhanlingType_GubaoTrain:
+        curValue = PlayerActGubao.GetActGubaoTrainScore(curPlayer)
     else:
         return
         
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 0cc3934..2f5a5c6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1145,7 +1145,8 @@
 CDBPlayerRefresh_GatherSoul, # 聚魂精华 263
 CDBPlayerRefresh_BossFinalHurtPer,  # Boss最终输出伤害百分比 264
 CDBPlayerRefresh_HorsePetTrainScore, # 骑宠养成积分 265
-) = range(146, 266)
+CDBPlayerRefresh_GubaoTrainScore, # 古宝养成积分 266
+) = range(146, 267)
 
 TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
 TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1179,6 +1180,7 @@
 TYPE_Price_BossTrial = 43    # boss历练凭证积分
 TYPE_Price_GatherSoul = 44    # 聚魂精华
 TYPE_Price_HorsePetTrainScore = 45    # 骑宠养成积分
+TYPE_Price_GubaoTrainScore = 46    # 古宝养成积分
 TYPE_Price_PayCoin = 99    # 代币
 
 #key可用于遍历所有货币,value仅GM相关会用到
@@ -1186,7 +1188,7 @@
                  1:"仙玉", 2:"绑玉", 3:"铜钱", 6:"战盟贡献度", 10:"战盟仓库积分", 13:"境界修行点", 14:"符印融合石", 15:"仙盟活跃令", 
                  16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘", 
                  29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值", 33:"GM令", 34:"古神币", 35:"功德点", 
-                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 99:"代币"
+                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 99:"代币"
                  }
 
 #以下是旧的金钱类型
@@ -1221,6 +1223,7 @@
                            TYPE_Price_BossTrial:CDBPlayerRefresh_BossTrial,
                            TYPE_Price_GatherSoul:CDBPlayerRefresh_GatherSoul,
                            TYPE_Price_HorsePetTrainScore:CDBPlayerRefresh_HorsePetTrainScore,
+                           TYPE_Price_GubaoTrainScore:CDBPlayerRefresh_GubaoTrainScore,
                            }
 
 # 支持负值的货币及对应0418刷新类型

--
Gitblit v1.8.0