| | |
| | | import GameMap
|
| | | import ChConfig
|
| | | import EventShell
|
| | | import SkillShell
|
| | | import BuffSkill
|
| | | import PlayerEventCounter
|
| | | import PlayerTeam
|
| | |
| | | import PlayerLoginDayAward
|
| | | import PlayerGodWeapon
|
| | | import PlayerWorldAverageLv
|
| | | import GameLogic_ManorWar
|
| | | import PlayerGoldInvest
|
| | | import PlayerActivity
|
| | | import PlayerTeHui
|
| | | import FBCommon
|
| | | import HighLadderTube
|
| | | import PlayerBindJadeWheel
|
| | | import BossHurtMng
|
| | | import PlayerAction
|
| | | import PlayerWishingWell
|
| | | import PlayerAttrFruit
|
| | | import PlayerSuccess
|
| | | import PlayerDienstgrad
|
| | | import PlayerMixLoginDayAward
|
| | | import PlayerFreeGoods
|
| | | import ShopItemManage
|
| | | import PlayerRecover
|
| | | import Operate_EquipSuitCompose
|
| | | import GameLogic_IceLode
|
| | | import PlayerEquipDecompose
|
| | | import PlayerCoat
|
| | | import PlayerQQ
|
| | | import PlayerCostVIP
|
| | | import PlayerMergeKing
|
| | | import PlayerMergePK
|
| | | import PlayerGreatMaster
|
| | | import PlayerGatherSoul
|
| | | import PlayerCrossRealmPK
|
| | | import GameFuncComm
|
| | | import PlayerMagicWeapon
|
| | | import GameLogic_TrialTower
|
| | |
| | | import PlayerBossReborn
|
| | | import Operate_EquipWash
|
| | | import PlayerTreasure
|
| | | import PlayerMergeEvent
|
| | | import GameLogic_GodArea
|
| | | import PlayerRune
|
| | | import PlayerFamilyRedPacket
|
| | |
| | | import QuestCommon
|
| | | import PlayerTJG
|
| | | import GameLogic_XMZZ
|
| | | import GameLogic_SealDemon
|
| | | import GameLogic_Dogz
|
| | | import PlayerFlashSale
|
| | | import PlayerFlashGiftbag
|
| | | import PlayerCostRebate
|
| | | import PlayerActTotalRecharge
|
| | | import PlayerSpringSale
|
| | | import PlayerFairyCeremony
|
| | | import ChNetSendPack
|
| | | import FamilyRobBoss
|
| | | import FBHelpBattle
|
| | | import PyGameData
|
| | | import PlayerCoin
|
| | | import PlayerGeTui
|
| | |
| | | #同步GameServer自己的地图ID
|
| | | curPlayer.Sync_GameServer_MapID()
|
| | |
|
| | | # 屏蔽跨服下关闭和子服重复的数据的发送 pushsend接口, notifyall正常发送
|
| | | # !!!必要发送的数据要注意位置
|
| | | if GameWorld.IsCrossServer():
|
| | | curPlayer.SetForbiddenSyncClientState(True)
|
| | | |
| | | SyncGuideState(curPlayer)
|
| | |
|
| | | #初始化玩家背包
|
| | |
| | | #通知玩家物品信息
|
| | | __Sync_PackDetel(curPlayer)
|
| | |
|
| | | #更新主服ID信息
|
| | | #UpdatePlayerServerGroupID(curPlayer)
|
| | | #更新服务器组ID
|
| | | PlayerControl.UpdPlayerServerGroupID(curPlayer)
|
| | |
|
| | | #上线学习技能
|
| | | SkillCommon.PlayerLoginCheckLearnSkill(curPlayer)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FuncChangeLineID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_HighChangeLineID, 0)
|
| | | #GameWorld.DebugLog("离线超过10秒重置切线临时保存的相关记录值!leaveServerSecond=%s" % leaveServerSecond, curPlayer.GetPlayerID())
|
| | | |
| | | # 离线过久恢复为非跨服状态
|
| | | if PlayerControl.GetCrossRealmState(curPlayer):
|
| | | PlayerControl.SetCrossRealmState(curPlayer, 0)
|
| | | |
| | | # 合服首登处理
|
| | | __DoMixServerFirstLogin(curPlayer)
|
| | | PlayerBillboard.BillboardOnLogin(curPlayer)
|
| | |
| | | Operate_EquipStone.OnLogin(curPlayer)
|
| | |
|
| | | #大师
|
| | | #PlayerGreatMaster.MasterOnLogin(curPlayer)
|
| | | PlayerGreatMaster.MasterOnLogin(curPlayer)
|
| | |
|
| | | #֪ͨVIP
|
| | | PlayerVip.DoOnLogin(curPlayer, tick)
|
| | |
| | | #
|
| | | # # ʱװ
|
| | | # PlayerCoat.OnLogin_Coat(curPlayer)
|
| | | #
|
| | | # # 跨服匹配
|
| | | # PlayerMergePK.MergePKOnLogin(curPlayer)
|
| | | # PlayerMergeKing.MergePKOnLogin(curPlayer)
|
| | | |
| | | # 跨服PK
|
| | | PlayerCrossRealmPK.DoPlayerLogin(curPlayer)
|
| | |
|
| | | # 自定义货币值同步
|
| | | PlayerControl.NotifyPlayerAllCurrency(curPlayer)
|
| | |
| | |
|
| | | #消费返利
|
| | | PlayerCostRebate.OnPlayerLogin(curPlayer)
|
| | | #累计充值
|
| | | PlayerActTotalRecharge.OnPlayerLogin(curPlayer)
|
| | | #限时特惠
|
| | | PlayerSpringSale.OnPlayerLogin(curPlayer)
|
| | | #限时礼包
|
| | | PlayerFlashGiftbag.OnPlayerLogin(curPlayer)
|
| | | |
| | | #限时抢购
|
| | | PlayerFlashSale.OnPlayerLogin(curPlayer)
|
| | | # # 消费VIP
|
| | | # PlayerCostVIP.CostVIPOnLogin(curPlayer, tick)
|
| | | #
|
| | |
| | | #仙魔之争
|
| | | GameLogic_XMZZ.OnXMZZLogin(curPlayer)
|
| | | PlayerOnlinePrize.OnPlayerLogin(curPlayer)
|
| | | GameLogic_SealDemon.NotifyFMTDouble(curPlayer)
|
| | | #装备分解
|
| | | PlayerEquipDecompose.PlayerLogin(curPlayer)
|
| | | #防沉迷
|
| | |
| | | PlayerDogz.OnPlayerLogin(curPlayer)
|
| | | # 骑宠
|
| | | FamilyRobBoss.OnPlayerLogin(curPlayer)
|
| | | |
| | | # 绑玉转盘
|
| | | PlayerBindJadeWheel.OnLogin(curPlayer)
|
| | | # 许愿池
|
| | | PlayerWishingWell.OnLogin(curPlayer)
|
| | | # 上线查询一次充值订单
|
| | | curPlayer.SendDBQueryRecharge()
|
| | | |
| | | # 小助手
|
| | | SyncLittleHelper(curPlayer)
|
| | | # 聊天气泡框
|
| | | SyncChatBubbleBoxState(curPlayer)
|
| | | # 副本助战
|
| | | FBHelpBattle.DoPlayerLogin(curPlayer)
|
| | | # 聚魂
|
| | | PlayerGatherSoul.PlayerLogin(curPlayer)
|
| | | curPlayer.SetState(0) # 脱机挂恢复为正常上线
|
| | | curPlayer.SetFacePic(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线
|
| | | tjgTime = PlayerTJG.GetTJGTime(curPlayer)
|
| | |
| | | # 如果被禁言的,上线同步前端
|
| | | if curPlayer.GetGMForbidenTalk():
|
| | | curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ForbidenTalk, curPlayer.GetGMForbidenTalk(), False)
|
| | | |
| | | # 屏蔽跨服下关闭和子服重复的数据的发送 pushsend接口, notifyall正常发送
|
| | | # !!!必要发送的数据要注意位置
|
| | | if GameWorld.IsCrossServer():
|
| | | curPlayer.SetForbiddenSyncClientState(False)
|
| | | PlayerControl.SetCrossRealmState(curPlayer, 1) # 因为主服上传数据之前该值为1,所以登录跨服后在跨服服务器要设置为1
|
| | | |
| | | return
|
| | |
|
| | |
|
| | |
| | | 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)
|
| | |
|
| | |
| | | # @remarks 上线时通知离线时间(离线挂机功能)
|
| | | def __Sync_PlayerOffline(curPlayer, tick):
|
| | | #---等级限制---
|
| | | if GameWorld.IsMergeServer():
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | PlayerTJG.TJGDeadOffline(curPlayer)
|
| | |
|
| | |
| | | # if curPlayer.GetLV() < lvLimit:
|
| | | # return
|
| | | #
|
| | | # if GameWorld.IsMergeServer():
|
| | | # if GameWorld.IsCrossServer():
|
| | | # return
|
| | | #
|
| | | # #当前离线时间(分)
|
| | |
| | | # # curPlayer.Syn_OfflineTimeRefresh(int(curOfflineMinutes))
|
| | | # curPlayer.Syn_OfflineTimeQueryResult()
|
| | | #===============================================================================
|
| | | return
|
| | |
|
| | | def UpdatePlayerServerGroupID(curPlayer):
|
| | | # 更新自己的服务器组ID, 跨服服务器不处理
|
| | | if GameWorld.IsMergeServer():
|
| | | return
|
| | | serverGroupID = GameWorld.GetServerGroupID()
|
| | | if not serverGroupID:
|
| | | return
|
| | | playerServerGroupID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ServerGroupID)
|
| | | if playerServerGroupID != serverGroupID:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ServerGroupID, serverGroupID)
|
| | | GameWorld.DebugLog("更新玩家所属服务器组ID: serverGroupID=%s" % serverGroupID)
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | #这里只做初始化逻辑
|
| | | #在玩家切换场景的时候, 不会调用到这里
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | InitLoginPlayer(curPlayer, tick)
|
| | | DoPlayerLogin(curPlayer, tick)
|
| | | try:
|
| | | InitLoginPlayer(curPlayer, tick)
|
| | | DoPlayerLogin(curPlayer, tick)
|
| | | |
| | | #锁住玩家, 等到读取地图成功, 再解锁
|
| | | curPlayer.SetCanMove(False)
|
| | | |
| | | #登陆发图形验证码
|
| | | PlayerAutoCheckOnline.PlayerLoginCaptcha(curPlayer, tick)
|
| | | except:
|
| | | curPlayer.Kick(IPY_GameWorld.disWaitForPlayerLoinError)
|
| | | import traceback
|
| | | GameWorld.ErrLog("玩家上线逻辑错误~~~~~\r\n%s" % traceback.format_exc())
|
| | | if GameWorld.GetGameWorld().GetDebugLevel():
|
| | | raise Exception("玩家上线逻辑错误~~~~\r\n%s" % traceback.format_exc())
|
| | | return
|
| | |
|
| | | #锁住玩家, 等到读取地图成功, 再解锁
|
| | | curPlayer.SetCanMove(False)
|
| | | |
| | | #登陆发图形验证码
|
| | | PlayerAutoCheckOnline.PlayerLoginCaptcha(curPlayer, tick)
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##C++封包触发, 玩家切换地图的时候, 在本地图登录
|
| | |
| | |
|
| | | #设置阵营
|
| | | if curPlayer.GetFaction() != ChConfig.CampType_Neutral \
|
| | | and GameWorld.GetMap().GetMapID() not in ChConfig.Def_MapID_NeedCamp \
|
| | | and GameWorld.GetMap().GetMapID() not in ReadChConfig.GetEvalChConfig("MapID_NeedCamp"):
|
| | | and FBCommon.GetRecordMapID(GameWorld.GetMap().GetMapID()) not in ChConfig.Def_MapID_NeedCamp:
|
| | | #重置阵营
|
| | | curPlayer.SetFaction(ChConfig.CampType_Neutral)
|
| | | BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_SkillID_Justice, tick)
|
| | |
| | | import traceback
|
| | | GameWorld.ErrLog("玩家下线逻辑错误~~~~~\r\n%s" % traceback.format_exc())
|
| | | if GameWorld.GetGameWorld().GetDebugLevel():
|
| | | raise Exception("玩家下线~~~~~\r\n%s" % traceback.format_exc())
|
| | | raise Exception("玩家下线逻辑错误~~~~~\r\n%s" % traceback.format_exc())
|
| | |
|
| | | #调用底层使玩家下线
|
| | | curPlayer.DoDisconnect(tick)
|
| | |
| | |
|
| | | GameWorld.Log("PlayerDisconnect!" , curPlayer.GetPlayerID())
|
| | |
|
| | | PlayerMergeEvent.BroadcastMergePlayerEvent()
|
| | | #下线了,将存储在字典中的真实XP值,设置给玩家,完成通知和存储
|
| | | #curPlayer.SetXP(curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_RecordXPValue))
|
| | | #######################################################################
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_RoomID, 0)
|
| | |
|
| | | #下线召回宠物
|
| | | #PetControl.ReCallFightPet(curPlayer)
|
| | | PetControl.ReCallFightPet(curPlayer)
|
| | |
|
| | | PlayerTJG.CalcPlayerTJG(curPlayer, tick)
|
| | |
|
| | |
| | | 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
|
| | | #
|
| | | #struct tagCMSetLittleHelper
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE SetNum; // 托管功能设置编号1~20,每个编号对应的托管功能前端自定义
|
| | | # DWORD Value1; // 自定义值1
|
| | | # DWORD Value2; // 自定义值2
|
| | | # DWORD Value3; // 自定义值3
|
| | | # DWORD Value4; // 自定义值4
|
| | | # DWORD Value5; // 自定义值5
|
| | | # DWORD Value6; // 自定义值6
|
| | | #};
|
| | | def OnSetLittleHelper(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | setNum = clientData.SetNum
|
| | | if setNum > ChConfig.LittleHelperSetNumCount:
|
| | | GameWorld.ErrLog("小助手不支持该设置编号! setNum=%s" % setNum, curPlayer.GetPlayerID())
|
| | | return
|
| | | for i in xrange(1, ChConfig.LittleHelperValueCount + 1):
|
| | | if not hasattr(clientData, "Value%s" % i):
|
| | | GameWorld.ErrLog("小助手不支持该值编号设置! setNum=%s,value%s" % (setNum, i), curPlayer.GetPlayerID())
|
| | | continue
|
| | | value = getattr(clientData, "Value%s" % i)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_LittleHelperValue % (setNum, i), value)
|
| | | GameWorld.DebugLog("小助手值设置: setNum=%s,value%s=%s" % (setNum, i, value), curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | def SyncLittleHelper(curPlayer):
|
| | | ## 同步小助手设置,仅有值的同步
|
| | | funcSetList = []
|
| | | for setNum in xrange(ChConfig.LittleHelperSetNumCount + 1):
|
| | | funcSet = None
|
| | | for i in xrange(1, ChConfig.LittleHelperValueCount + 1):
|
| | | value = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_LittleHelperValue % (setNum, i))
|
| | | if not value:
|
| | | continue
|
| | | if not funcSet:
|
| | | funcSet = ChPyNetSendPack.tagMCLittleHelperFuncSet()
|
| | | funcSet.SetNum = setNum
|
| | | if hasattr(funcSet, "Value%s" % i):
|
| | | setattr(funcSet, "Value%s" % i, value)
|
| | | if funcSet:
|
| | | funcSetList.append(funcSet)
|
| | | |
| | | if not funcSetList:
|
| | | return
|
| | | |
| | | setPack = ChPyNetSendPack.tagMCLittleHelperSet()
|
| | | setPack.FuncSetList = funcSetList
|
| | | setPack.FuncSetCount = len(setPack.FuncSetList)
|
| | | NetPackCommon.SendFakePack(curPlayer, setPack)
|
| | | return
|
| | |
|
| | | #// A2 22 设置引导成功 #tagCMSetGuideOK
|
| | |
| | | #@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())
|
| | |
| | | #@param mapBornPlace 复活位置,默认0为原地
|
| | | #@return 返回值无意义
|
| | | #@remarks 自定义函数, 玩家复活
|
| | | def PlayerRebornByType(curPlayer, playerRebornType, tick, mapBornPlace=0):
|
| | | def PlayerRebornByType(curPlayer, playerRebornType, tick, mapBornPlace=0, isAddSuperBuff=True):
|
| | | curPlayerID = curPlayer.GetID()
|
| | | curVipLv = curPlayer.GetVIPLv()
|
| | |
|
| | |
| | | #复活冷却时间(秒)
|
| | | rebornTime = GetRebronTime(curPlayer, playerRebornType)
|
| | | #冷却时间到了
|
| | | if not CanRebornByTimeOver(curPlayer, rebornTime):
|
| | | if playerRebornType != ChConfig.rebornType_System and not CanRebornByTimeOver(curPlayer, rebornTime):
|
| | | PlayerControl.NotifyCode(curPlayer, 'RebornCD')
|
| | | return False
|
| | |
|
| | |
| | | FBLogic.OnResetFBRebornPlacePos(curPlayer, mapBornPlace, tick)
|
| | |
|
| | | #复活加无敌Buff
|
| | | SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer , ChConfig.Def_SkillID_LimitSuperBuff, tick)
|
| | | if isAddSuperBuff:
|
| | | SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer , ChConfig.Def_SkillID_LimitSuperBuff, tick)
|
| | | #复活疲劳BUff
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_IsAddReviveTired):
|
| | | findBuff = SkillCommon.FindBuffByID(curPlayer, ChConfig.Def_SkillID_ReviveTired)[0]
|
| | |
| | | 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)
|
| | |
| | | PlayerControl.NotifyCode(curPlayer, "04BBF813-7A30-47A8-927DE1ACCC4F378E")
|
| | | return
|
| | |
|
| | | #===============================================================================
|
| | | # isFreedomTransBuff = SkillCommon.GetPlayerBuffBySkillTypeID(curPlayer, ShareDefine.Def_FreedomTransBuffID)
|
| | | # if not PlayerControl.IsPlayerInFight(curPlayer):
|
| | | # |
| | | # if (transportType == ChConfig.Def_Transport_Type_BigMap) or (not isFreedomTransBuff):
|
| | | # #传送支付处理
|
| | | # |
| | | # if not PayForTransport(curPlayer, transportType, isAutoBuy):
|
| | | # return
|
| | | #===============================================================================
|
| | | #是任务传送,VIP等级不够,且传送符不足,不处理
|
| | | if transportType == ChConfig.Def_Transport_Type_Mission and \
|
| | | not TransportVipLvRestrict(curPlayer, transportType) and \
|
| | |
| | | # @param transportType 传送类型
|
| | | # @return 是否vip等级限制
|
| | | def TransportVipLvRestrict(curPlayer, transportType):
|
| | | |
| | | #大地图标记传送不能体验无限飞buff功能
|
| | | if transportType != ChConfig.Def_Transport_Type_BigMap:
|
| | | if SkillCommon.GetPlayerBuffBySkillTypeID(curPlayer, ShareDefine.Def_FreedomTransBuffID):
|
| | | #有无限飞buff
|
| | | return True
|
| | | return PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_FreeTransport)
|
| | |
|
| | |
|
| | |
| | | #@remarks 离线经验兑换
|
| | | def PlayerExpExchange(index, curPackData, tick):
|
| | | # 跨服服务器功能限制
|
| | | if GameWorld.IsMergeServer():
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | |
|
| | | #兑换公式字典
|
| | |
| | | # 领取消费返利奖励
|
| | | 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)
|
| | |
| | | # 领取分包下载奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_DownLoad:
|
| | | GetDownloadAward(curPlayer, dataEx)
|
| | | #
|
| | | # # 充值豪礼奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_GoldGift:
|
| | | # PlayerGoldGift.GetPlayerGoldGift(curPlayer, dataEx)
|
| | | #
|
| | | # # 累计签到奖励
|
| | | # #elif rewardType == ShareDefine.Def_RewardType_DaySign:
|
| | | # # PlayerSignDay.GiveSignCntAward(curPlayer, dataEx)
|
| | | #
|
| | | # # 天天首充奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_DailyGold:
|
| | | # PlayerGoldGift.GetPlayerDailyGoldChargeGift(curPlayer)
|
| | | #
|
| | | # # 单日充值多选一礼包
|
| | | # elif rewardType == ShareDefine.Def_RewardType_SingleGoldGift:
|
| | | # giftLV = 0 # 默认第一档0
|
| | | # if dataExStr:
|
| | | # try:
|
| | | # giftLV = int(dataExStr)
|
| | | # except:
|
| | | # GameWorld.ErrLog("单日充值多选一礼包奖励档错误!%s" % dataExStr)
|
| | | # PlayerGoldGift.GetSingleGoldGift(curPlayer, dataEx, giftLV, 0)
|
| | | # |
| | | # # 当日充值无限领取礼包
|
| | | # elif rewardType == ShareDefine.Def_RewardType_UnlimitedGoldGift:
|
| | | # PlayerGoldGift.GetSingleGoldGift(curPlayer, 0, 0, 1) |
| | | # |
| | | # # 登陆签到奖励
|
| | | # #elif rewardType == ShareDefine.Def_RewardType_DayLoginSign:
|
| | | # # PlayerSignDay.GetDaySignAward(curPlayer, dataEx)
|
| | | # |
| | | # # 跨服PK奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_MergePKAward:
|
| | | # PlayerMergePK.OnQueryMergePKAward(curPlayer, dataEx, GameWorld.ToIntDef(dataExStr), tick)
|
| | | # |
| | | # # 王者争霸全服荣耀奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_ServerHonour:
|
| | | # PlayerMergeKing.GetMergeKingAward_ServerHonour(curPlayer)
|
| | | # |
| | | # # 王者争霸晋级排名奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_MergeKingRank:
|
| | | # PlayerMergeKing.GetMergeKingAward_Rank(curPlayer)
|
| | | # |
| | | # # 王者争霸竞猜积分奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_MergeKingSupport:
|
| | | # PlayerMergeKing.GetMergeKingAward_Support(curPlayer, dataEx, tick)
|
| | | # |
| | | # # QQ成长礼包奖励
|
| | | # elif rewardType in [ShareDefine.Def_RewardType_QQUpYellow, ShareDefine.Def_RewardType_QQUpBlue]:
|
| | | # PlayerQQ.GetQQUpReward(curPlayer, rewardType, dataEx)
|
| | | # |
| | | # # QQ新手礼包奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_QQNewMan:
|
| | | # PlayerQQ.GetQQNewManAward(curPlayer, rewardType, dataEx)
|
| | | # |
| | | # # QQ每日礼包奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_QQDayGift:
|
| | | # PlayerQQ.GetQQDayGift(curPlayer, rewardType, dataEx)
|
| | | # |
| | | # # Qzone成长礼包奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_QzoneUp:
|
| | | # PlayerQQ.GetQzoneUpReward(curPlayer, rewardType, dataEx)
|
| | | # |
| | | # # Qzone新手礼包奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_QzoneNewMan:
|
| | | # PlayerQQ.GetQzoneNewManAward(curPlayer, rewardType, dataEx)
|
| | | # |
| | | # # Qzone每日礼包奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_QzoneDayGift:
|
| | | # PlayerQQ.GetQzoneDayGift(curPlayer, rewardType, dataEx)
|
| | | # |
| | | # # 消费VIP等级奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_CostVIPLV:
|
| | | # PlayerCostVIP.GetCostVIPAward(curPlayer, dataEx)
|
| | | # |
| | | # # 消费VIP成长奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_CostVIPGrowUp:
|
| | | # PlayerCostVIP.GetVIPGrowUpAward(curPlayer, dataEx)
|
| | | # # 转生领奖
|
| | | # elif rewardType == ShareDefine.Def_RewardType_Reincarnation:
|
| | | # PlayerReincarnation.GetReincarnationAward(curPlayer, dataEx)
|
| | | # # 跨服boss首次参与奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_MergeBossFirstJoinAward:
|
| | | # GameLogic_MergeBoss.OnGetMergeBossFirstJoinAward(curPlayer)
|
| | | # # 悬赏任务积分奖励
|
| | | # elif rewardType == ShareDefine.Def_RewardType_ArrestTaskAward:
|
| | | # PlayerArrestTask.OnGetArrestPointAward(curPlayer, dataEx)
|
| | | # 领取许愿池奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_WishingWell:
|
| | | PlayerWishingWell.DoGetWishingAward(curPlayer)
|
| | | # 功能开启奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_OpenFunc:
|
| | | GameFuncComm.GetFuncOpenAward(curPlayer, dataEx)
|
| | | # 冰晶矿脉星级奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_IceLodeStar:
|
| | | GameLogic_IceLode.GetIceLodeStarAward(curPlayer, dataEx)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | |
| | | sendMsg = "%s" % str([tagMapID, tagLineID, npcIDList])
|
| | | curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_NPCCnt, 0,
|
| | | 'NPCCnt', sendMsg, len(sendMsg))
|
| | | return
|
| | |
|
| | |
|
| | | ## 跨服赛报名状态
|
| | | # @param index 玩家索引
|
| | | # @param tick 当前时间
|
| | | # @return None
|
| | | def SendRegisterState(curPlayer, state):
|
| | | resultPack = ChPyNetSendPack.tagMergeWarRegisterState()
|
| | | resultPack.Clear()
|
| | | |
| | | resultPack.RegisterState = state
|
| | | NetPackCommon.SendFakePack(curPlayer, resultPack)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | 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):
|