aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 8c72efff03d..56b5ff2ed3f 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -375,6 +375,12 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
else
SetReactState(REACT_AGGRESSIVE);
+ if(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_TAUNT)
+ {
+ ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
+ ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
+ }
+
return true;
}
@@ -482,7 +488,7 @@ void Creature::Update(uint32 diff)
if(!isAlive())
break;
- if(!IsInEvadeMode())
+ if(!IsInEvadeMode() && m_AI_enabled)
{
// do not allow the AI to be changed during update
m_AI_locked = true;
@@ -599,6 +605,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
i_AI = ai ? ai : FactorySelector::selectAI(this);
if (oldAI)
delete oldAI;
+ m_AI_enabled = true;
return true;
}
@@ -611,6 +618,9 @@ void Creature::InitPossessedAI()
// Signal the old AI that it's been disabled
i_AI->OnPossess(true);
+
+ if(!(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_CHARM_AI))
+ m_AI_enabled = false;
}
void Creature::DisablePossessedAI()
@@ -621,6 +631,8 @@ void Creature::DisablePossessedAI()
// Signal the old AI that it's been re-enabled
i_AI->OnPossess(false);
+
+ m_AI_enabled = true;
}
bool Creature::Create (uint32 guidlow, Map *map, uint32 Entry, uint32 team, const CreatureData *data)