hxp
9 天以前 bd9dce2d66b5086712596b8dac6d9116be65bafd
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -20,13 +20,14 @@
import ShareDefine
import NetPackCommon
import PlayerControl
import PlayerSuccess
import ChPyNetSendPack
import IPY_GameWorld
import IpyGameDataPY
import GameFuncComm
import PlayerOnline
import PlayerTask
import GameWorld
import ObjPool
import time
@@ -119,6 +120,9 @@
    # 有升级额外处理
    if updHorseLV > horseLV:
        RefreshHorseAttr(curPlayer)
    PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_HorseLVUP, costItemCount)
    PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_OSAHorseLVUP, costItemCount)
    return
#// B2 02 坐骑进阶 #tagCSHorseClassUP
@@ -245,7 +249,7 @@
    return
def SyncHorseClassInfo(curPlayer):
    clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCHorseClassInfo)
    clientPack = ChPyNetSendPack.tagSCHorseClassInfo()
    clientPack.ClassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
    clientPack.HorseLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseLV)
    clientPack.Exp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseExp)
@@ -392,6 +396,8 @@
    for index in range(ipyDataMgr.GetHorseSkinCount()):
        ipyData = ipyDataMgr.GetHorseSkinByIndex(index)
        horseSkinID = ipyData.GetSkinID()
        if horseSkinID <= 0:
            continue
        if ipyData.GetUnlockWay() != 1:
            continue
        if ipyData.GetUnlockValue() > 0:
@@ -406,14 +412,16 @@
    if state:
        return True
    
#    if not ipyData:
#        ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
#    if ipyData:
#        unlockWay = ipyData.GetUnlockWay()
#        if unlockWay == 1:
#            classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
#            if classLV >= ipyData.GetUnlockValue():
#                return True
    if not ipyData:
        ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
    if ipyData:
        unlockWay = ipyData.GetUnlockWay()
        if unlockWay == 1:
            if not ipyData.GetUnlockValue():
                return True
            #classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
            #if classLV >= ipyData.GetUnlockValue():
            #    return True
            
    return False
@@ -484,7 +492,7 @@
        state = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_HorseSkinState, horseSkinID)
        if not state and horseSkinIDList == None:
            continue
        horseSkin = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCHorseSkin)
        horseSkin = ChPyNetSendPack.tagSCHorseSkin()
        horseSkin.HorseSkinID = horseSkinID
        horseSkin.State = state
        horseSkin.EndTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseSkinEndTime % horseSkinID)
@@ -494,7 +502,7 @@
    if not horseSkinList:
        return
    
    clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCHorseSkinInfo)
    clientPack = ChPyNetSendPack.tagSCHorseSkinInfo()
    clientPack.HorseSkinList = horseSkinList
    clientPack.Count = len(clientPack.HorseSkinList)
    NetPackCommon.SendFakePack(curPlayer, clientPack)