Download
(69Kb)
Download
Updated: 05-24-12 09:51 PM
Pictures
File Info
Updated:05-24-12 09:51 PM
Created:01-01-12 09:21 PM
Downloads:2,682
Favorites:18
MD5:

Vault

Version: 4.3.021
by: VagrantEsha [More]

What is it?

Have you ever accidentally sold something, only to find out too late that you have, and that there's no way to get it back? Have you worried about this and stressed out a bit too much whilst selling things, just to be absolutely sure you don't sell your valuables? Have you triple-checked the things you're destroying just to make sure that you're not destroying a valuable whilst cleaning out your bags? If this sounds like you, then this mod is for you.

How does it work?

Essentially, you can build a list of items that you want protected by Vault, and then, when you go to a vendor, if you accidentally sell an item, it'll buy it back for you right away, tell you that it did, and play a sound to warn you that you're not paying attention to what you're selling. If you try to destroy an item that's in your Vault, then Vault will stop you from doing so.

Usage:

The elements of Vault are split up into modules. This is so that you can pick and choose the parts that you want and only those parts. You can enable/disable modules via the addons menu at the character select screen, or if you prefer, you could just remove the folders entirely. Pick and mix, use what you want, the choice is yours.

In this section, I'll go through the various modules that vault has, and what they do.

-- AntiDestroy Module

This module stops you from destroy items in your vault. If you drag an item outside your bag and it's in your vault, then vault will automatically clear your cursor and warn you, thus keeping your valuable items safe. This only affects items in your vault, so to keep what you want safe, simply add it to your vault and never worry about accidentally destroying your best items ever again!

-- AntiSell Module

This module checks what you're selling to vendors. If you try to sell an item that's in your vault to a vendor, then it will automatically be bought back for you. Even if an addon tries to sell all greys, this module will ensure that any item that's in your vault remains in your bags, and not with teh vendor. So to protect your items, just add them to your vault list, and never worry whilst selling at a vendor again!

-- Slash Command Module

The commands for this are as follows:

/vault [Item Link] - adds or removes an item from the vault as a toggle.
/vault check [Item Link] - checks whether the item is already in the vault or not.
/vault wipe - removes all your current character's items from the vault.
/vault restore - restores your vault from its last backup state.
/vault help - brings up a printout with this information.

Not supplying an item link works the same as the latter option, there. It just gives the player a help printout.

-- DataBroker Module

To add or remove an item, drag the item to the DataBroker plugin and click on it to to do so. It acts as a toggle, so to remove the item you do the same thing. To remove the item from your cursor when you're done, press esc or right-click (same as the default UI).

The DataBroker plugin has a tooltip which contains a list of all the items already in your vault, so just mouseover it to find out what you have in your vault. And finally, this module also has features pertaining to the database: If you wish to clear the database, hold alt, then click the plugin. If you wish to restore your database from a backup, hold alt and shift, then click the button.

-- Blizz Options Module

To access this, head into the Interface options panel and click the AddOns tab. Scroll down in the left panel until you see Vault and click on it there.

You are presented with three elements.

The first of which allows you to add an item. There's a button present where, if you drag an item to it and click on it, it'll add that item to the vault. You can dismiss the icon from your cursor with either esc or right-click (same as the default UI).

The next element is a list of items in your vault - this will show up as blank if there are none. To remove an item from your vault, just click one of the item names in this vault. The list should update immediately to reflect this.

Finally, the last two elements pertain to database control. The first button will allow you to empty your current character's vault, and the second button will allow you to restore your vault from its last backed up state.

-- Tooltip Module

This adds 'Vault Protected' to your item tooltip where the item is in the vault. So, if you have an item in the vault, and you mouseover an item, right below the item name you'll see 'Vault Protected,' if the item is not in the vault, then that text will not be there.

I have also taken this opportunity to make the tooltips a little easier to read by putting a blank line under the title in both instances. If this is something that people don't like, I'll remove it. I actually find it makes the tooltips easier to skim though, but maybe that's just me subjectively.

