[10662] Implement partly item looting

* Not deleted normal item loot at first loot window close.
* Save current item loot content to DB for later continue looting.
* Cleanup spell effect SPELL_EFFECT_OPEN_LOCK check code
* Cleanup Player::AutoStoreLoot calls
This commit is contained in:
VladimirMangos 2010-11-01 00:02:51 +03:00
parent 9a5accf8a9
commit f48e768a70
21 changed files with 392 additions and 132 deletions

View file

@ -333,6 +333,25 @@ LootItem::LootItem(LootStoreItem const& li)
is_counted = 0;
}
LootItem::LootItem(uint32 itemid_, uint32 count_, uint32 randomSuffix_, int32 randomPropertyId_)
{
itemid = itemid_;
conditionId = 0;
ItemPrototype const* proto = ObjectMgr::GetItemPrototype(itemid);
freeforall = proto && (proto->Flags & ITEM_FLAG_PARTY_LOOT);
needs_quest = false;
count = count_;
randomSuffix = randomSuffix_;
randomPropertyId = randomPropertyId_;
is_looted = 0;
is_blocked = 0;
is_underthreshold = 0;
is_counted = 0;
}
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
bool LootItem::AllowedForPlayer(Player const * player) const
{