mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 22:19:54 -04:00
Core/Misc: camelize GetFaction/SetFaction properly
(cherry picked from commit 4c4dca6d69)
This commit is contained in:
@@ -2112,7 +2112,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
|
||||
|
||||
if (Unit* owner = GetOwner())
|
||||
{
|
||||
trigger->setFaction(owner->getFaction());
|
||||
trigger->SetFaction(owner->GetFaction());
|
||||
if (owner->HasUnitFlag(UNIT_FLAG_PVP_ATTACKABLE))
|
||||
trigger->AddUnitFlag(UNIT_FLAG_PVP_ATTACKABLE);
|
||||
// copy pvp state flags from owner
|
||||
@@ -2123,7 +2123,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger->setFaction(spellInfo->IsPositive() ? 35 : 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