View Single Post
11-12-16, 07:46 AM   #8
_Max_Cavalera_
A Fallenroot Satyr
 
_Max_Cavalera_'s Avatar
Join Date: Dec 2007
Posts: 28
Originally Posted by SDPhantom View Post
UNIT_INVENTORY_CHANGED fires when you equip, swap, or unequip an item. BAG_UPDATE is the event that fires when you loot, drop, or move items around in your bags.
Well... I completely messed that one up, was probably using BAG_UPDATE, no wonder it wasn't a good choice

You've been a huge help, I've learned a lot so far, thank you for that.

I'm going to study the code and apply those ideas maybe later today if I have time. In any case, when I have it working I'll post an update here.

Once again thank you for your help

edit:. Apparently I WAS using UNIT_INVENTORY_CHANGED and it does fire when you loot stuff
I even made a video to show you.

edit:. I know I'm a bother xD But I'm just like this, I NEEEED to know why stuff does one thing and then another and how it works.

So I did some testing, and apparently, the game fires some events completely randomly or whatever and that's why PLAYER_SPECIALIZATION_CHANGED some times works and other times doesn't.

Here's a pic of my test



I chose those events because they seemed to be the most important when changing spec.
As you can see, it worked when PLAYER_SPECIALIZATION_CHANGED was the last event to fire (or should I say, when it happens AFTER UNIT_INVENTORY_CHANGED), which doesn't happen always. In my test it did like 8 out of 10 times.

The spellcast succeeded ones are, one from finishing changing the spec, the other one is from the passive hidden effect that changes the artifact weapon automatically. I have no idea why some times events for the same thing fire twice, because even though two of those spellcast events aren't the same as they're doing different things, the other ones are "re-fires" of one of those two

I did exactly the same thing every time, didn't move or anything, had the spec window open, choose spec, clicked apply, let it finish, choose another spec, clicked apply, let it finish, etc etc etc... all specs have their artifact weapon in the bag available.

Last edited by _Max_Cavalera_ : 11-12-16 at 12:34 PM.
  Reply With Quote