Core/Items: Implemented trading soulbound loot items
Core/DBLayer: Converted more more player-related queries into prepared statements Core/Items: Fixed loading of enchantments Closes issue #4130. --HG-- branch : trunk
This commit is contained in:
@@ -381,6 +381,11 @@ bool LootItem::AllowedForPlayer(Player const * player) const
|
||||
return true;
|
||||
}
|
||||
|
||||
void LootItem::AddAllowedLooter(const Player *player)
|
||||
{
|
||||
allowedGUIDs.insert(player->GetGUIDLow());
|
||||
}
|
||||
|
||||
//
|
||||
// --------- Loot ---------
|
||||
//
|
||||
@@ -557,13 +562,17 @@ QuestItemList* Loot::FillNonQuestNonFFAConditionalLoot(Player* player)
|
||||
for (uint8 i = 0; i < items.size(); ++i)
|
||||
{
|
||||
LootItem &item = items[i];
|
||||
if (!item.is_looted && !item.freeforall && !item.conditions.empty() && item.AllowedForPlayer(player))
|
||||
if (!item.is_looted && !item.freeforall && item.AllowedForPlayer(player))
|
||||
{
|
||||
ql->push_back(QuestItem(i));
|
||||
if (!item.is_counted)
|
||||
item.AddAllowedLooter(player);
|
||||
if (!item.conditions.empty())
|
||||
{
|
||||
++unlootedCount;
|
||||
item.is_counted = true;
|
||||
ql->push_back(QuestItem(i));
|
||||
if (!item.is_counted)
|
||||
{
|
||||
++unlootedCount;
|
||||
item.is_counted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user