hxp
2018-11-01 e168d76d7d1f3cb94e2e3e9f6051dc80986fdc01
4399 【后端】【1.2.0】聊天新增支持气泡框选择功能
7个文件已修改
137 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -4755,6 +4755,58 @@
#------------------------------------------------------
# A2 30 设置聊天气泡框 #tagCMSetChatBubbleBox
class  tagCMSetChatBubbleBox(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("BubbleBoxType", c_ubyte),    #气泡框类型
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA2
        self.SubCmd = 0x30
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xA2
        self.SubCmd = 0x30
        self.BubbleBoxType = 0
        return
    def GetLength(self):
        return sizeof(tagCMSetChatBubbleBox)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A2 30 设置聊天气泡框 //tagCMSetChatBubbleBox:
                                Cmd:%s,
                                SubCmd:%s,
                                BubbleBoxType:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.BubbleBoxType
                                )
        return DumpString
m_NAtagCMSetChatBubbleBox=tagCMSetChatBubbleBox()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSetChatBubbleBox.Cmd,m_NAtagCMSetChatBubbleBox.SubCmd))] = m_NAtagCMSetChatBubbleBox
#------------------------------------------------------
# A2 22 设置引导成功 #tagCMSetGuideOK
class  tagCMSetGuideOK(Structure):
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -612,11 +612,6 @@
        curPlayer.SetFightPower(packValue)
        return
    if packType == IPY_GameServer.CDBPlayerRefresh_ExAttr10:
        #设置玩家跨服预赛排位
        PlayerControl.SetMergeWarRank(curPlayer, packValue)
        return
    if packType == IPY_GameServer.CDBPlayerRefresh_ExAttr2:
        #队伍相关相关审核开关状态
        PlayerTeam.SetTeamCheckState(curPlayer, packValue)
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerControl.py
@@ -178,7 +178,6 @@
#  @param value: 威望值
#  @return: 
def SetMergeWarRank(curPlayer, value):
    curPlayer.SetExAttr10(value)
    return
@@ -186,7 +185,7 @@
#  @param curPlayer: 玩家实例
#  @return: 威望值
def GetMergeWarRank(curPlayer):
    return curPlayer.GetExAttr10()
    return 0
## 职业阶数
def GetJobRank(curPlayer): return curPlayer.GetExAttr1()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -334,7 +334,7 @@
Writer = hxp
Releaser = hxp
RegType = 0
RegisterPackCount = 17
RegisterPackCount = 18
PacketCMD_1 = 0xA5
PacketSubCMD_1 = 0x04
@@ -404,6 +404,10 @@
PacketSubCMD_17=0x29
PacketCallFunc_17=OnSetLittleHelper
PacketCMD_18=0xA2
PacketSubCMD_18=0x30
PacketCallFunc_18=OnSetChatBubbleBox
;购买相关的
[BuySomething]
ScriptName = Event\EventSrc\Operate_PlayerBuyZhenQi.py
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -4755,6 +4755,58 @@
#------------------------------------------------------
# A2 30 设置聊天气泡框 #tagCMSetChatBubbleBox
class  tagCMSetChatBubbleBox(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("BubbleBoxType", c_ubyte),    #气泡框类型
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA2
        self.SubCmd = 0x30
        return
    def ReadData(self, stringData, _pos=0, _len=0):
        self.Clear()
        memmove(addressof(self), stringData[_pos:], self.GetLength())
        return _pos + self.GetLength()
    def Clear(self):
        self.Cmd = 0xA2
        self.SubCmd = 0x30
        self.BubbleBoxType = 0
        return
    def GetLength(self):
        return sizeof(tagCMSetChatBubbleBox)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A2 30 设置聊天气泡框 //tagCMSetChatBubbleBox:
                                Cmd:%s,
                                SubCmd:%s,
                                BubbleBoxType:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.BubbleBoxType
                                )
        return DumpString
m_NAtagCMSetChatBubbleBox=tagCMSetChatBubbleBox()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSetChatBubbleBox.Cmd,m_NAtagCMSetChatBubbleBox.SubCmd))] = m_NAtagCMSetChatBubbleBox
#------------------------------------------------------
# A2 22 设置引导成功 #tagCMSetGuideOK
class  tagCMSetGuideOK(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -2529,6 +2529,18 @@
    curPlayer.SetSetting(setting)
    return
#// A2 30 设置聊天气泡框 #tagCMSetChatBubbleBox
#
#struct    tagCMSetChatBubbleBox
#{
#    tagHead         Head;
#    BYTE        BubbleBoxType;    //气泡框类型
#};
def OnSetChatBubbleBox(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    PlayerControl.SetChatBubbleBox(curPlayer, clientData.BubbleBoxType)
    return
#// A2 29 设置小助手 #tagCMSetLittleHelper
#
#struct    tagCMSetLittleHelper
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, False)
##获得玩家威望值
def GetPrestige(curPlayer): return 0
def SetPrestige(curPlayer, value): return
@@ -5836,7 +5840,6 @@
#  @param value: 威望值
#  @return: 
def SetMergeWarRank(curPlayer, value):
    curPlayer.SetExAttr10(value, True, True)
    return
    
@@ -5844,7 +5847,7 @@
#  @param curPlayer: 玩家实例
#  @return: 威望值
def GetMergeWarRank(curPlayer):
    return curPlayer.GetExAttr10()
    return 0
## 设置玩家官爵星级