Thread: wallet
View Single Post
  #7  
Unread 04-23-2012, 03:34 PM
Niwashi's Avatar
Niwashi Niwashi is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Feb 2011
Posts: 7
Quote:
Originally Posted by Garan
What is happening is that the barter wallet is getting initialized over time after the plugin is loaded but the events are not firing for currencies that already exist in the wallet but are just being initialized.
Can I count on the events not firing? I.e. are new currencies discovered during the Update work-around simply being loaded from previous game sessions whereas new currencies found after an ItemAdded event are newly earned currencies that should be assigned to my current character? And if a new currency is earned in-game, would the ItemAdded event occur before the next Update?

And I'm still not quite sure when to decide the initialization is over and any currencies still not in the wallet are not available and should be deleted from my assignments. Maybe I'll just leave that part at when the player first opens my Per Character Wallet window like I had before. Hopefully, by the time the player is in game and opening windows, the game has finished loading.


Quote:
Originally Posted by Garan
What should happen when Turbine fixes their bug is that either all of the currencies that are already in the wallet should be available when the plugin loads or the ItemAdded event will fire as each existing currency gets initialized. Either mechanism will be sufficient to get away from the Update handler.
Either may be sufficient for your application, but if they end up firing the same ItemAdded event on loading pre-existing currencies that they fire to indicate the character actually earning a new currency in-game which he/she simply hadn't had before, then I'm not going to know which events mean I should assign the currency to my character and which don't.


Quote:
Originally Posted by Garan
Character contribution to shared currencies is something I was already considering for Wallet, but it seems to have limited usefulness so it got a pretty low priority on the ToDo list.
Well, your Wallet plugin is a lot prettier than my Per-Character Wallet plugin is likely to end up being. So if you ever get around to adding it, it'll probably be an improvement over what I'll have available.


EDIT:
Oh, and another question: Besides the ItemAdded event, is there a corresponding ItemDeleted event or something of the sort? Or does "ItemAdded" really mean any change in which items are included in the wallet? The wallet contains only currencies that the character has, so a currency would disappear from the wallet when a character spends their last of it.

Last edited by Niwashi : 04-23-2012 at 03:38 PM.
Reply With Quote