[7948] Use SetFaction instead explcit field set, other cleanups. Author: NoFantasy
--HG-- branch : trunk
This commit is contained in:
1 parent
fc4f7e6cf1
commit
e3390806a9
5 files changed
+18
-18
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user