[10206] Implement ITEM_FLAGS2_HORDE_ONLY and ITEM_FLAGS2_ALLIANCE_ONLY

* Check item_template data
* Check at equip/use
* Skip at loot if not compatible
* Skip in vendor list if not compatible
This commit is contained in:
VladimirMangos 2010-07-17 07:00:10 +04:00
parent f2e3881a77
commit 9882bc811f
7 changed files with 84 additions and 52 deletions

View file

@ -706,7 +706,7 @@ void Group::StartLootRool(Creature* lootTarget, Loot* loot, uint8 itemSlot, bool
if(!playerToRoll || !playerToRoll->GetSession())
continue;
if ((!skipIfCanNotUse || playerToRoll->CanUseItem(item)) && lootItem.AllowedForPlayer(playerToRoll) )
if ((!skipIfCanNotUse || playerToRoll->CanUseItem(item)==EQUIP_ERR_OK) && lootItem.AllowedForPlayer(playerToRoll) )
{
if (playerToRoll->IsWithinDist(lootTarget, sWorld.getConfig(CONFIG_FLOAT_GROUP_XP_DISTANCE), false))
{