[7948] Use SetFaction instead explcit field set, other cleanups.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NoFantasy 2009-06-03 15:32:26 +04:00 committed by VladimirMangos
parent de2338c9a4
commit be6e3923d1
7 changed files with 23 additions and 23 deletions

View file

@ -3265,9 +3265,9 @@ void Spell::EffectSummon(uint32 i)
spawnCreature->SetDuration(duration);
spawnCreature->SetOwnerGUID(m_caster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
spawnCreature->setPowerType(POWER_MANA);
spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, m_caster->getFaction());
spawnCreature->setFaction(m_caster->getFaction());
spawnCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
@ -3699,8 +3699,8 @@ void Spell::EffectSummonGuardian(uint32 i)
spawnCreature->SetOwnerGUID(m_caster->GetGUID());
spawnCreature->setPowerType(POWER_MANA);
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, m_caster->getFaction());
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
spawnCreature->setFaction(m_caster->getFaction());
spawnCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
@ -4181,8 +4181,8 @@ void Spell::EffectSummonPet(uint32 i)
NewSummon->SetOwnerGUID(m_caster->GetGUID());
NewSummon->SetCreatorGUID(m_caster->GetGUID());
NewSummon->SetUInt32Value(UNIT_NPC_FLAGS, 0);
NewSummon->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction);
NewSummon->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
NewSummon->setFaction(faction);
NewSummon->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
NewSummon->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
NewSummon->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
@ -5980,7 +5980,7 @@ void Spell::EffectSummonCritter(uint32 i)
critter->SetOwnerGUID(m_caster->GetGUID());
critter->SetCreatorGUID(m_caster->GetGUID());
critter->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
critter->setFaction(m_caster->getFaction());
critter->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
critter->AIM_Initialize();