Core/GameObject: use a friendly trigger for positive spells.

Fixes an issue with Skadi Harpoons.

Note to self: should actually implement GameObject casting already :/
This commit is contained in:
ariel-
2016-11-14 01:53:25 -03:00
committed by Aokromes
parent ad927acae4
commit b6f8ecbefc

View File

@@ -1900,7 +1900,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
}
else
{
trigger->setFaction(14);
trigger->setFaction(spellInfo->IsPositive() ? 35 : 14);
// 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);