Since this is a cross-repo issue/investigation/idea, I'm sharing my conclusions here:
TMWAthena can handle 32-bit amounts internally, if:
-
amount in src/proto2/net-Item.hpp is changed to int32_t/Little32
-
MAX_AMOUNT in src/mmo/consts.h is changed to 2000000000
-
-
Hercules was not tested, but seems to use 32-bit integer amounts internally as well. The provided database schema in ML also uses INTs for the back-end storage.
-
ManaVerse already uses 32-bit amounts internally.
-
TMWA protocol:
-
You can get to 1000000 of an item in your inventory by repeatedly adding up to 215-1 with @item BoneArrows 32000
-
All packets in TMWA are apparently 16-bit.
-
-
ML Hercules protocol: some packets use 32,some 16 bit amounts. Investigation may continue at later date.
Idea: it might be easy enough (server-side change only) to enable storing multiple stacks of the same item. All packets use inventory indices and thus it's unambigous which stack you are taking from. When adding an item, the stack spill-over would happen server-side. Thoughts?