mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7015] Implement support -1 in item_template.stackable and item_template.maxcount fields.
Also disable incorrect used vanity pets/currences/quest items special slotes. All items in its will be send by mail to characters at re-login. Fixed code for item stacks operations with size > 255.
This commit is contained in:
parent
7864c9aee1
commit
ee505ec9da
16 changed files with 109 additions and 61 deletions
|
|
@ -1705,11 +1705,22 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
else if(proto->RequiredReputationRank > MIN_REPUTATION_RANK)
|
||||
sLog.outErrorDb("Item (Entry: %u) has RequiredReputationFaction ==0 but RequiredReputationRank > 0, rank setting is useless.",i);
|
||||
|
||||
if(proto->MaxCount < -1)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has too large negative in maxcount (%i), replace by value (-1) no storing limits.",i,proto->MaxCount);
|
||||
const_cast<ItemPrototype*>(proto)->MaxCount = -1;
|
||||
}
|
||||
|
||||
if(proto->Stackable==0)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong value in stackable (%u), replace by default 1.",i,proto->Stackable);
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.",i,proto->Stackable);
|
||||
const_cast<ItemPrototype*>(proto)->Stackable = 1;
|
||||
}
|
||||
else if(proto->Stackable < -1)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has too large negative in stackable (%i), replace by value (-1) no stacking limits.",i,proto->Stackable);
|
||||
const_cast<ItemPrototype*>(proto)->Stackable = -1;
|
||||
}
|
||||
else if(proto->Stackable > 255)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has too large value in stackable (%u), replace by hardcoded upper limit (255).",i,proto->Stackable);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue