kaansoral / adventureland

Adventure Land The Open Source CODE MMORPG
Other
189 stars 60 forks source link

Add `from` and `to` for item splits #107

Closed earthiverse closed 6 months ago

earthiverse commented 7 months ago

Changes:

kaansoral commented 6 months ago

When you refactor the code too, it usually requires a deeper review as it might introduce loopholes. Did you review your code from this perspective? If you're confident I'll merge

earthiverse commented 6 months ago

Did you review your code from this perspective?

I tested it locally in Docker and it looks good to me.

image

First split was trying to split a cring (failed -> OK) Second split was trying to split a stack of 80 potions with a quantity of 160 (this is a small optimization, we're now checking quantity requested >= quantity available instead of quantity requested == quantity available), it just returns the original stack position Third split was splitting 1 potion off that 80 stack, which also was OK