mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +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
|
|
@ -654,12 +654,18 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
|
|||
*data << (m_uint32Values[ index ] & ~UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
// hide lootable animation for unallowed players
|
||||
else if(index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_UNIT)
|
||||
else if (index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
if(!target->isAllowedToLoot((Creature*)this))
|
||||
*data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_LOOTABLE);
|
||||
if (!target->isAllowedToLoot((Creature*)this))
|
||||
*data << (m_uint32Values[ index ] & ~(UNIT_DYNFLAG_LOOTABLE | UNIT_DYNFLAG_TAPPED_BY_PLAYER));
|
||||
else
|
||||
*data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_TAPPED);
|
||||
{
|
||||
// flag only for original loot recipent
|
||||
if (target == ((Creature*)this)->GetOriginalLootRecipient())
|
||||
*data << m_uint32Values[ index ];
|
||||
else
|
||||
*data << (m_uint32Values[ index ] & ~(UNIT_DYNFLAG_TAPPED | UNIT_DYNFLAG_TAPPED_BY_PLAYER));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue