View Single Post
11/17/14, 08:58 PM   #10
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Originally Posted by Randactyl View Post
I'm with circonian. I have no idea why each inventory slot needs to be updated when switching mounts - seems silly.
Not sure how exactly it's implemented, but if these are true they do need to repack on horse capacity switch:
- slot indexes not guaranteed filled 1-20 for 20 items (probably true)
- no item can have a slotIndex greater than the capacity

Example:
You're 120/120, remove items with slotIndex 1-30 to get to 90/120. Switch to 100-capacity horse. There'd still be items with slotIndex >100, so they'd have to be moved down.

Now, they could still rework how they repack stuff to limit the number of items that have to switch slots (only move those that'd be over capacity) or even remove that 2nd limitation altogether. I suppose there's a chance they'd do something, since it does hiccup on even normal game switch, but I wouldn't count on it.

----------------------------------------
From the author end, the best bet is probably to just make sure you don't do slotUpdate during a horse swap. If there isn't an event for that, you can tie into showing/hiding the stable scene. It's possible you might not have to even do a scan afterwords. (If you cache slotIndex, you probably will, but think that's probably it.)
  Reply With Quote