mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 03:53:48 +00:00
feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook (#12316)
* feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook * reverse logic
This commit is contained in:
@@ -284,6 +284,8 @@ void Creature::AddToWorld()
|
||||
GetZoneScript()->OnCreatureCreate(this);
|
||||
}
|
||||
|
||||
loot.sourceWorldObjectGUID = GetGUID();
|
||||
|
||||
sScriptMgr->OnCreatureAddWorld(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +159,8 @@ void GameObject::AddToWorld()
|
||||
|
||||
WorldObject::AddToWorld();
|
||||
|
||||
loot.sourceWorldObjectGUID = GetGUID();
|
||||
|
||||
sScriptMgr->OnGameObjectAddWorld(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13180,7 +13180,7 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!item->AllowedForPlayer(this))
|
||||
if (!item->AllowedForPlayer(this, loot->sourceWorldObjectGUID))
|
||||
{
|
||||
SendLootRelease(GetLootGUID());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user