From f7601aa00e7a46af677bde607f1078a98fd127e6 Mon Sep 17 00:00:00 2001 From: maximius Date: Mon, 14 Sep 2009 12:40:40 -0700 Subject: *Waypoint creature fix by DearScorpion - "example: the portal dragon in Duskwood will basically return to it's spawnpoint and start over without this patch, with it however it will more or less kill you on the spot and continue its waypoint path where it left off" --HG-- branch : trunk --- src/bindings/scripts/base/escort_ai.h | 2 -- src/game/CreatureAI.h | 1 - src/game/Unit.cpp | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/base/escort_ai.h b/src/bindings/scripts/base/escort_ai.h index 60e555dcfd4..44c244ab862 100644 --- a/src/bindings/scripts/base/escort_ai.h +++ b/src/bindings/scripts/base/escort_ai.h @@ -72,8 +72,6 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; } float GetMaxPlayerDistance() { return MaxPlayerDistance; } - bool IsEscorted() {return IsBeingEscorted;} - void SetCanMelee(bool usemelee) { CanMelee = usemelee; } void SetDespawnAtEnd(bool despawn) { DespawnAtEnd = despawn; } void SetDespawnAtFar(bool despawn) { DespawnAtFar = despawn; } diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h index 76aaa834756..b47156f5876 100644 --- a/src/game/CreatureAI.h +++ b/src/game/CreatureAI.h @@ -123,7 +123,6 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI // Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc) //virtual void AttackedBy(Unit* attacker); - virtual bool IsEscorted () {return false;} // Called when creature is spawned or respawned (for reseting variables) virtual void JustRespawned() { Reset(); } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6424d918983..f3371a1ebb4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10529,8 +10529,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) if(GetTypeId() != TYPEID_PLAYER) { // Set home position at place of engaging combat for escorted creatures - if(((Creature*)this)->IsAIEnabled) - if (((Creature *)this)->AI()->IsEscorted()) + //if(((Creature*)this)->IsAIEnabled) + //if (((Creature *)this)->AI()->IsEscorted()) ((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); if(enemy) { -- cgit v1.2.3