mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7948] Use SetFaction instead explcit field set, other cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
de2338c9a4
commit
be6e3923d1
7 changed files with 23 additions and 23 deletions
|
|
@ -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) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue