| | |
| | | import PyDataManager
|
| | | import PyGameData
|
| | | import PlayerTalk
|
| | | import PlayerStore
|
| | |
|
| | | import time
|
| | | import datetime
|
| | |
| | | elif queryType == ChConfig.queryType_NPCInfo:
|
| | | __QueryMapNPCInfo(curPlayer, queryCallName, sendCMD)
|
| | | return
|
| | | # 查询地图NPC数量
|
| | | elif queryType == ChConfig.queryType_NPCCnt:
|
| | | __QueryMapNPCCntInfo(curPlayer, queryCallName, sendCMD)
|
| | | return
|
| | | else:
|
| | | GameWorld.ErrLog('unKnow queryType = %s' % (queryType))
|
| | |
|
| | |
| | | queryCallName, sendCMD, len(sendCMD), curPlayer.GetRouteServerIndex())
|
| | | return
|
| | |
|
| | | ## 查询目标地图NPC数量
|
| | | # @param curPlayer: 请求玩家
|
| | | # @param queryCallName: 请求回调名
|
| | | # @param sendCMD: 请求的命令 根据请求类型和请求命令来决定最终操作
|
| | | # @return None
|
| | | def __QueryMapNPCCntInfo(curPlayer, queryCallName, sendCMD):
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | try:
|
| | | mapInfo = eval(sendCMD)
|
| | | except BaseException:
|
| | | GameWorld.ErrLog("__QueryMapNPCCntInfo() sendCMD=%s error" % sendCMD)
|
| | | return
|
| | | |
| | | if not mapInfo:
|
| | | return
|
| | | |
| | | tagMapID = mapInfo[0]
|
| | | playerManager.MapServer_QueryPlayer(curPlayer.GetPlayerID(), ChConfig.queryType_NPCCnt, 0, tagMapID,
|
| | | queryCallName, sendCMD, len(sendCMD), curPlayer.GetRouteServerIndex())
|
| | | return
|
| | |
|
| | | ## 获得家族属性(等级,人数)获得自己所在家族的属性
|
| | | # @param curPlayer 请求的玩家
|
| | |
| | | callName = pack.GetCallName()
|
| | | resultName = pack.GetResultName() #[queryid, 人气值, 物品ID]
|
| | |
|
| | | if callName == 'SendMail':
|
| | | title, content, getDays, playerIDList, addItemList, gold, goldPaper, silver = eval(resultName)
|
| | | if callName == "SendMail":
|
| | | title, content, getDays, playerIDList, addItemList, gold, goldPaper, silver, detail = eval(resultName)
|
| | | limitTime = str(GameWorld.GetDatetimeByDiffDays(getDays))
|
| | | limitTime = limitTime.split(".")[0]
|
| | | PlayerCompensation.SendPersonalItemMail(title, content, limitTime, playerIDList, addItemList, gold, goldPaper, silver)
|
| | | PlayerCompensation.SendPersonalItemMail(title, content, limitTime, playerIDList, addItemList, gold, goldPaper, silver, detail=detail)
|
| | | return
|
| | |
|
| | | if callName == 'SendMailBatch':
|
| | | if callName == "SendMailBatch":
|
| | | PlayerCompensation.SendPersonalItemMailBatch(eval(resultName))
|
| | | return
|
| | |
|
| | |
| | |
|
| | | # 世界boss状态
|
| | | if callName =="GameWorldBossState":
|
| | | GameWorldBoss.DoGameWorldBossOnReborn(eval(resultName), tick)
|
| | | GameWorldBoss.OnGameWorldBossStateChange(eval(resultName), tick)
|
| | | return
|
| | | |
| | | # 仙盟归属boss信息同步
|
| | | if callName =="FamilyOwnerBossInfo":
|
| | | GameWorldBoss.MapServer_FamilyOwnerBossInfo(eval(resultName))
|
| | | return
|
| | |
|
| | | # 骑宠争夺伤血玩家同步
|
| | | if callName =="HorsePetRobBossHurtPlayer":
|
| | | GameWorldBoss.MapServer_HorsePetRobBossHurtPlayer(eval(resultName))
|
| | | return
|
| | |
|
| | | # 全局掉落CD
|
| | |
| | | # 全局击杀数换算掉落概率
|
| | | if callName =="GlobalDropRate":
|
| | | GameWorldProcess.UpdGlobalDropRate(eval(resultName))
|
| | | return
|
| | | # 全局击杀数统计
|
| | | if callName =="GlobalKillCount":
|
| | | GameWorldProcess.UpdGlobalKillCount(eval(resultName))
|
| | | return
|
| | |
|
| | | # 自定义商店全服限购次数清空
|
| | |
| | | if callName =="AddBossRebornPoint":
|
| | | GameWorldBoss.AddBossRebornPoint(eval(resultName))
|
| | | return
|
| | | |
| | | #通知神兽副本NPC刷新时间
|
| | | if callName =="DogzNPCTime":
|
| | | PyGameData.g_dogzNPCRefreshTimeDict = eval(resultName)
|
| | | GameWorldBoss.Sync_DogzNPCRefreshTime()
|
| | | return
|
| | | #---return分割线-----------------------------------------------------------------
|
| | |
|
| | |
|
| | | #---有可能return-----------------------------------------------------------------
|
| | | #商城全服购买限制
|
| | | if callName == "GetStoreServerBuyCnt":
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
|
| | | if not curPlayer:
|
| | | return
|
| | | ret = PlayerStore.DoStoreServerBuyQueryResult(curPlayer, eval(resultName))
|
| | | resultName = '%s' % ret
|
| | | |
| | | #玩家等级奖励
|
| | | if callName == "GetPlayerLVAward":
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
|