| | |
| | | curTag = GameWorld.FindNPCByID(playerAtkObjID)
|
| | |
|
| | | npcControl = NPCCommon.NPCControl(curNPC)
|
| | | npcControl.RefreshBuffState(tick)
|
| | | # 没有玩家正在攻击的目标则取自身的仇恨列表
|
| | | if not curTag:
|
| | | #GameWorld.DebugLog("没有玩家正在攻击的目标,刷新自身仇恨目标!objID=%s,maxHP=%s" % (curNPC.GetID(), GameObj.GetMaxHP(curNPC)))
|
| | |
| | | if dist > 12:
|
| | | resultPos = GameMap.GetEmptyPlaceInArea(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
|
| | | curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
|
| | | elif dist > 5:
|
| | | npcControl.MoveToObj_Detel(fbPlayer, 5)
|
| | | elif dist > 3:
|
| | | npcControl.MoveToObj_Detel(fbPlayer, 3)
|
| | | return
|
| | | __NPCFight(npcControl, curNPC, curTag, tick)
|
| | | return
|