-- Other Modules

I don't have any others at this moment in time, and with the Blizz Options, DataBroker, Tooltip, and the Slash Command modules, I think I've covered all the bases. I'm very open to suggestions, however, and if you'd like to see a new module coded, then poke me, and I'll see what I can do.

Thanks To:

I'd like to offer my thanks to everyone in the comments section, here. It's been a long road for Vault with a lot of experimentation. I'll keep trying to make it better, and hopefully without so many bugs.

But the users of my mod have been polite, patient, and just really stand up people. I appreciate that.

Caveats/Issues:

None currently known.

- 4.3.021

* Fix: Should fix issues with databases not updating to the new database style.

- 4.3.020

* Hotfix: I accidentally broke StaticPopup, so some buttons on popup dialogues were broken. If you experienced this issue, this version will fix it. Sorry about that.

- 4.3.019

* Note: Due to the restructuring that happened in Vault 018, please remove your Vault folder before installing this version if you hadn't done so with 018.

* A bug was fixed regarding near-clone IDs that could have Vault get confused about what was in your vault or not. If you've mysteriously had Vault insist that an item is protected when it isn't showing up as such, then this update will fix that issue.

* New module that stops items from being destroyed if they're in your vault. This new feature essentially renders the need to use Blizzard's item restore unnecessary! If you use Vault to protect all your valued items, you'll now never accidentally sell them or destroy them!

* The selling functionality has now been separated out into its own module, so if you only want the functionality which stops you from accidentally destroying items or vice versa, then you have that choice.

* The confirmation dialogues for the Blizz Options module wipe button tended to appear behind the options dialogue sometimes, depending on where on your screen it was. This isn't great design. So I've taken the confirmation dialogues away for now, they work on first click.

* In relation to the above, the BlizzOptions, SlashCommand, and DataBroker modules all now have a way to restore your Vault database. It keeps a backup of the session vault, so if you accidentally wipe it (as a friend of mine did) or you mess it up somehow, you can just restore from that backup.

* A number of other bug fixes and optimisations to deal with possible erroneous Vault item lists. And just a general code cleanup overall. Getting Vault to where I want it to be, now.

- 4.3.018

I've reorganised the folder so that disabling modues is easier, you no longer have to delete them, you can instead just turn them off in the Addons menu panel before logging in.

Please delete the Vault folder before upgrading to this version. Thanks.

- 4.3.017

I've added a tooltip module. This adds 'Vault Protected' to the tooltips of items which are in your vault so that you can see that even when selling.

- 4.3.016

So, I tried loading Vault on its own to see if I had the embeds right. Everything but the Blizzard Options module - of course. So I've fixed up the embeds for that.

So now Vault will load on its own without issue. I had a FUN TIME going through AceGUI to see exactly which elements were necessary and which weren't, because I'll be damned if I'll load files that I don't need to. :|

There's even a part in AceConfig that tries to force you to load AceConfigCmd and that's just not cool. They really need to modularise that stuff so that AceConfigCmd is optional. Well, that's dealt with.

I kind of wish that there were a library for Blizz Options stuff out there that wasn't like pulling teeth.

- 4.3.015

Had a useless line of code in the Blizzard Options module. It was bothering me.

- 4.3.014

Ffff. I screwed up the zip. The previous version was actually working for me, so there are no changes in this. I just happened to screw up the zip. Derp. I blame it being version 13. So it is no longer version 13!

- 4.3.013

Small optimisation for the Blizzard Options Module. I realised that there was one table I could nil once I was done with it (once the options frame closed). No need to leave that hanging around in memory if it's not being used.

- 4.3.012

In this version I've made the Blizzard Options Module a bit more responsive. Essentially, the following will occur:

- Add button will update to notify you of a successful addition.
- Add button will tell you if you're trying to add an item that's already in your vault.
- Wipe button tells you that your vault has been successfully wiped.
- Buttons return to their original names when the Blizz Options frame closes.

