From edf5674b9d6a4812b1a36b32e0e1bfd5b0cb968e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 15 十月 2025 09:19:42 +0800
Subject: [PATCH] 263 【主界面】头像系统(内政-幻境阁系统)-服务端(形象、头像、头像框、气泡、称号)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ChatBox.py | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ChatBox.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ChatBox.py
index fb48fe7..0accdec 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ChatBox.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ChatBox.py
@@ -34,8 +34,8 @@
GameWorld.DebugAnswer(curPlayer, "添加气泡框: ChatBox b1 气泡框ID [有效秒]")
GameWorld.DebugAnswer(curPlayer, "删除气泡框: ChatBox b0 [气泡框ID]")
GameWorld.DebugAnswer(curPlayer, "气泡框星级: ChatBox bs 气泡框ID 星级")
- GameWorld.DebugAnswer(curPlayer, "添加表情包: ChatBox e1 表情包ID [有效秒]")
- GameWorld.DebugAnswer(curPlayer, "删除表情包: ChatBox e0 [表情包ID]")
+ #GameWorld.DebugAnswer(curPlayer, "添加表情包: ChatBox e1 表情包ID [有效秒]")
+ #GameWorld.DebugAnswer(curPlayer, "删除表情包: ChatBox e0 [表情包ID]")
GameWorld.DebugAnswer(curPlayer, "有效秒:不填读表,0-永久,>0指定有效秒")
return
@@ -48,26 +48,21 @@
if value1 == "b0":
boxID = msgList[1] if len(msgList) > 1 else 0
if not boxID:
- for index in range(ipyDataMgr.GetChatBubbleBoxCount()):
- ipyData = ipyDataMgr.GetChatBubbleBoxByIndex(index)
+ for index in range(ipyDataMgr.GetChatBoxCount()):
+ ipyData = ipyDataMgr.GetChatBoxByIndex(index)
boxID = ipyData.GetBoxID()
- if ipyData.GetUnlockDefault():
+ if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBoxState, boxID):
continue
- if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBubbleBoxState, boxID):
- continue
- GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBubbleBoxState, boxID, 0)
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBoxState, boxID, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChatBoxEndTime % boxID, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChatBoxStar % boxID, 0)
syncBoxIDList.append(boxID)
else:
- ipyData = IpyGameDataPY.GetIpyGameData("ChatBubbleBox", boxID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ChatBox", boxID)
if not ipyData:
GameWorld.DebugAnswer(curPlayer, "该气泡框不存在:%s" % boxID)
return
- if ipyData.GetUnlockDefault():
- GameWorld.DebugAnswer(curPlayer, "该气泡框默认激活:%s" % boxID)
- return
- GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBubbleBoxState, boxID, 0)
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBoxState, boxID, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChatBoxEndTime % boxID, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChatBoxStar % boxID, 0)
syncBoxIDList.append(boxID)
@@ -77,7 +72,7 @@
elif value1 == "b1":
boxID = msgList[1] if len(msgList) > 1 else 0
expireTimes = msgList[2] if len(msgList) > 2 else None
- if PlayerChatBox.AddChatBox(curPlayer, boxID, expireTimes):
+ if PlayerChatBox.AddChatBox(curPlayer, boxID, expireTimes, True):
endTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ChatBoxEndTime % boxID)
endTimeStr = "永久" if not endTime else GameWorld.ChangeTimeNumToStr(endTime)
GameWorld.DebugAnswer(curPlayer, "添加气泡框成功:%s,到期:%s" % (boxID, endTimeStr))
@@ -88,11 +83,11 @@
elif value1 == "bs":
boxID = msgList[1] if len(msgList) > 1 else 0
boxStar = msgList[2] if len(msgList) > 2 else 0
- if boxStar:
- starIpyData = IpyGameDataPY.GetIpyGameData("ChatBubbleBoxStar", boxID, boxStar)
- if not starIpyData:
- GameWorld.DebugAnswer(curPlayer, "气泡框星级不存在:%s,star:%s" % (boxID, boxStar))
- return
+ ipyData = IpyGameDataPY.GetIpyGameData("ChatBox", boxID)
+ if not ipyData:
+ GameWorld.DebugAnswer(curPlayer, "该气泡框不存在:%s" % boxID)
+ return
+ boxStar = min(boxStar, ipyData.GetStarMax())
GameWorld.DebugAnswer(curPlayer, "设置气泡框星级:%s,星:%s" % (boxID, boxStar))
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChatBoxStar % boxID, boxStar)
syncBoxIDList.append(boxID)
--
Gitblit v1.8.0