*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
This commit is contained in:
@@ -72,8 +72,6 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
|
|||||||
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
|
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
|
||||||
float GetMaxPlayerDistance() { return MaxPlayerDistance; }
|
float GetMaxPlayerDistance() { return MaxPlayerDistance; }
|
||||||
|
|
||||||
bool IsEscorted() {return IsBeingEscorted;}
|
|
||||||
|
|
||||||
void SetCanMelee(bool usemelee) { CanMelee = usemelee; }
|
void SetCanMelee(bool usemelee) { CanMelee = usemelee; }
|
||||||
void SetDespawnAtEnd(bool despawn) { DespawnAtEnd = despawn; }
|
void SetDespawnAtEnd(bool despawn) { DespawnAtEnd = despawn; }
|
||||||
void SetDespawnAtFar(bool despawn) { DespawnAtFar = despawn; }
|
void SetDespawnAtFar(bool despawn) { DespawnAtFar = despawn; }
|
||||||
|
|||||||
@@ -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)
|
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
|
||||||
//virtual void AttackedBy(Unit* attacker);
|
//virtual void AttackedBy(Unit* attacker);
|
||||||
virtual bool IsEscorted () {return false;}
|
|
||||||
|
|
||||||
// Called when creature is spawned or respawned (for reseting variables)
|
// Called when creature is spawned or respawned (for reseting variables)
|
||||||
virtual void JustRespawned() { Reset(); }
|
virtual void JustRespawned() { Reset(); }
|
||||||
|
|||||||
+2
-2
@@ -10529,8 +10529,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
|||||||
if(GetTypeId() != TYPEID_PLAYER)
|
if(GetTypeId() != TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
// Set home position at place of engaging combat for escorted creatures
|
// Set home position at place of engaging combat for escorted creatures
|
||||||
if(((Creature*)this)->IsAIEnabled)
|
//if(((Creature*)this)->IsAIEnabled)
|
||||||
if (((Creature *)this)->AI()->IsEscorted())
|
//if (((Creature *)this)->AI()->IsEscorted())
|
||||||
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||||
if(enemy)
|
if(enemy)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user