mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[Bug Fix] Allow Items in ROF2 to Stack to 32,767 (#4556)
* [Bug Fix] Allow Items in ROF2 to Stack to 32,767 * Update rof2.cpp
This commit is contained in:
parent
3b779ef301
commit
e258aaa068
@ -6365,9 +6365,18 @@ namespace RoF2
|
||||
//sprintf(hdr.unknown000, "06e0002Y1W00");
|
||||
strn0cpy(hdr.unknown000, fmt::format("{:016}\0", inst->GetSerialNumber()).c_str(),sizeof(hdr.unknown000));
|
||||
|
||||
hdr.stacksize =
|
||||
item->ID == PARCEL_MONEY_ITEM_ID ? inst->GetPrice() : (inst->IsStackable() ? ((inst->GetCharges() > 1000)
|
||||
? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||
hdr.stacksize = 1;
|
||||
|
||||
if (item->ID == PARCEL_MONEY_ITEM_ID) {
|
||||
hdr.stacksize = inst->GetPrice();
|
||||
} else if (inst->IsStackable()) {
|
||||
if (inst->GetCharges() > std::numeric_limits<int16>::max()) {
|
||||
hdr.stacksize = std::numeric_limits<uint32>::max();
|
||||
} else {
|
||||
hdr.stacksize = inst->GetCharges();
|
||||
}
|
||||
}
|
||||
|
||||
hdr.unknown004 = 0;
|
||||
|
||||
structs::InventorySlot_Struct slot_id{};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user