| | |
| | | import SkillShell
|
| | | import ChConfig
|
| | | import PlayerHorse
|
| | | import PlayerTeam
|
| | | import SkillCommon
|
| | | import MirrorAttack
|
| | | import GameMap
|
| | | import FBLogic
|
| | | import GameWorldProcess
|
| | |
| | | import PlayerBillboard
|
| | | import GameServerRefresh
|
| | | import IPY_GameWorld
|
| | | import PlayerGameWallow
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import DataRecordPack
|
| | |
| | | import GameFuncComm
|
| | | import IpyGameDataPY
|
| | | import PyGameData
|
| | | import PlayerMagicWeapon
|
| | | import PlayerFeastTravel
|
| | | import PlayerActTurntable
|
| | | import GameLogic_SealDemon
|
| | | import GameLogic_ZhuXianBoss
|
| | | import GameLogic_CrossDemonKing
|
| | | import PlayerVip
|
| | | import PlayerCostRebate
|
| | | import PlayerActLunhuidian
|
| | | import PlayerActGarbageSorting
|
| | |
| | | import CrossRealmPlayer
|
| | | import CrossPlayerData
|
| | | import ChNetSendPack
|
| | | import PlayerAssist
|
| | | import PlayerState
|
| | | import PlayerGubao
|
| | | import PlayerOnline
|
| | |
| | | #刷新技能剩余时间
|
| | | SkillCommon.RefreshAllSkillRemainTime(curPlayer, tick)
|
| | |
|
| | | #队伍玩家退出地图
|
| | | PlayerTeam.TeamPlayerLeaveMap(curPlayer, tick, isDisconnect)
|
| | |
|
| | | #退出采集
|
| | | NPCCommon.ClearCollectNPC(curPlayer)
|
| | |
|
| | |
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromFBLineID, lineID)
|
| | | GameWorld.DebugLog("进入副本时,最后一次离开的可返回的副本ID更新!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
|
| | |
|
| | | # 离开地图
|
| | | PlayerAssist.OnPlayerLeaveMap(curPlayer)
|
| | | |
| | | # 从副本中切图
|
| | | if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
|
| | | #默认回满血
|
| | |
| | |
|
| | | if not FBLogic.OnEnterFBEvent(curPlayer, mapID, lineID, tick):
|
| | | GameWorld.DebugLog(" OnEnterFBEvent False!", curPlayer.GetPlayerID())
|
| | | if mapID in [ChConfig.Def_FBMapID_CrossBattlefield]:
|
| | | NotifyCode(curPlayer, "GeRen_chenxin_268121")
|
| | | else:
|
| | | NotifyCode(curPlayer, "SingleEnterDefaul")
|
| | | NotifyCode(curPlayer, "SingleEnterDefaul")
|
| | | return
|
| | |
|
| | | # 需要动态分布线路的地图,发送到跨服服务器进行分配
|
| | | if mapID in ChConfig.Def_CrossDynamicLineMap:
|
| | | extendInfo = {}
|
| | | if mapID == ChConfig.Def_FBMapID_CrossDemonKing:
|
| | | bossID = GameLogic_CrossDemonKing.GetCurFBLineBOSSID(mapID, lineID)
|
| | | if not bossID:
|
| | | return
|
| | | extendInfo["BossID"] = bossID
|
| | | |
| | | msgDict = {"PlayerID":curPlayer.GetPlayerID(), "MapID":mapID, "FuncLineID":lineID, "LV":curPlayer.GetLV()}
|
| | | if extendInfo:
|
| | | msgDict.update(extendInfo)
|
| | |
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | if CheckMoveToFB(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData, tick) != ShareDefine.EntFBAskRet_OK:
|
| | | return
|
| | | # if mapID == ChConfig.Def_FBMapID_XMZZ:
|
| | | # #仙魔之争
|
| | | # GameLogic_XMZZ.XMZZStartFight(curPlayer)
|
| | | # return
|
| | | if posX == 0 and posY == 0:
|
| | | ipyEnterPosInfo = FBCommon.GetFBLineEnterPosInfo(mapID, lineID, fbLineIpyData)
|
| | | retPos = FBLogic.OnGetFBEnterPos(curPlayer, mapID, lineID, ipyEnterPosInfo, tick)
|
| | |
| | | if isSendToGameServer or mapID in ChConfig.Def_MapID_SendToGameServer \
|
| | | or mapID in ReadChConfig.GetEvalChConfig("MapID_SendToGameServer"):
|
| | | extendParamList = []
|
| | | if mapID == ChConfig.Def_FBMapID_SealDemon:
|
| | | newbielineList = IpyGameDataPY.GetFuncEvalCfg('SealDemonNewbieLine', 1)
|
| | | # 新手线路特殊处理,直接进入
|
| | | if lineID in newbielineList:
|
| | | GameWorld.DebugLog("封魔坛虚拟线路只能通过自定义场景进入挑战!")
|
| | | return
|
| | | else:
|
| | | bossID = GameLogic_SealDemon.CurFBLineBOSSID(lineID)
|
| | | extendParamList = [bossID]
|
| | | elif mapID == ChConfig.Def_FBMapID_ZhuXianBoss:
|
| | | bossID = GameLogic_ZhuXianBoss.CurFBLineBOSSID(lineID)
|
| | | extendParamList = [bossID, -1]
|
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % ChConfig.Def_FBMapID_ZhuXianBoss)
|
| | | if enterCnt >= FBCommon.GetEnterFBMaxCnt(curPlayer, ChConfig.Def_FBMapID_ZhuXianBoss):
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhuXianBossHelpCnt):
|
| | | extendParamList = [bossID, curPlayer.GetFamilyID()]
|
| | | elif mapID == ChConfig.Def_FBMapID_DemonKing:
|
| | | bossID = GameLogic_CrossDemonKing.GetCurFBLineBOSSID(mapID, lineID)
|
| | | extendParamList = [bossID]
|
| | | elif mapID in ChConfig.Def_MapID_LineIDToPropertyID:
|
| | | if mapID in ChConfig.Def_MapID_LineIDToPropertyID:
|
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID)
|
| | | extendParamList = [enterCnt]
|
| | | elif mapID in ChConfig.MirrorBattleMapIDList:
|
| | |
| | | # @return 无意义
|
| | | # @remarks 刷新玩家时钟,切地图玩家时钟记录清空,处理相应逻辑
|
| | | def RefreshPlayerTick(curPlayer):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | |
| | | #防沉迷切线时间
|
| | | PlayerGameWallow.DoLogic_WallowOnlineTime(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | #---钱不够 返回假如果需要提示的话 提示信息---
|
| | | if needMoneyCount < Price:
|
| | | if needNotify and notifyCode:
|
| | | NotifyCode(curPlayer, notifyCode)
|
| | | pass#NotifyCode(curPlayer, notifyCode)
|
| | | GameWorld.DebugLog("货币不足: TYPE_Price=%s, Price=%s, curMoneyCount=%s" % (TYPE_Price, Price, needMoneyCount))
|
| | | return False
|
| | |
|
| | |
| | | gold = curPlayer.GetGold() # 元宝
|
| | |
|
| | | if goldPaper + gold < Price: # 钱不够
|
| | | if needNotify:
|
| | | NotifyCode(curPlayer, "GoldErr")
|
| | | #if needNotify:
|
| | | # NotifyCode(curPlayer, "GoldErr")
|
| | | return []
|
| | |
|
| | | if goldPaper >= Price: # 只用礼券就够了
|
| | |
| | | __PayMoneyAfter(curPlayer, type_Price, lostMoney, costType, infoDict, quantity, costVIPGold)
|
| | |
|
| | | #通知客户端失去金钱
|
| | | if isNotify:
|
| | | if type_Price == ShareDefine.TYPE_Price_PayCoin:
|
| | | NotifyCode(curPlayer, "LostMoney", [type_Price, str(round(lostMoney/100.0, 2))])
|
| | | else:
|
| | | NotifyCode(curPlayer, "LostMoney", [type_Price, lostMoney])
|
| | | #if isNotify:
|
| | | # if type_Price == ShareDefine.TYPE_Price_PayCoin:
|
| | | # NotifyCode(curPlayer, "LostMoney", [type_Price, str(round(lostMoney/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "LostMoney", [type_Price, lostMoney])
|
| | | return True
|
| | |
|
| | | ## 付款以后后续操作
|
| | |
| | | if priceType == ShareDefine.TYPE_Price_PayCoinDay:
|
| | | priceType = ShareDefine.TYPE_Price_PayCoin
|
| | |
|
| | | if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | | #通知客户端得到金钱
|
| | | if priceType == ShareDefine.TYPE_Price_PayCoin:
|
| | | NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | else:
|
| | | NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | #if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | | # #通知客户端得到金钱
|
| | | # if priceType == ShareDefine.TYPE_Price_PayCoin:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | __GiveMoneyAfter(curPlayer, priceType, value, giveType, addDataDict)
|
| | |
|
| | | if befMoney == 0:
|
| | |
| | |
|
| | | def GetFabaoAddPoint(curPlayer):
|
| | | #法宝额外增加玩家每级获得的灵根点
|
| | | mwID = IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 1)
|
| | | if not PlayerMagicWeapon.GetIsActiveMagicWeapon(curPlayer, mwID, lv=1):
|
| | | return 0
|
| | | return IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 2)
|
| | | return 0
|
| | |
|
| | | def DoAddPointOpen(curPlayer):
|
| | | '''加点功能开启'''
|
| | |
| | | DoPlayerDead(curPlayer)
|
| | |
|
| | | GameObj.ClearPyPlayerState(curPlayer)
|
| | | |
| | | MirrorAttack.OnPlayerDead(curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | def Sync_ExpRateChange(curPlayer):
|
| | | totalExpRate = GetPlayerExpRate(curPlayer)
|
| | | fightExpRate = curPlayer.GetFightExpRate() # 系统及功能累加
|
| | | fightExpRate += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_FightExpRate) # VIP加成
|
| | | fightExpRate += PlayerGoldInvest.GetAddFightExpRate(curPlayer)
|
| | |
|
| | | actExpRateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ExpRate, {})# 多倍经验活动加成
|