Core/Defines: define faction templates and replace magic numbers from scripts

This commit is contained in:
ForesterDev
2017-05-23 14:30:27 +04:00
committed by Aokromes
parent d96482b2d4
commit abea8bf4cb
99 changed files with 254 additions and 316 deletions
@@ -1895,7 +1895,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
}
else
{
trigger->SetFaction(spellInfo->IsPositive() ? 35 : 14);
trigger->SetFaction(spellInfo->IsPositive() ? FACTION_FRIENDLY : FACTION_MONSTER);
// Set owner guid for target if no owner available - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, target ? target->GetGUID() : ObjectGuid::Empty);