From e3390806a948c3ffdcead96652a35e46686431ce Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 3 Jun 2009 19:29:55 -0500 Subject: [7948] Use SetFaction instead explcit field set, other cleanups. Author: NoFantasy --HG-- branch : trunk --- src/game/Creature.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/game/Creature.cpp') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 6a149d97b33..78b40f28194 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -352,9 +352,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); if(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_WORLDEVENT) SetUInt32Value(UNIT_NPC_FLAGS,GetCreatureInfo()->npcflag | gameeventmgr.GetNPCFlag(this)); @@ -1715,10 +1715,10 @@ 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); - //if(!isPet()) - setActive(false); + 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); + + setActive(false); if(!isPet() && GetCreatureInfo()->SkinLootId) if ( LootTemplates_Skinning.HaveLootFor(GetCreatureInfo()->SkinLootId) ) -- cgit v1.2.3