From d2e8880933fca8e8d8a8f0205bdd9ea95f4ec665 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 20 十二月 2023 15:58:14 +0800
Subject: [PATCH] 10024 【主干】【港台】【砍树】新增三种战令(增加战令类型4:古宝总星级)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py | 12 ++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py | 6 +++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
index 66493cf..1fcf0e1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
@@ -274,6 +274,18 @@
Sync_GubaoInfo(curPlayer, [gubaoID])
return
+def GetGubaoTotalLVStar(curPlayer):
+ ## 获取古宝总等级,星数
+ totalLV, totalStar = 0, 0
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in xrange(ipyDataMgr.GetGubaoCount()):
+ ipyData = ipyDataMgr.GetGubaoByIndex(index)
+ gubaoID = ipyData.GetGubaoID()
+ lv, star = GetGubaoLVInfo(curPlayer, gubaoID)
+ totalLV += lv
+ totalStar += star
+ return totalLV, totalStar
+
def RefreshGubaoAttr(curPlayer):
#CalcGubaoAttr(curPlayer)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
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 5c9b269..eec96a8 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 ItemControler
import IPY_GameWorld
+import PlayerGubao
import ChConfig
# 战令类型
@@ -29,7 +30,8 @@
ZhanlingType_LV,
ZhanlingType_Realm,
ZhanlingType_SkyTower,
-) = range(1, 1 + 3)
+ZhanlingType_GubaoStar,
+) = range(1, 1 + 4)
def OnPlayerLogin(curPlayer):
for zhanlingType in ZhanlingTypeList:
@@ -71,6 +73,8 @@
curValue = curPlayer.GetOfficialRank()
elif zhanlingType == ZhanlingType_SkyTower:
curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
+ elif zhanlingType == ZhanlingType_GubaoStar:
+ _, curValue = PlayerGubao.GetGubaoTotalLVStar(curPlayer)
else:
return
--
Gitblit v1.8.0