Skip to content

Commit

Permalink
[9959] Fixed resent radnom problem with looting related to skinning c…
Browse files Browse the repository at this point in the history
…ode changes.

Thanks to boxa for help in research problem.
  • Loading branch information
VladimirMangos committed May 23, 2010
1 parent 9cd510e commit 7e2ec49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/game/Creature.cpp
Expand Up @@ -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),
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9958"
#define REVISION_NR "9959"
#endif // __REVISION_NR_H__

0 comments on commit 7e2ec49

Please sign in to comment.