mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10480] Fix a bug causing creature dynamic flags to be removed at normal loot preparation.
In addition add use of UNIT_DYNFLAG_TAPPED_BY_PLAYER Added check to see if creature is tapped for isAllowedToLoot() Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
919dc87bac
commit
d7994c1df4
4 changed files with 19 additions and 7 deletions
|
|
@ -870,7 +870,7 @@ void Creature::PrepareBodyLootState()
|
|||
// ... or can have skinning after
|
||||
GetCreatureInfo()->SkinLootId && sWorld.getConfig(CONFIG_BOOL_CORPSE_EMPTY_LOOT_SHOW))
|
||||
{
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -954,6 +954,7 @@ void Creature::SetLootRecipient(Unit *unit)
|
|||
m_lootRecipientGuid.Clear();
|
||||
m_lootGroupRecipientId = 0;
|
||||
RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED_BY_PLAYER);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -969,6 +970,7 @@ void Creature::SetLootRecipient(Unit *unit)
|
|||
m_lootGroupRecipientId = group->GetId();
|
||||
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED_BY_PLAYER);
|
||||
}
|
||||
|
||||
void Creature::SaveToDB()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue