mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
*Do not allow taunt affect passive creatures.
*Fix build. --HG-- branch : trunk
This commit is contained in:
@@ -4067,7 +4067,7 @@ void Spell::EffectTaunt(uint32 /*i*/)
|
||||
unitTarget->getThreatManager().addThreat(m_caster, itsThreat - myThreat);
|
||||
}
|
||||
|
||||
if(((Creature*)unitTarget)->IsAIEnabled)
|
||||
if(((Creature*)unitTarget)->IsAIEnabled && !((Creature*)unitTarget)->HasReactState(REACT_PASSIVE))
|
||||
((Creature*)unitTarget)->AI()->AttackStart(m_caster);
|
||||
}
|
||||
|
||||
|
||||
@@ -10681,6 +10681,9 @@ void Unit::TauntApply(Unit* taunter)
|
||||
if(!CanHaveThreatList())
|
||||
return;
|
||||
|
||||
if(((Creature*)this)->HasReactState(REACT_PASSIVE))
|
||||
return;
|
||||
|
||||
Unit *target = getVictim();
|
||||
if(target && target == taunter)
|
||||
return;
|
||||
@@ -10704,6 +10707,9 @@ void Unit::TauntFadeOut(Unit *taunter)
|
||||
if(!CanHaveThreatList())
|
||||
return;
|
||||
|
||||
if(((Creature*)this)->HasReactState(REACT_PASSIVE))
|
||||
return;
|
||||
|
||||
Unit *target = getVictim();
|
||||
if(!target || target != taunter)
|
||||
return;
|
||||
@@ -12813,8 +12819,8 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
|
||||
return false;
|
||||
|
||||
// Do not proc spells for totem if aura does not require family to proc
|
||||
if (GetTypeId()==TYPEID_UNIT && isTotem() && ((*Totem)this)->target->IsControlledByPlayer())
|
||||
if (!spellProcEvent || !spellProcEvent->spellFamilyFlags)
|
||||
if (GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem() && ((Totem*)this)->IsControlledByPlayer())
|
||||
if (!spellProcEvent || !spellProcEvent->spellFamilyName)
|
||||
return false;
|
||||
|
||||
// Additional checks for triggered spells
|
||||
|
||||
Reference in New Issue
Block a user