10024 【主干】【港台】【砍树】新增三种战令(增加战令类型4:古宝总星级)
2个文件已修改
18 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerZhanling.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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()
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