ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -163,6 +163,7 @@
import PlayerChangeJob
import PlayerGuaji
import PlayerFace
import PlayerChatBox
import PlayerXiangong
import PlayerMineArea
import PlayerActLoginNew
@@ -927,8 +928,6 @@
    PlayerLuckyTreasure.OnLogin(curPlayer)
    # 小助手
    SyncLittleHelper(curPlayer)
    # 聊天气泡框
    SyncChatBubbleBoxState(curPlayer)
    # 副本助战
    FBHelpBattle.DoPlayerLogin(curPlayer)
    # 聚魂
@@ -988,6 +987,7 @@
        pass
    
    else:
        PlayerChatBox.OnPlayerLogin(curPlayer)
        PlayerFace.OnPlayerLogin(curPlayer)
        PlayerXiangong.OnPlayerLogin(curPlayer)
        PlayerGubao.OnPlayerLogin(curPlayer)
@@ -3186,59 +3186,6 @@
        return
    
    curPlayer.SetSetting(setting)
    return
#// A2 30 设置聊天气泡框 #tagCMSetChatBubbleBox
#
#struct    tagCMSetChatBubbleBox
#{
#    tagHead         Head;
#    BYTE        BubbleBoxType;    //气泡框类型
#};
def OnSetChatBubbleBox(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    useBoxID = clientData.BubbleBoxType
    GameWorld.DebugLog("设置使用的聊天气泡框ID: useBoxID=%s" % useBoxID, curPlayer.GetPlayerID())
    ipyData = IpyGameDataPY.GetIpyGameData("ChatBubbleBox", useBoxID)
    if not ipyData:
        return
    curBoxState = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBubbleBoxState, useBoxID)
    if not curBoxState:
        needLV = ipyData.GetNeedLV()
        if needLV and curPlayer.GetLV() < needLV:
            GameWorld.DebugLog("    等级不足,无法使用该气泡框!needLV=%s" % needLV, curPlayer.GetPlayerID())
            return
        needVIPLVGift = ipyData.GetNeedVIPLVGift() # 兼容已购买VIP礼包的老号用
        if needVIPLVGift:
            record = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_VipAwardRecord)
            hasBuy = record & pow(2, needVIPLVGift)
            if not hasBuy:
                GameWorld.DebugLog("    未购买VIP礼包,无法使用该气泡框!needVIPLVGift=%s" % needVIPLVGift, curPlayer.GetPlayerID())
                return
    PlayerControl.SetChatBubbleBox(curPlayer, useBoxID)
    return
def DoActivateChatBubbleBox(curPlayer, boxID):
    ## 激活聊天气泡框
    ipyData = IpyGameDataPY.GetIpyGameData("ChatBubbleBox", boxID)
    if not ipyData:
        return
    GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_ChatBubbleBoxState, boxID, 1)
    SyncChatBubbleBoxState(curPlayer)
    return True
def SyncChatBubbleBoxState(curPlayer):
    ## 同步聊天气泡框状态
    boxState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ChatBubbleBoxState % 0)
    if not boxState:
        return
    boxStatePack = ChPyNetSendPack.tagMCChatBubbleBoxState()
    boxStatePack.BoxState = boxState
    NetPackCommon.SendFakePack(curPlayer, boxStatePack)
    return
#// A2 29 设置小助手 #tagCMSetLittleHelper