4399 【后端】【1.2.0】气泡框聊天信息相关封包支持附加使用的气泡框ID;
11个文件已修改
40 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -16785,7 +16785,6 @@
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("UseBoxID", c_ubyte),    # 当前使用的气泡框ID
                  ("BoxState", c_int),    # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加
                  ]
@@ -16803,7 +16802,6 @@
    def Clear(self):
        self.Cmd = 0xA7
        self.SubCmd = 0x17
        self.UseBoxID = 0
        self.BoxState = 0
        return
@@ -16817,13 +16815,11 @@
        DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
                                Cmd:%s,
                                SubCmd:%s,
                                UseBoxID:%d,
                                BoxState:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.UseBoxID,
                                self.BoxState
                                )
        return DumpString
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -655,6 +655,9 @@
    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);
    
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
@@ -202,6 +202,10 @@
#        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):
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
@@ -383,7 +383,8 @@
    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
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -878,7 +878,8 @@
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)
#聊天信息附加值中某信息数据所占位置
#{聊天信息附加值类型:[起始位置(从左往右), 结束位置(不包含)]}
@@ -886,6 +887,7 @@
     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],  # 气泡框
     }
# 聊天频道 暂用语音
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3634,7 +3634,6 @@
Def_PDict_WishingWellItemCnt = "WishingWellItemCnt_%s_%s"  # 物品数量记录 参数(类型,物品数据)
#聊天气泡
Def_PDict_ChatBubbleBoxUseID = "ChatBubbleBoxUseID"  # 聊天气泡当前使用的气泡框ID
Def_PDict_ChatBubbleBoxState = "ChatBubbleBoxState_%s"  # 聊天气泡状态, 参数(key编号)
#-------------------------------------------------------------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -16785,7 +16785,6 @@
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("UseBoxID", c_ubyte),    # 当前使用的气泡框ID
                  ("BoxState", c_int),    # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加
                  ]
@@ -16803,7 +16802,6 @@
    def Clear(self):
        self.Cmd = 0xA7
        self.SubCmd = 0x17
        self.UseBoxID = 0
        self.BoxState = 0
        return
@@ -16817,13 +16815,11 @@
        DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
                                Cmd:%s,
                                SubCmd:%s,
                                UseBoxID:%d,
                                BoxState:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.UseBoxID,
                                self.BoxState
                                )
        return DumpString
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -2562,8 +2562,7 @@
                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):
@@ -2577,12 +2576,10 @@
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
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -5641,6 +5641,10 @@
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
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
@@ -375,6 +375,8 @@
    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
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -878,7 +878,8 @@
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)
#聊天信息附加值中某信息数据所占位置
#{聊天信息附加值类型:[起始位置(从左往右), 结束位置(不包含)]}
@@ -886,6 +887,7 @@
     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],  # 气泡框
     }
# 聊天频道 暂用语音