From a1f053eb420898b323a18b9e260aaec34af2992a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 08 十月 2023 14:49:30 +0800
Subject: [PATCH] 9896 【BT0.1】【主干】坐骑、灵宠、称号升星

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Horse.py |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Horse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Horse.py
index c914e61..df771fc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Horse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Horse.py
@@ -39,6 +39,7 @@
         GameWorld.DebugAnswer(curPlayer, "全部幻化: Horse skin 1")
         GameWorld.DebugAnswer(curPlayer, "重置幻化: Horse skin 0")
         GameWorld.DebugAnswer(curPlayer, "设置幻化: Horse skin 幻化ID 状态")
+        GameWorld.DebugAnswer(curPlayer, "设置星级: Horse star 坐骑ID 星级")
         return
     
     if msgList[0] == "skin":
@@ -60,6 +61,29 @@
         else:
             return
         
+    elif msgList[0] == "star":
+        horseID = msgList[1] if len(msgList) > 1 else 0
+        horseStar = msgList[2] if len(msgList) > 2 else 0
+        if not horseID or not horseStar:
+            return
+        skinID = 0
+        ipyDataMgr = IpyGameDataPY.IPY_Data()
+        for index in xrange(ipyDataMgr.GetHorseSkinPlusCount()):
+            skinPlusIpyData = ipyDataMgr.GetHorseSkinPlusByIndex(index)
+            if horseID != skinPlusIpyData.GetHorseID():
+                continue
+            if PlayerHorse.CheckHorseSkinState(curPlayer, skinPlusIpyData):
+                skinID = skinPlusIpyData.GetID()
+            break
+        if not skinID:
+            GameWorld.DebugAnswer(curPlayer, "该坐骑不存在或未激活:horseID=%s" % horseID)
+            return
+        if not IpyGameDataPY.GetIpyGameData("HorseStarUp", horseID, horseStar):
+            GameWorld.DebugAnswer(curPlayer, "不存在该坐骑星级:horseID=%s,star=%s" % (horseID, horseStar))
+            return
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HorserStar % horseID, horseStar)
+        GameWorld.DebugAnswer(curPlayer, "设置坐骑星级:horseID=%s,star=%s,skinID=%s" % (horseID, horseStar, skinID))
+        
     elif len(msgList) == 1:
         if msgList[0] == 0:
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HorserLV, 1)
@@ -75,6 +99,11 @@
                 PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HorserSkinEndTime % skinID, 0)
                 GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_HorserSkinPlusState, skinID, 0)
                 
+            for index in range(ipyDataMgr.GetHorseCount()):
+                ipyData = ipyDataMgr.GetHorseByIndex(index)
+                horseID = ipyData.GetHorseID()
+                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HorserStar % horseID, 0)
+                
     elif len(msgList) == 2:
         lv, eatItemCount = msgList
         if lv < 1:

--
Gitblit v1.8.0