10024 【主干】【港台】【砍树】新增三种战令(增加战令类型4:古宝总星级)
| | |
| | | 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()
|
| | |
| | | import ChPyNetSendPack
|
| | | import ItemControler
|
| | | import IPY_GameWorld
|
| | | import PlayerGubao
|
| | | import ChConfig
|
| | |
|
| | | # 战令类型
|
| | |
| | | ZhanlingType_LV,
|
| | | ZhanlingType_Realm,
|
| | | ZhanlingType_SkyTower,
|
| | | ) = range(1, 1 + 3)
|
| | | ZhanlingType_GubaoStar,
|
| | | ) = range(1, 1 + 4)
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | for zhanlingType in ZhanlingTypeList:
|
| | |
| | | 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
|
| | |
|