xdh
2018-12-13 4d66af400c9a3bd697af400977fb044b84ba034d
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -72,7 +72,7 @@
import PlayerFreeGoods
import ShopItemManage
import PlayerRecover
import Operate_EquipSuitCompose
import GameLogic_IceLode
import PlayerEquipDecompose
import PlayerCoat
import PlayerGreatMaster
@@ -105,10 +105,12 @@
import PlayerFlashSale
import PlayerFlashGiftbag
import PlayerCostRebate
import PlayerActTotalRecharge
import PlayerSpringSale
import PlayerFairyCeremony
import ChNetSendPack
import FamilyRobBoss
import FBHelpBattle
import PyGameData
import PlayerCoin
import PlayerGeTui
@@ -487,6 +489,8 @@
    
    #消费返利
    PlayerCostRebate.OnPlayerLogin(curPlayer)
    #累计充值
    PlayerActTotalRecharge.OnPlayerLogin(curPlayer)
    #限时特惠
    PlayerSpringSale.OnPlayerLogin(curPlayer)
    #限时礼包
@@ -521,7 +525,6 @@
    #仙魔之争
    GameLogic_XMZZ.OnXMZZLogin(curPlayer)
    PlayerOnlinePrize.OnPlayerLogin(curPlayer)
    GameLogic_SealDemon.NotifyFMTDouble(curPlayer)
    #装备分解
    PlayerEquipDecompose.PlayerLogin(curPlayer)
    #防沉迷
@@ -554,6 +557,8 @@
    SyncLittleHelper(curPlayer)
    # 聊天气泡框
    SyncChatBubbleBoxState(curPlayer)
    # 副本助战
    FBHelpBattle.DoPlayerLogin(curPlayer)
    
    curPlayer.SetState(0)   # 脱机挂恢复为正常上线
    curPlayer.SetFacePic(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线
@@ -684,8 +689,21 @@
    itemManager = curPlayer.GetItemManager()
    
    for packIndex in ChConfig.Def_PlayerLoginInitPackIndexList:
        itemManager.GetPack(packIndex).Sync_Refresh()
        rolePack = itemManager.GetPack(packIndex)
        rolePack.Sync_Refresh()
        # 刷下装备评分,仓库可以暂不处理,取出装备后登录触发刷新
        for i in xrange(rolePack.GetCount()):
            curItem = rolePack.GetAt(i)
            if curItem.IsEmpty():
                continue
            newScore = ItemCommon.CalcEquipGS(curItem)
            hisScore = ItemCommon.GetEquipGearScore(curItem)
            if hisScore != newScore:
                ItemCommon.SetEquipGearScore(curItem, newScore)
                GameWorld.Log("登录更新装备评分: packType=%s,i=%s,hisScore=%s,newScore=%s,itemID=%s,guid=%s"
                              % (packIndex, i, hisScore, newScore, curItem.GetItemTypeID(), curItem.GetGUID()), curPlayer.GetPlayerID())
    for packIndex in ChConfig.Def_VPackCnt_Dict.keys():
        ItemControler.Sync_VPackItem_Refresh(curPlayer, packIndex)
        
@@ -2489,7 +2507,7 @@
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_RoomID, 0)
    
    #下线召回宠物
    #PetControl.ReCallFightPet(curPlayer)
    PetControl.ReCallFightPet(curPlayer)
    
    PlayerTJG.CalcPlayerTJG(curPlayer, tick)
    
@@ -2562,8 +2580,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 +2594,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
@@ -3569,7 +3584,7 @@
#@return 返回值无意义
#@remarks 客户端封包响应 //03 10 退出副本#tagCExitFB
def __Func_ExitFB(curPlayer, tick):
    if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtNull:
    if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtNull and curPlayer.GetMapID() not in IpyGameDataPY.GetFuncEvalCfg("MapLine", 4):
        return
    
    GameWorld.Log('玩家 = %s , 主动离开副本' % (curPlayer.GetName()) , curPlayer.GetID())
@@ -3908,15 +3923,22 @@
        SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer , ChConfig.Def_SkillID_ReviveTired, tick, buffSkillLV)
        GameWorld.DebugLog('    复活疲劳BUff buffSkillLV=%s'%(buffSkillLV))
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IsAddReviveTired,0)
    #复活后清除角色身上的打BOSS和PK状态
    validTime = IpyGameDataPY.GetFuncCfg("PKConfig", 4) * 1000
    if PlayerState.IsInPKState(curPlayer):
        PlayerState.SetPKStateTick(curPlayer, tick - validTime)
    if PlayerState.IsInBossState(curPlayer):
        PlayerState.SetBossStateTick(curPlayer, tick- validTime)
    
    #重算属性
    playerControl = PlayerControl.PlayerControl(curPlayer)
    playerControl.RefreshAllState()
    
    #设置血量
    curPlayer.SetHP(curPlayer.GetMaxHP() * resetHpPercent / ChConfig.Def_MaxRateValue)
    curPlayer.SetMP(curPlayer.GetMaxMP() * resetMpPercent / ChConfig.Def_MaxRateValue)
    #curPlayer.SetMP(curPlayer.GetMaxMP() * resetMpPercent / ChConfig.Def_MaxRateValue)
    #护盾
    PlayerControl.SetProDef(curPlayer, PlayerControl.GetMaxProDef(curPlayer))
    
    #玩家复活后副本处理
    FBLogic.OnPlayerRebornOver(curPlayer, playerRebornType)
@@ -5093,6 +5115,9 @@
    # 领取消费返利奖励
    elif rewardType == ChConfig.Def_RewardType_CostRebate:
        PlayerCostRebate.OnGetCostRebateAward(curPlayer, dataEx)
    # 领取累计充值奖励
    elif rewardType == ChConfig.Def_RewardType_TotalRecharge:
        PlayerActTotalRecharge.OnGetTotalRechargeAward(curPlayer, dataEx)
    # 领取boss复活活动奖励
    elif rewardType == ChConfig.Def_RewardType_BossReborn:
        PlayerBossReborn.GetBossRebornActionAward(curPlayer, dataEx)
@@ -5111,6 +5136,10 @@
    # 功能开启奖励
    elif rewardType == ChConfig.Def_RewardType_OpenFunc:
        GameFuncComm.GetFuncOpenAward(curPlayer, dataEx)
    # 冰晶矿脉星级奖励
    elif rewardType == ChConfig.Def_RewardType_IceLodeStar:
        GameLogic_IceLode.GetIceLodeStarAward(curPlayer, dataEx)
#
#    # 充值豪礼奖励
#    elif rewardType == ShareDefine.Def_RewardType_GoldGift:
@@ -5628,7 +5657,7 @@
    sendPack.Speed = curPlayer.GetSpeed()
    sendPack.MoveType = moveType
    # NotifyAll 做过滤或者数量处理
    PlayerControl.PyNotifyAll(curPlayer, sendPack, False, -1)
    PlayerControl.PyNotifyAll(curPlayer, sendPack, False, 0)
    return
def GetDownloadAward(curPlayer, dataEx):