Quote Originally Posted by ZorbaTHut View Post
Quote Originally Posted by seebs obvious sock View Post
Couple questions/comments.Observation: IT IS SO COOL that Command.Item.Move() does the stacking thing as expected -- moves as many as it can rather than erroring out. I would still like it to take an optional N other than "all of them", though. Imagine that I have a stack of 20 items and a stack of 40 items. I would like to have two stacks of 30. So far as I can tell, in the API as it exists I can't do that unless I have a spare slot.
Glad it's useful Our server protocol doesn't do that either, and right now I'm not up for making server changes in order to expose addon features that our base UI doesn't even provide. For similar reasons, there's no "split this stack into this slot" command. If it were possible easily, I'd provide it, but right now I suspect people would rather have me working on other features
Quote Originally Posted by seebs obvious sock View Post
Questions:What does an item ID really refer to, exactly? If I move an entire stack from one slot to another, will its item ID stay the same? What about moving from, say, inventory to bank? Inventory to guild vault? Does the item ID stay the same when the stack count changes? Are item IDs consistent between sessions? Are item IDs unique -- as in, if I destroy or lose a given item, will that ID stay unused for the rest of the session, or might it get reused?
That's a really good question.The official answer: an item ID is an opaque number that refers to a single stack of items. It is guaranteed to remain unmodified until a stack is manipulated in any fashion. It is guaranteed to be unique until then, but may be reused once its lifetime is over. It may be client-specific or session-specific.The slightly unofficial answer: it somewhat depends on what our server developers do. I *believe* that, right now, the ID will stay the same through all movements (besides stack combinations - for obvious reasons, one of the IDs might be eradicated) as well as through logoff and logon. I honestly don't know if or when IDs may be re-used.If this behavior changes, you might not be informed. I'll try to let you know, but this is one of those "no guarantees" things.
Quote Originally Posted by seebs obvious sock View Post
How often do you expect slot specifiers to change? e.g., if I stash Inspect.Item.Detail() for a character in a SavedVariable and look at it from another character, do I have reasonable confidence that the slot IDs will still be in the same format? It sounds like these are intended to be subject to redefinition or change in the future -- will there be some kind of warning or way to check in the API and parse old names in case we have some stashed?
Official answer: The internal representation of slot specifiers, or anything else returned by the addon system as an ID, may change without notice and is not guaranteed to be the same through clients.Unofficial answer: It *probably* won't change. If it does change, I'll try to keep you posted, and it'll most likely happen during a major patch unless it's somehow a security issue. But this is a tier or two of carefulness below how I treat official exposed APIs. As an example, I think the ability ID format is probably going to change in 1.7, and I know this is going to break a few addons, but it fixes some issues I'm having with those IDs.
Quote Originally Posted by seebs obvious sock View Post
Do you have any sketchy notions floating about of what error handling would look like for this? I can easily write something which will TRY to split a stack into stacks-of-one, but I could run out of bag space. What happens then?
I'm currently planning to rig up some kind of callback system for status returns. Most likely, this will be a function that you can pass as a parameter, which will get a computer-readable result message, probably nil for success.
Quote Originally Posted by seebs obvious sock View Post
Can anything other than Destroy() result in the destruction of objects from a player perspective? (Say, moving two stacks of 20 together into a single stack of 20 doesn't count, because all 40 items still exist, but if trying to split a stack resulted in excess items disappearing, that would be worrisome.)
Besides macros that do "use" and the like, I can't think of anything. With the obvious exception of Command.Item.Destroy(), and the slightly less obvious exception of using Command.Item.Move() to move into a deposit-only guild bank vault or to eat one of your daily guild bank withdrawals, nothing in the Command.* hierarchy causes irreversible changes to your character.
Jump to post...