[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

@ -266,9 +266,9 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
SelectLevel(GetCreatureInfo());
if (team == HORDE)
SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, GetCreatureInfo()->faction_H);
setFaction(GetCreatureInfo()->faction_H);
else
SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, GetCreatureInfo()->faction_A);
setFaction(GetCreatureInfo()->faction_A);
SetUInt32Value(UNIT_NPC_FLAGS,GetCreatureInfo()->npcflag);
@ -1501,8 +1501,8 @@ void Creature::setDeathState(DeathState s)
if(s == JUST_DIED)
{
SetUInt64Value (UNIT_FIELD_TARGET,0); // remove target selection in any cases (can be set at aura remove in Unit::setDeathState)
SetUInt32Value(UNIT_NPC_FLAGS, 0);
SetUInt64Value(UNIT_FIELD_TARGET,0); // remove target selection in any cases (can be set at aura remove in Unit::setDeathState)
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
if(!isPet() && GetCreatureInfo()->SkinLootId)
if ( LootTemplates_Skinning.HaveLootFor(GetCreatureInfo()->SkinLootId) )