| | |
| | | import OperControlManager
|
| | | import PlayerFamily
|
| | | import ShareDefine
|
| | | import PlayerViewCache
|
| | | import PlayerBillboard
|
| | | import GameServerRefresh
|
| | | import IPY_GameWorld
|
| | |
| | | import PlayerWorldAverageLv
|
| | | import PlayerActivity
|
| | | import FBCommon
|
| | | import PlayerViewCacheTube
|
| | | import PassiveBuffEffMng
|
| | | import PlayerGameEvent
|
| | | import EventReport
|
| | |
| | | import GameLogic_SealDemon
|
| | | import GameLogic_ZhuXianBoss
|
| | | import GameLogic_CrossDemonKing
|
| | | import PlayerTJG
|
| | | import PlayerVip
|
| | | import PlayerRefineStove
|
| | | import PlayerFamilyTech
|
| | |
| | | import PlayerActGarbageSorting
|
| | | import GY_Query_CrossRealmReg
|
| | | import PlayerTongTianLing
|
| | | import PlayerCrossRealmPK
|
| | | import FunctionNPCCommon
|
| | | import PlayerGoldInvest
|
| | | import IPY_PlayerDefine
|
| | |
| | | import PlayerGubao
|
| | | import PlayerShentong
|
| | | import PlayerCharm
|
| | | import PlayerTask
|
| | | import PlayerFace
|
| | | import ChPlayer
|
| | | import GMShell
|
| | |
| | | # @param mergeMapInfo 该提示所属的跨服活动地图信息, 主要用于不同子服对应所跨的活动地图ID
|
| | | # @return 无返回值
|
| | | def WorldNotify(country, msgMark, msgParamList=[], lineID=0, mergeMinOSD=-1, mergeMaxOSD=-1, mergeMapInfo=[]):
|
| | | GameWorld.GetPlayerManager().BroadcastCountry_NotifyCode(country, 0, msgMark, __GetNotifyCodeList(msgParamList), lineID)
|
| | | #GameWorld.GetPlayerManager().BroadcastCountry_NotifyCode(country, 0, msgMark, __GetNotifyCodeList(msgParamList), lineID)
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.OnlineCount()):
|
| | | curPlayer = playerManager.OnlineAt(i)
|
| | | if not GameWorld.IsNormalPlayer(curPlayer):
|
| | | continue
|
| | | NotifyCode(curPlayer, msgMark, msgParamList)
|
| | | return
|
| | |
|
| | | def GetCrossWorldNotifyInfo(country, msgMark, msgParamList=[]):
|
| | |
| | | # @return 无返回值
|
| | | # @remarks
|
| | | def FamilyNotify(familyID, msgMark, msgParamList=[]):
|
| | | GameWorld.GetPlayerManager().BroadcastCountry_NotifyCode(0, familyID, msgMark, __GetNotifyCodeList(msgParamList))
|
| | | #GameWorld.GetPlayerManager().BroadcastCountry_NotifyCode(0, familyID, msgMark, __GetNotifyCodeList(msgParamList))
|
| | | PlayerFamily.NotifyAllFamilyMemberMsg(familyID, msgMark, msgParamList)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | PlayerBillboard.UpdatePlayerBillboardOnLeaveServer(curPlayer) #排行榜已实时更新,故下线不再同步
|
| | |
|
| | | #玩家下线通知gameserver记录缓存(放在下线更新排行榜之后,方便Gameserver判断是否需要存入数据库中)
|
| | | PlayerViewCacheTube.OnPlayerLogOut(curPlayer, tick)
|
| | | PlayerViewCache.OnPlayerLogout(curPlayer)
|
| | | PlayerFamily.OnPlayerLogout(curPlayer)
|
| | |
|
| | | #玩家下线/玩家切换地图公用逻辑
|
| | | __PlayerLeaveServerLogic(curPlayer, tick, True)
|
| | |
| | | GameWorld.Log("玩家已经死亡, 无法进入副本!")
|
| | | return ShareDefine.EntFBAskRet_Dead
|
| | |
|
| | | if PlayerTJG.GetIsTJG(curPlayer):
|
| | | if isNotify:
|
| | | NotifyCode(curPlayer, "SingleEnterDefaul", [mapID])
|
| | | return ShareDefine.EntFBAskRet_TJG
|
| | | |
| | | ## 队伍检查的情况,队长不处理,只处理队员
|
| | | if isTeamAsk and curPlayer.GetTeamLV() != IPY_GameWorld.tmlLeader:
|
| | | # 后端只做boss状态下,被动进入副本限制,防止打boss中被拉进去副本
|
| | |
| | | 特殊boss分流:
|
| | | @param bossID: 分流bossID
|
| | | '''
|
| | | if PlayerTJG.GetIsTJG(curPlayer):
|
| | | GameWorld.DebugLog("脱机的玩家不处理分流!", curPlayer.GetPlayerID())
|
| | | return tagLineID
|
| | | if GameWorld.IsCrossServer():
|
| | | return tagLineID
|
| | | # 非常规地图之间的切换不处理
|
| | |
| | | GameWorld.Log("等价货币补足扣除: type_Price%s, price=%s, curCurrency=%s, lackPrice=%s, tagMoneyType=%s, tagMoneyValue=%s"
|
| | | % (type_Price, price, curCurrency, lackPrice, tagMoneyType, tagMoneyValue), curPlayer.GetPlayerID())
|
| | | else:
|
| | | #GameWorld.Log("没有等价货币,无法扣除")
|
| | | GameWorld.DebugLog("货币不足! type_Price=%s,curCurrency=%s < %s" % (type_Price, curCurrency, price))
|
| | | return False
|
| | | #有足够的钱支付
|
| | | SetPlayerCurrency(curPlayer, type_Price, curCurrency - lostMoney)
|
| | |
| | | PlayerActTurntable.OnPlayerUseGold(curPlayer, type_Price, price)
|
| | | #轮回殿
|
| | | PlayerActLunhuidian.AddLunhuidianValue(curPlayer, PlayerActLunhuidian.AwardType_PayMoney, type_Price, price)
|
| | | |
| | | if type_Price == ShareDefine.TYPE_Price_Xiantao:
|
| | | PlayerPrestigeSys.AddRealmTaskValue(curPlayer, PlayerPrestigeSys.RealmTaskType_UseXiantao, price)
|
| | | unitPrice = price if quantity == 1 else int(math.ceil(price * 1.0 / quantity)) # 单价
|
| | | #reason_name = "Unknown" if not costType else costType
|
| | | reason_name = costType
|
| | |
| | | # 除钻石及绑钻外,未指定操作类型的不记录
|
| | |
|
| | | EventShell.EventRespons_OnMoneyChange(curPlayer, priceType)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_GetMoney, value, [priceType])
|
| | |
|
| | | if priceType not in [IPY_GameWorld.TYPE_Price_Gold_Money, IPY_GameWorld.TYPE_Price_Gold_Paper, ShareDefine.TYPE_Price_PayCoin] \
|
| | | and giveType == ChConfig.Def_GiveMoney_Unknown:
|
| | |
| | | ## 刷新红名对应PKValue
|
| | | curPKValue = curPlayer.GetPKValue()
|
| | | if not curPKValue:
|
| | | return
|
| | | if PlayerTJG.GetIsTJG(curPlayer):
|
| | | return
|
| | | redBuff = SkillCommon.FindBuffByID(curPlayer, ChConfig.Def_SkillID_Red)[0]
|
| | | if not redBuff:
|
| | |
| | | aftBaseCON = curPlayer.GetBaseCON()
|
| | | if aftLV > befLV:
|
| | | curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_LV, aftLV)
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
|
| | | PlayerActivity.DoAddActivityByLV(curPlayer, befLV, aftLV)
|
| | |
|
| | |
| | | #通知死亡
|
| | | DoPlayerDead(curPlayer)
|
| | |
|
| | | #PlayerTJG.PlayerTJGReborn(curPlayer, tick)
|
| | | GameObj.ClearPyPlayerState(curPlayer)
|
| | |
|
| | | MirrorAttack.OnPlayerDead(curPlayer)
|
| | |
| | | fightExpRate += PlayerGoldInvest.GetAddFightExpRate(curPlayer)
|
| | |
|
| | | actExpRateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ExpRate, {})# 多倍经验活动加成
|
| | | if not PlayerTJG.GetIsTJG(curPlayer) and actExpRateInfo.get(ShareDefine.ActKey_State):
|
| | | if actExpRateInfo.get(ShareDefine.ActKey_State):
|
| | | actExpIpyData = IpyGameDataPY.GetIpyGameData("ActExpRate", actExpRateInfo.get(ShareDefine.ActKey_CfgID))
|
| | | if actExpIpyData and curPlayer.GetLV() >= actExpIpyData.GetLVLimit():
|
| | | fightExpRate += actExpIpyData.GetAddExpRate()
|
| | |
| | | def GetLeaveFamilyTimeEx(curPlayer):return curPlayer.GetExAttr19()
|
| | | def SetLeaveFamilyTimeEx(curPlayer, value):
|
| | | curPlayer.SetExAttr19(value)
|
| | | curPlayer.SendGameServerRefreshState(ShareDefine.CDBPlayerRefresh_ExAttr19, value, 0)
|
| | | #curPlayer.SendGameServerRefreshState(ShareDefine.CDBPlayerRefresh_ExAttr19, value, 0)
|
| | | curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ExAttr19, value, 0, False)
|
| | | return
|
| | |
|
| | |
| | | def GetFamilyEmblemID(curPlayer): return curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyEmblemID)
|
| | | def SetFamilyEmblemID(curPlayer, emblemID): NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyEmblemID, emblemID)
|
| | |
|
| | | # 仙盟职位,使用 GetReceivedSalary,因为FamilyMemberLV没有入库
|
| | | def GetFamilyMemberLV(curPlayer): return curPlayer.GetReceivedSalary()
|
| | | def SetFamilyMemberLV(curPlayer, fmLV):
|
| | | #因为仙盟职位没有存DBPlayer,而跨服后又没有Family信息,所以这里做个存储,用于跨服用
|
| | | curPlayer.SetReceivedSalary(fmLV)
|
| | | curPlayer.SetFamilyMemberLV(fmLV) # 也同步设置该值,防止有些地方直接调用 curPlayer.GetFamilyMemberLV()
|
| | | return
|
| | |
|
| | | # 仙盟事务速度加成
|
| | | def GetAffairSpeedPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_AffairSpeedPer)
|
| | | def SetAffairSpeedPer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_AffairSpeedPer, value)
|