| | |
| | | import NPCCommon
|
| | | import GameWorld
|
| | | import GameMap
|
| | | import ChConfig
|
| | |
|
| | |
|
| | | ##AI逻辑处理
|
| | |
| | | #刷新自己的Buff
|
| | | npcControl.RefreshBuffState(tick)
|
| | |
|
| | | owner = NPCCommon.GetNpcObjOwnerDetail(curNPC)
|
| | | summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PriWoodPilePlayerID)
|
| | | if not summonPlayerID:
|
| | | return
|
| | | owner = GameWorld.GetObj(summonPlayerID, IPY_GameWorld.gotPlayer)
|
| | | if not owner:
|
| | | return
|
| | | |
| | | if GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), owner.GetPosX(), owner.GetPosY()) > 3:
|
| | | resetPos = GameMap.GetEmptyPlaceInArea(owner.GetPosX(), owner.GetPosY(), 2)
|
| | | curNPC.ResetPos(resetPos.GetPosX(), resetPos.GetPosY())
|