mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8285] Don't show creatures as lootable that have no loot.
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
47f96447b8
commit
efa741a5cb
2 changed files with 4 additions and 2 deletions
|
|
@ -647,7 +647,9 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||||
if(!cVictim->isPet())
|
if(!cVictim->isPet())
|
||||||
{
|
{
|
||||||
cVictim->DeleteThreatList();
|
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
|
// Call creature just died function
|
||||||
if (cVictim->AI())
|
if (cVictim->AI())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8284"
|
#define REVISION_NR "8285"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue