mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[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:
parent
9a5accf8a9
commit
f48e768a70
21 changed files with 392 additions and 132 deletions
|
|
@ -1927,6 +1927,35 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
const_cast<ItemPrototype*>(proto)->InventoryType = INVTYPE_NON_EQUIP;
|
||||
}
|
||||
|
||||
if (proto->InventoryType != INVTYPE_NON_EQUIP)
|
||||
{
|
||||
if(proto->Flags & ITEM_FLAG_LOOTABLE)
|
||||
{
|
||||
sLog.outErrorDb("Item container (Entry: %u) has not allowed for containers flag ITEM_FLAG_LOOTABLE (%u), flag removed.", i, ITEM_FLAG_LOOTABLE);
|
||||
const_cast<ItemPrototype*>(proto)->Flags &= ~ITEM_FLAG_LOOTABLE;
|
||||
}
|
||||
|
||||
if(proto->Flags & ITEM_FLAG_MILLABLE)
|
||||
{
|
||||
sLog.outErrorDb("Item container (Entry: %u) has not allowed for containers flag ITEM_FLAG_MILLABLE (%u), flag removed.", i, ITEM_FLAG_MILLABLE);
|
||||
const_cast<ItemPrototype*>(proto)->Flags &= ~ITEM_FLAG_MILLABLE;
|
||||
}
|
||||
|
||||
if(proto->Flags & ITEM_FLAG_PROSPECTABLE)
|
||||
{
|
||||
sLog.outErrorDb("Item container (Entry: %u) has not allowed for containers flag ITEM_FLAG_PROSPECTABLE (%u), flag removed.", i, ITEM_FLAG_PROSPECTABLE);
|
||||
const_cast<ItemPrototype*>(proto)->Flags &= ~ITEM_FLAG_PROSPECTABLE;
|
||||
}
|
||||
}
|
||||
else if (proto->InventoryType != INVTYPE_BAG)
|
||||
{
|
||||
if (proto->ContainerSlots > 0)
|
||||
{
|
||||
sLog.outErrorDb("Non-container item (Entry: %u) has ContainerSlots (%u), set to 0.", i, proto->ContainerSlots);
|
||||
const_cast<ItemPrototype*>(proto)->ContainerSlots = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(proto->RequiredSkill >= MAX_SKILL_TYPE)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong RequiredSkill value (%u)",i,proto->RequiredSkill);
|
||||
|
|
@ -2005,17 +2034,11 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
|
||||
if (proto->ContainerSlots)
|
||||
{
|
||||
if(proto->ContainerSlots > MAX_BAG_SIZE)
|
||||
if (proto->ContainerSlots > MAX_BAG_SIZE)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has too large value in ContainerSlots (%u), replace by hardcoded limit (%u).",i,proto->ContainerSlots,MAX_BAG_SIZE);
|
||||
const_cast<ItemPrototype*>(proto)->ContainerSlots = MAX_BAG_SIZE;
|
||||
}
|
||||
|
||||
if(proto->Flags & ITEM_FLAG_LOOTABLE)
|
||||
{
|
||||
sLog.outErrorDb("Item container (Entry: %u) has not allowed for containers flag ITEM_FLAG_LOOTABLE (%u), flag removed.",i,ITEM_FLAG_LOOTABLE);
|
||||
const_cast<ItemPrototype*>(proto)->Flags &= ~ITEM_FLAG_LOOTABLE;
|
||||
}
|
||||
}
|
||||
|
||||
if(proto->StatsCount > MAX_ITEM_PROTO_STATS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue