From 141959c90ea475111b1d021d219745c2e246f45e Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 13 十一月 2024 12:24:21 +0800 Subject: [PATCH] 10261 【越南】【砍树】【英文】增加玩家定制头像支持; --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Face.py | 5 +++++ ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 8 +++++--- PySysDB/PySysDBPY.h | 1 + ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFace.py | 10 ++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h index eff47cc..003bac0 100644 --- a/PySysDB/PySysDBPY.h +++ b/PySysDB/PySysDBPY.h @@ -29,6 +29,7 @@ DWORD _FaceID; //头像ID BYTE UnlockDefault; //是否默认激活 DWORD ExpireMinutes; //时效分钟,0永久 + DWORD CustomPlayerID; //定制玩家ID list LightAttrType; //点亮属性类型 list LightAttrValue; //点亮属性值 DWORD LightFightPower; //点亮附加战力 diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Face.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Face.py index b8a554b..e31234d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Face.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Face.py @@ -54,6 +54,8 @@ faceID = ipyData.GetFaceID() if ipyData.GetUnlockDefault(): continue + if ipyData.GetCustomPlayerID(): + continue if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID): continue GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0) @@ -68,6 +70,9 @@ if ipyData.GetUnlockDefault(): GameWorld.DebugAnswer(curPlayer, "该头像默认激活:%s" % faceID) return + if ipyData.GetCustomPlayerID(): + GameWorld.DebugAnswer(curPlayer, "定制头像不处理:%s" % faceID) + return GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceEndTime % faceID, 0) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FaceStar % faceID, 0) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py index b096221..9f1095a 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py @@ -55,6 +55,7 @@ ("DWORD", "FaceID", 1), ("BYTE", "UnlockDefault", 0), ("DWORD", "ExpireMinutes", 0), + ("DWORD", "CustomPlayerID", 0), ("list", "LightAttrType", 0), ("list", "LightAttrValue", 0), ("DWORD", "LightFightPower", 0), @@ -2583,9 +2584,10 @@ def GetFaceID(self): return self.attrTuple[0] # 头像ID DWORD def GetUnlockDefault(self): return self.attrTuple[1] # 是否默认激活 BYTE def GetExpireMinutes(self): return self.attrTuple[2] # 时效分钟,0永久 DWORD - def GetLightAttrType(self): return self.attrTuple[3] # 点亮属性类型 list - def GetLightAttrValue(self): return self.attrTuple[4] # 点亮属性值 list - def GetLightFightPower(self): return self.attrTuple[5] # 点亮附加战力 DWORD + def GetCustomPlayerID(self): return self.attrTuple[3] # 定制玩家ID DWORD + def GetLightAttrType(self): return self.attrTuple[4] # 点亮属性类型 list + def GetLightAttrValue(self): return self.attrTuple[5] # 点亮属性值 list + def GetLightFightPower(self): return self.attrTuple[6] # 点亮附加战力 DWORD # 头像升星表 class IPY_PlayerFaceStar(): diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFace.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFace.py index 7814b4e..dbb05f3 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFace.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFace.py @@ -44,6 +44,9 @@ if ipyData.GetUnlockDefault(): # 默认激活的不处理 continue + if ipyData.GetCustomPlayerID(): + # 玩家定制的不处理 + continue if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID): # 未激活的不处理 continue @@ -88,6 +91,9 @@ if ipyData.GetUnlockDefault(): GameWorld.DebugLog("默认解锁的头像不用添加: faceID=%s" % (faceID), playerID) return + if ipyData.GetCustomPlayerID(): + GameWorld.DebugLog("玩家定制的头像不用添加: faceID=%s" % (faceID), playerID) + return ipyExpireSeconds = ipyData.GetExpireMinutes() * 60 curTime = int(time.time()) @@ -128,6 +134,8 @@ if not ipyData: return if ipyData.GetUnlockDefault(): + return + if ipyData.GetCustomPlayerID(): return GameWorld.Log("删除头像: faceID=%s,notifyMail=%s" % (faceID, notifyMail), playerID) GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_FaceState, faceID, 0) @@ -250,6 +258,8 @@ if ipyData: if ipyData.GetUnlockDefault(): return True + if ipyData.GetCustomPlayerID() and ipyData.GetCustomPlayerID() == curPlayer.GetPlayerID(): + return True return False -- Gitblit v1.8.0