From d3646db9168c053ed6d334f54178b01b0f8df59b Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 2 Aug 2009 10:11:27 +0800 Subject: [8285] Don't show creatures as lootable that have no loot. Author: Prince --HG-- branch : trunk --- src/game/Unit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') 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()) -- cgit v1.2.3