[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:
NoFantasy 2010-09-13 10:34:18 +02:00
parent 919dc87bac
commit d7994c1df4
4 changed files with 19 additions and 7 deletions

View file

@ -15615,7 +15615,11 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
bool Player::isAllowedToLoot(Creature* creature)
{
if(Player* recipient = creature->GetLootRecipient())
// never tapped by any (mob solo kill)
if (!creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED))
return false;
if (Player* recipient = creature->GetLootRecipient())
{
if (recipient == this)
return true;