aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-03 19:29:55 -0500
committermegamage <none@none>2009-06-03 19:29:55 -0500
commite3390806a948c3ffdcead96652a35e46686431ce (patch)
tree6ffd83adbf0a9be47e8b36ab062cf4e6e5eddf20 /src/game/Creature.cpp
parentfc4f7e6cf12996f4afce71e97918bff2ab699919 (diff)
[7948] Use SetFaction instead explcit field set, other cleanups. Author: NoFantasy
--HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp12
1 files changed, 6 insertions, 6 deletions
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) )