Map entities are now stored in a dual-key collection that is indexed by both map coordinates and unique ID based on the type of entity (item uid, npc index, character id). This allows rendering of map entities to do an O(1) lookup rather than O(N) when determining if a grid space has a renderable element, which significantly improves performance when there are many entities to render (especially considering resizable window mode).
Additionally, map items are now culled unconditionally when the main character gets out of range, similar to how Characters/NPCs are culled by UnknownEntitiesRequester. This is due to the fact that there is no server packet that despawns an item.
Minor bugs fixed:
Shop dialog only allowed MaxBuy of 1 when the shop defined a MaxBuy amount (logic incorrectly reversed)
Display of stats 'evade' and 'armor' were swapped in the stat panel
Map entities are now stored in a dual-key collection that is indexed by both map coordinates and unique ID based on the type of entity (item uid, npc index, character id). This allows rendering of map entities to do an O(1) lookup rather than O(N) when determining if a grid space has a renderable element, which significantly improves performance when there are many entities to render (especially considering resizable window mode).
Additionally, map items are now culled unconditionally when the main character gets out of range, similar to how Characters/NPCs are culled by
UnknownEntitiesRequester
. This is due to the fact that there is no server packet that despawns an item.Minor bugs fixed: