| | |
| | | return
|
| | |
|
| | | def __OnFBRobotReborn(curNPC, npcLV):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | lineID = GameWorld.GetGameWorld().GetLineID()
|
| | | objID = curNPC.GetID()
|
| | | jobSkillDict = IpyGameDataPY.GetFuncEvalCfg("FBRobotCfg", 1)
|
| | |
| | | skillManager = curNPC.GetSkillManager()
|
| | | for skillID in skillIDList:
|
| | | skillManager.LearnSkillByID(skillID)
|
| | | playerManager = GameWorld.GetMapCopyPlayerManager()
|
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if not curPlayer:
|
| | | continue
|
| | | FBLogic.DoFBHelp(curPlayer, tick)
|
| | | FBLogic.OnRandomRobotJob(curNPC, lineRobotJobDict)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | #---初始化NPC相关 设NPCID 最大仇恨数 AI类型 出生点 出生时间---
|
| | | curSummon.SetNPCTypeID(npcId)
|
| | | curSummon.Reborn(rebornX, rebornY)
|
| | | curSummon.SetBornTime(tick)
|
| | | if aiType > 0:
|
| | | curSummon.SetAIType(aiType)
|
| | |
| | |
|
| | | if curSummon.GetType() == ChConfig.ntRobot:
|
| | | __OnFBRobotReborn(curSummon, curSummon.GetLV())
|
| | | curSummon.Reborn(rebornX, rebornY)
|
| | |
|
| | | FBLogic.DoFBRebornSummonNPC(curSummon, tick)
|
| | | __NotifyMapPlayerSummonMapNPC(npcId, rebornX, rebornY)
|
| | | #__NotifyMapPlayerSummonMapNPC(npcId, rebornX, rebornY)
|
| | | return curSummon
|
| | |
|
| | | ## 通知地图内玩家,地图出现召唤NPC
|
| | |
| | | if not canCollTogether and not SetCollectNPC(curPlayer, curNPC):
|
| | | GameWorld.ErrLog("SetCollectNPC fail!")
|
| | | return
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_CollectNPCObjID, curNPC.GetID())
|
| | |
|
| | | # 采集耗时
|
| | | prepareTime = collectNPCIpyData.GetPrepareTime() * 1000
|
| | |
| | |
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_CollectNPCObjID, 0)
|
| | | #GameWorld.DebugLog(" set collectNPCObjID 0")
|
| | | |
| | | FBLogic.OnExitCollect(curPlayer, curNPC)
|
| | | return
|
| | |
|
| | | def DoCollectNPCOK(curPlayer, npcID, tick):
|