[9959] Fixed resent radnom problem with looting related to skinning code changes.

Thanks to boxa for help in research problem.
This commit is contained in:
VladimirMangos 2010-05-23 11:44:33 +04:00
parent f0b1c5bd74
commit fcf996b4fd
2 changed files with 5 additions and 5 deletions

View file

@ -110,7 +110,7 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
Creature::Creature(CreatureSubtype subtype) :
Unit(), i_AI(NULL),
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), m_groupLootId(0),
lootForPickPocketed(false), lootForBody(false), lootForSkin(false), m_groupLootTimer(0), m_groupLootId(0),
m_lootMoney(0), m_lootGroupRecipientId(0),
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(5.0f),
m_subtype(subtype), m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0),
@ -2037,10 +2037,10 @@ void Creature::AllLootRemovedFromCorpse()
CreatureInfo const *cinfo = GetCreatureInfo();
// corpse was not skinnable -> apply corpse looted timer
if (!cinfo->SkinLootId)
// corpse was not skinned -> apply corpse looted timer
if (!lootForSkin)
nDeathTimer = (uint32)((m_corpseDelay * IN_MILLISECONDS) * sWorld.getConfig(CONFIG_FLOAT_RATE_CORPSE_DECAY_LOOTED));
// corpse skinnable, but without skinning flag, and then skinned, corpse will despawn next update
// corpse was skinned, corpse will despawn next update
else
nDeathTimer = 0;