4399 【后端】【1.2.0】气泡框聊天信息相关封包支持附加使用的气泡框ID;
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("UseBoxID", c_ubyte), # 当前使用的气泡框ID
|
| | | ("BoxState", c_int), # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加
|
| | | ]
|
| | |
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x17
|
| | | self.UseBoxID = 0
|
| | | self.BoxState = 0
|
| | | return
|
| | |
|
| | |
| | | DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | UseBoxID:%d,
|
| | | BoxState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.UseBoxID,
|
| | | self.BoxState
|
| | | )
|
| | | return DumpString
|
| | |
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr9:
|
| | | PlayerControl.SetVIPExpireTime(curPlayer, packValue)
|
| | |
|
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_ExAttr10:
|
| | | PlayerControl.SetChatBubbleBox(curPlayer, packValue)
|
| | | |
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_OperateInfo:
|
| | | curPlayer.SetOperateInfo(packValue);
|
| | |
|
| | |
| | | # return 0
|
| | | return curPlayer.GetVIPLv()
|
| | |
|
| | | ##聊天气泡框
|
| | | def GetChatBubbleBox(curPlayer): return curPlayer.GetExAttr10()
|
| | | def SetChatBubbleBox(curPlayer, value): return curPlayer.SetExAttr10(value)
|
| | |
|
| | | ## 是否脱机挂机状态
|
| | | def GetIsTJG(curPlayer):
|
| | | if curPlayer.GetDictByKey(ChConfig.Def_OnlineType):
|
| | |
| | | extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_GM)% (GMLevel > 0)
|
| | | # job
|
| | | extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_JOB)% job
|
| | |
|
| | | # 气泡框
|
| | | extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_BubbleBox) % PlayerControl.GetChatBubbleBox(objTalk)
|
| | | return extraValueStr
|
| | |
|
| | |
|
| | |
| | | Def_TalkExtraValue_Bit_VipLv, # vip等级
|
| | | Def_TalkExtraValue_Bit_GM, #GM
|
| | | Def_TalkExtraValue_Bit_JOB, #job
|
| | | ) = range(0, 3)
|
| | | Def_TalkExtraValue_Bit_BubbleBox, #气泡框
|
| | | ) = range(0, 4)
|
| | |
|
| | | #聊天信息附加值中某信息数据所占位置
|
| | | #{聊天信息附加值类型:[起始位置(从左往右), 结束位置(不包含)]}
|
| | |
| | | Def_TalkExtraValue_Bit_VipLv:[0, 2], # vip等级
|
| | | Def_TalkExtraValue_Bit_GM:[2, 3], # GM
|
| | | Def_TalkExtraValue_Bit_JOB:[3, 4], # job
|
| | | Def_TalkExtraValue_Bit_BubbleBox:[4, 6], # 气泡框
|
| | | }
|
| | |
|
| | | # 聊天频道 暂用语音
|
| | |
| | | Def_PDict_WishingWellItemCnt = "WishingWellItemCnt_%s_%s" # 物品数量记录 参数(类型,物品数据)
|
| | |
|
| | | #聊天气泡
|
| | | Def_PDict_ChatBubbleBoxUseID = "ChatBubbleBoxUseID" # 聊天气泡当前使用的气泡框ID
|
| | | Def_PDict_ChatBubbleBoxState = "ChatBubbleBoxState_%s" # 聊天气泡状态, 参数(key编号)
|
| | |
|
| | | #-------------------------------------------------------------------------------
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("UseBoxID", c_ubyte), # 当前使用的气泡框ID
|
| | | ("BoxState", c_int), # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加
|
| | | ]
|
| | |
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x17
|
| | | self.UseBoxID = 0
|
| | | self.BoxState = 0
|
| | | return
|
| | |
|
| | |
| | | DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | UseBoxID:%d,
|
| | | BoxState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.UseBoxID,
|
| | | self.BoxState
|
| | | )
|
| | | return DumpString
|
| | |
| | | GameWorld.DebugLog(" 未购买VIP礼包,无法使用该气泡框!needVIPLVGift=%s" % needVIPLVGift, curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ChatBubbleBoxUseID, useBoxID)
|
| | | SyncChatBubbleBoxState(curPlayer)
|
| | | PlayerControl.SetChatBubbleBox(curPlayer, useBoxID)
|
| | | return
|
| | |
|
| | | def DoActivateChatBubbleBox(curPlayer, boxID):
|
| | |
| | |
|
| | | def SyncChatBubbleBoxState(curPlayer):
|
| | | ## 同步聊天气泡框状态
|
| | | useBoxID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ChatBubbleBoxUseID)
|
| | | boxState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ChatBubbleBoxState % 0)
|
| | | if not useBoxID and not boxState:
|
| | | if not boxState:
|
| | | return
|
| | | boxStatePack = ChPyNetSendPack.tagMCChatBubbleBoxState()
|
| | | boxStatePack.UseBoxID = useBoxID
|
| | | boxStatePack.BoxState = boxState
|
| | | NetPackCommon.SendFakePack(curPlayer, boxStatePack)
|
| | | return
|
| | |
| | | def GetVIPExpireTime(curPlayer): return curPlayer.GetExAttr9()
|
| | | def SetVIPExpireTime(curPlayer, expireTime): return curPlayer.SetExAttr9(expireTime, False, True)
|
| | |
|
| | | ##聊天气泡框
|
| | | def GetChatBubbleBox(curPlayer): return curPlayer.GetExAttr10()
|
| | | def SetChatBubbleBox(curPlayer, value): return curPlayer.SetExAttr10(value, False, True)
|
| | |
|
| | | ##获得玩家威望值
|
| | | def GetPrestige(curPlayer): return 0
|
| | | def SetPrestige(curPlayer, value): return
|
| | |
| | | extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_GM)% (GMLevel > 0)
|
| | | # job
|
| | | extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_JOB)% job
|
| | | # 气泡框
|
| | | extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_BubbleBox) % PlayerControl.GetChatBubbleBox(objTalk)
|
| | |
|
| | | # 跨服预选赛排位(称呼)
|
| | | #extraValueStr += GetTalkExtraValueStar(ShareDefine.Def_TalkExtraValue_Bit_MergeWarRank)%mergeWarRank
|
| | |
| | | Def_TalkExtraValue_Bit_VipLv, # vip等级
|
| | | Def_TalkExtraValue_Bit_GM, #GM
|
| | | Def_TalkExtraValue_Bit_JOB, #job
|
| | | ) = range(0, 3)
|
| | | Def_TalkExtraValue_Bit_BubbleBox, #气泡框
|
| | | ) = range(0, 4)
|
| | |
|
| | | #聊天信息附加值中某信息数据所占位置
|
| | | #{聊天信息附加值类型:[起始位置(从左往右), 结束位置(不包含)]}
|
| | |
| | | Def_TalkExtraValue_Bit_VipLv:[0, 2], # vip等级
|
| | | Def_TalkExtraValue_Bit_GM:[2, 3], # GM
|
| | | Def_TalkExtraValue_Bit_JOB:[3, 4], # job
|
| | | Def_TalkExtraValue_Bit_BubbleBox:[4, 6], # 气泡框
|
| | | }
|
| | |
|
| | | # 聊天频道 暂用语音
|