I already had the add button tell you if you were clicking it without an item on your cursor, so it wasn't a big issue to update the module to include this extra functionality.

Oh, and in the previous version, the add button would work like an add/remove toggle, that was an unintended 'feature' that isn't in this version - this version behaves how you would expect it to, given what the UI says.

- 4.3.011

I wasn't satisfied with the quarter-arsed way I implemented the slash command system for controlling Vault, and I also wasn't happy that the slash command stuff was part of the core mod. So I ripped that out, redid it, modularised everything, and now? Now there's a prettified and far better slash command system, and a Blizzard Options module (AceConfig-3.0 based) too, because I could.

See the description for details!

- 4.3.010

I dislike code detritius, and I noticed that there were a couple of variables lying around from teh previous rewrite that were no longer being used, so I got rid of those.

There was also an issue with supplying /vault with no link. It's supposed to give you instructions as to what to do with the mod, as is /vault help, but instead it just threw an error. Whoops. This was due to me not passing things properly to my own inform function thanks to having had a 'derp' moment.

So that's 010.

- 4.3.009

Vault's DataBroker component had the same icon as Atlas. I've remedied this by using a different lockbox icon. INV Box 04, the purple one, if you're curious!

I also took the time to poke the code and make sure that I replaced all my tabs with eight spaces, to make for ease of reading in viewers other than Windows notepad. (I keep forgetting that, and I like to keep my mods as readable as possible so that if people want to poke stuff to see how it works, they can do that with the least amount of hassle.)

- 4.3.008

I'm going from a clean slate with this version, as the last couple of versions have seen some bug or another getting in the way. However, I've done a lot of testing of this version. At one point I got a little nuts and decided to just sell my entire bag by right-click spamming.

The code is so solid now that it bought back every item in my list, and it left the items that weren't in my list sold. So right now? I can't see any issues. And after a bumpy road, I finally feel I've reached the end of what I can do with Vault.

From here on out I suspect the only changes will be minor ones as they're necessary, if any. But after having rapidly sold my entire bag and having seen Vault buy back things without any errors, and having done a good hour or two of testing sitting at a vendor and sell-spamming, I can't imagine that any bugs will arise.

If they do, I'll fix them in short order. But right now I'm feeling pretty good about this.
Optional Files (0)


Post A Reply Comment Options
Unread 01-03-12, 03:00 AM  
bjorndalf
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Error while clicking on consumables

Hi!

first and definitely a addon long overdue..., congrats!

But:

It throws an error when you click on something usable in your inventory:

Code:
Error occured in: AddOn: Vault
Count: 1
Message: Error: AddOn Vault attempted to call a forbidden function (UNKNOWN()) from a tainted execution path.
Debug:
   [C]: ?
   [C]: ?
   Vault\Vault.lua:45: UseContainerItem()
   ..\FrameXML\ContainerFrame.lua:771: ContainerFrameItemButton_OnClick()
   [string "*:OnClick"]:12:
      [string "*:OnClick"]:1
   [C]: ?
Report comment to moderator  
Reply With Quote
Unread 01-03-12, 06:21 AM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
Oh, bah. Sounds like it's tainting. Which is weird because it didn't in my original tests. I'll work on it!

---

Actually, scratch that, I think I might know what's doing this. If it's what I think it is, then I'll have an update out in due course.
Last edited by VagrantEsha : 01-03-12 at 06:22 AM.
Report comment to moderator  
Reply With Quote
Unread 01-03-12, 06:49 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 548
Uploads: 13
Special addon.
Report comment to moderator  
Reply With Quote
Unread 01-03-12, 11:46 AM  
bjorndalf
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Works as described.

Thanks Vagrant for the prompt reaction!

Works as described in the change log. No more complaints
Report comment to moderator  
Reply With Quote
Unread 01-03-12, 03:30 PM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
Yeah, sorry about that.

It's such a weird thing, because when I was testing it I managed to hook UseContainerItem without the interface flipping a shit, but I'm... not sure how I did that, since the code was changing rapidly, and then the test version was deleted and I wrote up the main thing, and stuff got changed along the way.

It's also possible that I was misinterpreting things. So there's that, too, but I'm going to keep working at it! I'll try and figure out ways to make it better, but at the moment, this earlier version is the best approach. It's not absolutely perfect, but it's something, and it will stop me from selling those damned robes I've become so attached to.

I swear, they give the worgen the best level 1 robes. There's just no clowniness about them at all. And that's why this mod exists in the first place. I am so never selling those, and they're not getting banked, either. Despite my bad habit for selling things and not realising that I have, and then realoading the UI only to have a ffffff moment. I'm stubborn.

So I'm invested in this. I'm trying not to get too involved in coding any more due to some health issues, but this one thing I'm going to work at. It's not so bad, anyway, since I kept it simple. No unnecessary screens of menus to bloat it out. It does what it does and nothing more.
Report comment to moderator  
Reply With Quote
Unread 01-09-12, 12:01 PM  
Arxae
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 44
File comments: 99
Uploads: 2
Possible to have locked items get a special glow around the item?
Report comment to moderator  
Reply With Quote
Unread 01-10-12, 02:14 PM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
Hrmn.

That's an issue, because that would require bag parsing of epic magnitudes that I don't really feel like doing, because it would end up being a huge mess. It probably wouldn't be efficient, since I don't know what I'm doing there, and it would end up with a massive memory footprint.

If there's some kind of library out there that adds a glow to an item by feeding the item link/ID to a function, so that I can do it that way, then I'd certainly do it. And I will look. But what I'm saying here is: No promises. I can't promise something that I can't potentially do, or can't do without making it a huge mess that would make me cry inside.
Report comment to moderator  
Reply With Quote
Unread 01-11-12, 10:32 AM  
Arxae
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 44
File comments: 99
Uploads: 2
Originally Posted by VagrantEsha
Hrmn.

That's an issue, because that would require bag parsing of epic magnitudes that I don't really feel like doing, because it would end up being a huge mess. It probably wouldn't be efficient, since I don't know what I'm doing there, and it would end up with a massive memory footprint.

If there's some kind of library out there that adds a glow to an item by feeding the item link/ID to a function, so that I can do it that way, then I'd certainly do it. And I will look. But what I'm saying here is: No promises. I can't promise something that I can't potentially do, or can't do without making it a huge mess that would make me cry inside.
I don't want to make you cry inside don't know any such lib unfortunatly tho :<
Report comment to moderator  
Reply With Quote
Unread 01-11-12, 11:48 AM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
The thing is is that I just don't trust myself to do this well. I'm already spotting things that I want to clean up in Vault and there'll be a new version up soon. But that? That would likely cause Vault to explode to massive sizes.

Can we even add glow without causing taint any more?

Okay, how about this: Show me a mod, any mod, which allows you to add a glow to an item in a customised way for any reason, and I'll take a look. I just need to understand how it works better than I do. I have an idea, but I'd rather see what the 'official' way for doing it is.
Report comment to moderator  
Reply With Quote
Unread 01-13-12, 11:22 AM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
Okay, if I may have your attention for a moment for a decision?

I want some opinions on the implementation. Would you prefer it as it currently is, holding the key and moving the item to add/remove it to/from the list, or would you rather do it another way?

The alternative I have is that I could use a /vault slash command and shift-clicked item refs. So you type /vault and then you hit shift-click to send the item to the chat frame and that'll toggle the item in/out of the vault. Or you could do /vault check and shift-cliick and that'll check the presence of the item.

One more option that is actually only slightly more involved, but definitely doable, is a DataBroker plugin. I could set it up so that dragging an item and dropping it on the plugin actually adds/removes items, and then the item list would be in the DataBroker tooltip.

