mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-12-31 04:37:11 +01:00
update new many items from 7.81. Also fix issue with runes charges to not stack and not throw client debug.
This commit is contained in:
@@ -2131,7 +2131,7 @@ ReturnValue Player::queryAdd(int32_t index, const Thing& thing, uint32_t count,
|
||||
if (ret == RETURNVALUE_NOERROR || ret == RETURNVALUE_NOTENOUGHROOM) {
|
||||
//need an exchange with source?
|
||||
const Item* inventoryItem = getInventoryItem(static_cast<slots_t>(index));
|
||||
if (inventoryItem && (!inventoryItem->isStackable() || inventoryItem->getID() != item->getID())) {
|
||||
if (inventoryItem && (!inventoryItem->isStackable() || inventoryItem->isRune() || inventoryItem->getID() != item->getID())) {
|
||||
return RETURNVALUE_NEEDEXCHANGE;
|
||||
}
|
||||
|
||||
@@ -2200,15 +2200,18 @@ ReturnValue Player::queryMaxCount(int32_t index, const Thing& thing, uint32_t co
|
||||
}
|
||||
|
||||
if (destItem) {
|
||||
if (destItem->isStackable() && item->equals(destItem) && destItem->getItemCount() < 100) {
|
||||
if (!destItem->isRune() && destItem->isStackable() && item->equals(destItem) && destItem->getItemCount() < 100) {
|
||||
maxQueryCount = 100 - destItem->getItemCount();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
maxQueryCount = 0;
|
||||
}
|
||||
} else if (queryAdd(index, *item, count, flags) == RETURNVALUE_NOERROR) { //empty slot
|
||||
}
|
||||
else if (queryAdd(index, *item, count, flags) == RETURNVALUE_NOERROR) { //empty slot
|
||||
if (item->isStackable()) {
|
||||
maxQueryCount = 100;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
maxQueryCount = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user