332 【主界面】座骑系统-服务端(坐骑外观最大ID支持到999)
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("OPType", c_ubyte), # 操作 1-激活;2-佩戴;3-升星
|
| | | ("SkinID", c_ubyte), # 外观ID,佩戴时发0即为卸下
|
| | | ("SkinID", c_ushort), # 外观ID,佩戴时发0即为卸下
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | class tagSCHorseSkin(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("HorseSkinID", c_ubyte), #坐骑外观ID
|
| | | ("HorseSkinID", c_ushort), #坐骑外观ID
|
| | | ("State", c_ubyte), #是否已激活
|
| | | ("EndTime", c_int), #到期时间戳,0为永久
|
| | | ("Star", c_ubyte), #星级
|
| | |
| | |
|
| | | return totalExpRate
|
| | |
|
| | | ##外观额外数据: 其他 * 100 + 坐骑外观
|
| | | def GetHorseSkinID(curPlayer): return GameWorld.GetValue(curPlayer.GetEquipShowSwitch(), 2, 2)
|
| | | ##外观额外数据: 其他 * 1000 + 坐骑外观
|
| | | def GetHorseSkinID(curPlayer): return GameWorld.GetValue(curPlayer.GetEquipShowSwitch(), 3, 3)
|
| | | def SetHorseSkinID(curPlayer, horseSkinID):
|
| | | showValue = curPlayer.GetEquipShowSwitch()
|
| | | updShowValue = GameWorld.SetValue(showValue, 2, 2, min(horseSkinID, 99))
|
| | | updShowValue = GameWorld.SetValue(showValue, 3, 3, min(horseSkinID, 999))
|
| | | curPlayer.SetEquipShowSwitch(updShowValue)
|
| | | GameWorld.DebugLog("使用坐骑外观: horseSkinID=%s,showValue=%s,updShowValue=%s" % (horseSkinID, showValue, updShowValue))
|
| | | return
|
| | |
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE OPType; // 操作 1-激活;2-佩戴;3-升星
|
| | | # BYTE SkinID; // 外观ID,佩戴时发0即为卸下
|
| | | # WORD SkinID; // 外观ID,佩戴时发0即为卸下
|
| | | #};
|
| | | def OnHorseSkinOP(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|