diff options
author | megamage <none@none> | 2009-08-02 10:11:27 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-08-02 10:11:27 +0800 |
commit | d3646db9168c053ed6d334f54178b01b0f8df59b (patch) | |
tree | a231b3cd64b076608690ce13dfd08de97664fe25 /src | |
parent | c9010dffc763a7bad816d854412412470050cfba (diff) |
[8285] Don't show creatures as lootable that have no loot. Author: Prince
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5df313e4455..581adc7664f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -865,7 +865,9 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa if(!cVictim->isPet()) { cVictim->DeleteThreatList(); - cVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + // only lootable if it has loot or can drop gold + if(cVictim->GetCreatureInfo()->lootid || cVictim->GetCreatureInfo()->maxgold > 0) + cVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } // Call creature just died function if (cVictim->AI()) |