(The latter version may sound involved but it isn't at all, really. So don't worry about that. It's just some OnMouseUp and GetCursorInfo shenanigans.)

I may evolve Vault a bit, but I want it to be as useful to everyone who uses it as it is to me. Of these versions, which do you prefer? Vagrants need votes!
Last edited by VagrantEsha : 01-13-12 at 11:35 AM.
Report comment to moderator  
Reply With Quote
Unread 01-21-12, 08:26 AM  
Arxae
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 44
File comments: 99
Uploads: 2
Originally Posted by VagrantEsha
Okay, if I may have your attention for a moment for a decision?

I want some opinions on the implementation. Would you prefer it as it currently is, holding the key and moving the item to add/remove it to/from the list, or would you rather do it another way?

The alternative I have is that I could use a /vault slash command and shift-clicked item refs. So you type /vault and then you hit shift-click to send the item to the chat frame and that'll toggle the item in/out of the vault. Or you could do /vault check and shift-cliick and that'll check the presence of the item.

One more option that is actually only slightly more involved, but definitely doable, is a DataBroker plugin. I could set it up so that dragging an item and dropping it on the plugin actually adds/removes items, and then the item list would be in the DataBroker tooltip.

(The latter version may sound involved but it isn't at all, really. So don't worry about that. It's just some OnMouseUp and GetCursorInfo shenanigans.)

I may evolve Vault a bit, but I want it to be as useful to everyone who uses it as it is to me. Of these versions, which do you prefer? Vagrants need votes!
Hmm, i prefer both second options actually
Maybe separate the LDB option into its own addon? (so its an option)
And i prefer the /command actually i keep have to come back whenever i need to use it because i forget the command /vault <link> is just faster and more intuitive imo
Report comment to moderator  
Reply With Quote
Unread 01-22-12, 02:55 PM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
If you've used 006, please update to 007 as soon as possible and don't change the database at all. There was a small bug in 006. If you have run into it, just clear your database (there is functionality for this in Vault - Bond Version, 007).

Anyway, if you're curious of the nature of the bug, check the ChangeLog. Unfortunately I was getting item names instead of item IDs when I switched things around for the slash command. D'oh. And I didn't notice because I already had plenty in my vault and didn't think to try clearing it. Double d'oh.

But that's all fixed now. And I have some nifty new functionality in there. This is probably the closest Vault is going to get to being perfect.

Now I'm going to go have a little lie down.
Report comment to moderator  
Reply With Quote
Unread 01-23-12, 06:23 AM  
Namtar
A Murloc Raider
 
Namtar's Avatar

Forum posts: 8
File comments: 27
Uploads: 0
There's something... weird happening at the moment. I use another addon (VendorMaster) to automatically sell all grey items, and since today, Vault buys them right back! The same with every item regardless of rarity I try to sell manually. I disabled VendorMaster and the behaviour continues. With Vault disabled, I can sell and auto-sell everything as usual.
Last edited by Namtar : 01-23-12 at 06:26 AM.
Report comment to moderator  
Reply With Quote
Unread 01-23-12, 09:55 AM  
VagrantEsha
Token Werewolf Fan
 
VagrantEsha's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 238
Uploads: 38
Yep, I found it.

I was playing WoW with a friend last night.

"Hrmn. I can't seem to sell this recipe I don't need."
"That's weird."
"See if you can sell it."
"I can't! Let's see if I can sell... anything... else... oh fffff..."
"Eh?"
"There's something up with Vault."

That was a rather hilarious moment and it took a very quick hotfix being done.

That hotfix, however, stood an entire night of testing. So... I'll get that uploaded.
Report comment to moderator  
Reply With Quote
Unread 01-23-12, 03:17 PM  
Namtar
A Murloc Raider
 
Namtar's Avatar

Forum posts: 8
File comments: 27
Uploads: 0
Yeah, it was about the same here.

"Okay, I got some grey items form the fishing daily again, but I know they will be sold automatica... wait, why are my bags still full? What is this Reptile Egg doing there again? Why can't I sell it? It keeps coming back, ohmygod, it haunts me! *flail*"

Thanks for the quick fix, I've already become attached to this addon - hey, it prevents me from selling my RP stuff
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: