mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user