aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/LootMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
-rw-r--r--src/server/game/Loot/LootMgr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index bde2f17b132..5ec917c4381 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -364,7 +364,7 @@ LootItem::LootItem(LootStoreItem const& li)
conditions = li.conditions;
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid);
- freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT);
+ freeforall = proto && (proto->Flags[0] & ITEM_PROTO_FLAG_PARTY_LOOT);
follow_loot_rules = proto && (proto->FlagsCu & ITEM_FLAGS_CU_FOLLOW_LOOT_RULES);
needs_quest = li.needs_quest;
@@ -391,14 +391,14 @@ bool LootItem::AllowedForPlayer(Player const* player) const
return false;
// not show loot for players without profession or those who already know the recipe
- if ((pProto->Flags & ITEM_PROTO_FLAG_SMART_LOOT) && (!player->HasSkill(pProto->RequiredSkill) || player->HasSpell(pProto->Spells[1].SpellId)))
+ if ((pProto->Flags[0] & ITEM_PROTO_FLAG_SMART_LOOT) && (!player->HasSkill(pProto->RequiredSkill) || player->HasSpell(pProto->Effects[1].SpellID)))
return false;
// not show loot for not own team
- if ((pProto->Flags2 & ITEM_FLAGS_EXTRA_HORDE_ONLY) && player->GetTeam() != HORDE)
+ if ((pProto->Flags[1] & ITEM_FLAGS_EXTRA_HORDE_ONLY) && player->GetTeam() != HORDE)
return false;
- if ((pProto->Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && player->GetTeam() != ALLIANCE)
+ if ((pProto->Flags[1] & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && player->GetTeam() != ALLIANCE)
return false;
// check quest requirements
@@ -440,7 +440,7 @@ void Loot::AddItem(LootStoreItem const& item)
// non-conditional one-player only items are counted here,
// free for all items are counted in FillFFALoot(),
// non-ffa conditionals are counted in FillNonQuestNonFFAConditionalLoot()
- if (!item.needs_quest && item.conditions.empty() && !(proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT))
+ if (!item.needs_quest && item.conditions.empty() && !(proto->Flags[0] & ITEM_PROTO_FLAG_PARTY_LOOT))
++unlootedCount;
}
}
@@ -1657,7 +1657,7 @@ void LoadLootTemplates_Item()
// remove real entries and check existence loot
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
- if (lootIdSet.find(itr->second.ItemId) != lootIdSet.end() && itr->second.Flags & ITEM_PROTO_FLAG_OPENABLE)
+ if (lootIdSet.find(itr->second.ItemId) != lootIdSet.end() && itr->second.Flags[0] & ITEM_PROTO_FLAG_OPENABLE)
lootIdSet.erase(itr->second.ItemId);
// output error for any still listed (not referenced from appropriate table) ids
@@ -1682,7 +1682,7 @@ void LoadLootTemplates_Milling()
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
{
- if (!(itr->second.Flags & ITEM_PROTO_FLAG_MILLABLE))
+ if (!(itr->second.Flags[0] & ITEM_PROTO_FLAG_MILLABLE))
continue;
if (lootIdSet.find(itr->second.ItemId) != lootIdSet.end())
@@ -1745,7 +1745,7 @@ void LoadLootTemplates_Prospecting()
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
{
- if (!(itr->second.Flags & ITEM_PROTO_FLAG_PROSPECTABLE))
+ if (!(itr->second.Flags[0] & ITEM_PROTO_FLAG_PROSPECTABLE))
continue;
if (lootIdSet.find(itr->second.ItemId) != lootIdSet.end())