diff options
| author | megamage <none@none> | 2009-06-03 19:29:55 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-06-03 19:29:55 -0500 |
| commit | e3390806a948c3ffdcead96652a35e46686431ce (patch) | |
| tree | 6ffd83adbf0a9be47e8b36ab062cf4e6e5eddf20 /src/game/SpellAuras.cpp | |
| parent | fc4f7e6cf12996f4afce71e97918bff2ab699919 (diff) | |
[7948] Use SetFaction instead explcit field set, other cleanups. Author: NoFantasy
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ee0b677bf8a..46ed4f12c58 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3527,7 +3527,7 @@ void AuraEffect::HandleAuraModScale(bool apply, bool Real, bool /*changeAmount*/ if( apply ) { m_target->SetCharmerGUID(GetCasterGUID()); - m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,caster->getFaction()); + m_target->setFaction(caster->getFaction()); caster->SetCharm(m_target); @@ -3569,7 +3569,7 @@ void AuraEffect::HandleAuraModScale(bool apply, bool Real, bool /*changeAmount*/ else if(m_target->GetTypeId() == TYPEID_UNIT) { CreatureInfo const *cinfo = ((Creature*)m_target)->GetCreatureInfo(); - m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,cinfo->faction_A); + m_target->setFaction(cinfo->faction_A); } caster->SetCharm(NULL); @@ -3662,8 +3662,8 @@ void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real, bool chang if( apply ) { m_target->SetCharmerGUID(GetCasterGUID()); - m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,caster->getFaction()); - m_target->CastStop(m_target==caster ? GetId() : 0); + m_target->setFaction(caster->getFaction()); + m_target->CastStop(m_target == caster ? GetId() : 0); caster->SetCharm(m_target); m_target->CombatStop(); @@ -3711,12 +3711,12 @@ void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real, bool chang if(((Creature*)m_target)->isPet()) { if(Unit* owner = m_target->GetOwner()) - m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,owner->getFaction()); + m_target->setFaction(owner->getFaction()); else if(cinfo) - m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,cinfo->faction_A); + m_target->setFaction(cinfo->faction_A); } else if(cinfo) // normal creature - m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,cinfo->faction_A); + m_target->setFaction(cinfo->faction_A); // restore UNIT_FIELD_BYTES_0 if(cinfo && caster->GetTypeId() == TYPEID_PLAYER && caster->getClass() == CLASS_WARLOCK && cinfo->type == CREATURE_TYPE_DEMON) |
