Combat:getDammod:subs hook not used anymore?

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Combat:getDammod:subs hook not used anymore?

#1 Post by Doctornull »

Code: Select all

   class:bindHook("Combat:getDammod:subs",
		  function(self, combat, dammod, subs)
                       .....
		  end
   )
In the above hook, dammod used to be populated, and modifications to dammod were honored (so I could do stuff with weapon stat mods in my addon).

Now I'm getting nil for dammod and subs, and modifications to dammod aren't being honored by the engine.

What changed?

Is there a replacement callback or hook? I don't see anything near getDammod in Combat.lua
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Combat:getDammod:subs hook not used anymore?

#2 Post by darkgod »

?? bindHook function always have the same parameters list: (self, data) tah'ts all and that never has changed :)
What you want is data.dammod, data.subs and so on
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Combat:getDammod:subs hook not used anymore?

#3 Post by Doctornull »

darkgod wrote:?? bindHook function always have the same parameters list: (self, data) tah'ts all and that never has changed :)
What you want is data.dammod, data.subs and so on
Thanks, I'll do that instead!

I wonder why the code appeared to work in previous versions.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Combat:getDammod:subs hook not used anymore?

#4 Post by HousePet »

Variable still had values assigned to it outside the scope of its definition maybe?
My feedback meter decays into coding. Give me feedback and I make mods.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Combat:getDammod:subs hook not used anymore?

#5 Post by Doctornull »

HousePet wrote:Variable still had values assigned to it outside the scope of its definition maybe?
Ah, something that used to be global turned into better code between then and 1.5.10? Possible, I guess.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Post Reply