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:
Shauren
2010-09-21 21:55:16 +02:00
parent 5eb0fd80ac
commit d8ddf38453
18 changed files with 323 additions and 56 deletions
+14 -5
View File
@@ -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;
}
}
}
}