Download
(1 Kb)
Download
Updated: 01-25-13 12:36 AM
Pictures
File Info
Compatibility:
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:01-25-13 12:36 AM
Created:09-04-12 01:03 PM
Downloads:1,130
Favorites:21
MD5:
Dual Spec Spam Filter (Fan Update)
Version: 3a
by: fostic_popcorn [More]
The original author is sweede and all credit goes to him. I renamed the addon slightly because as far as I know its primary purpose is for dualspeccing (vs respeccing).


I was searching for a MoP-updated addon that would hide the ridiculous amount of learned/unlearned messages when switching specs, and since I couldn't find one, I tried updating the one I already had.

I'm posting this because I think that other players may find it useful as well. If I am stepping on anyone's toes I will be more than happy to take this down.

*Note - the addon will also silence pet respeccing "learned/unlearned" messages.
v3a_ _ _ _

Made HideSpam variables local.

v3_ _ _ _

Fixed error when dualspeccing over to a "nil" or empty spec.
Added silencing pet respec spam.

v2_ _ _ _

Fixed the error message that popped up on login
Cleaned up some superfluous code
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Author
Date
3
1kB
fostic_popcorn
11-02-12 04:29 PM
2
1kB
fostic_popcorn
09-05-12 11:30 AM
1
1kB
fostic_popcorn
09-04-12 01:03 PM


Post A Reply Comment Options
Old 01-25-13, 12:36 AM  
fostic_popcorn
A Murloc Raider
 
fostic_popcorn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 53
Uploads: 2
Re: Global Leak

Originally Posted by Clamsoda
Is there any reason why the HideSpam frame isn't defined locally, and is being leaked to the global environment?

Lua Code:
  1. local HideSpam = CreateFrame("Frame")

should be more appropriate.
Fixed it
fostic_popcorn is offline Report comment to moderator  
Reply With Quote
Old 01-02-13, 07:43 AM  
Clamsoda
A Cobalt Mageweaver

Forum posts: 239
File comments: 33
Uploads: 0
Global Leak

Is there any reason why the HideSpam frame isn't defined locally, and is being leaked to the global environment?

Lua Code:
  1. local HideSpam = CreateFrame("Frame")

should be more appropriate.
Clamsoda is offline Report comment to moderator  
Reply With Quote
Old 11-05-12, 12:08 PM  
AutolycusWolf
A Kobold Labourer
 
AutolycusWolf's Avatar

Forum posts: 0
File comments: 58
Uploads: 0
First things first, r3 works like a charm! Pet specializations and everything. No errors up till now!

Originally Posted by fostic_popcorn
Just to double check with you that I got everything though:

You seem to be listing two conditions:

1) Dualspeccing over to any spec which has not been chosen

2) Resetting your current spec in order to respec?

I know for sure I've fixed condition 1), but are you sure about an error popping up when respeccing? As far as I know the addon should not have this problem because it doesn't check for respecs. Please let me know if I'm misunderstanding what you say though.
Without further ado, I'll give you two examples to clear the air a little bit (rest assured you got everything right by the way, don't worry).

For condition No1 (dual specing to a spec that hasn't been chosen yet): Lets say you got a toon that dinged 30. You then promptly go and buy your dual specialization feature and switch to your now emptly secondary spec in order to pick it up. BOOM! the error reared its ugly head!

For condition No2 (reset the current specialization in order to re spec): Lets say you got a Paladin that has already dual speced as Protection/Holy but you wish to unlearn both their current specs for your own reasons. You switch to Holy and unlearn it but don't pick a new specialization yet. Then you switch back to Protection and unlearn that as well, again without picking any specialization. If you switched back and forth between those empty specializations the aforementioned error popped up.

Anyway, problem solved so all is good.

Thanks for your efforts and don't feel bad about your usual method of fixing things. At least you know what to do.
AutolycusWolf is offline Report comment to moderator  
Reply With Quote
Old 11-02-12, 04:31 PM  
fostic_popcorn
A Murloc Raider
 
fostic_popcorn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 53
Uploads: 2
@Autolycus:

Wow, thank you so much for such a detailed error report! And thanks for linking another addon's solution too haha. (that's my usual method of fixing things >.> *shame*)

I took a leaf from AutoRole and added an if condition for getSpecialization() being nil. It should now print "Switched to an empty spec." if you dualspec over to a spec that has not been set. Just to double check with you that I got everything though:

If you have a toon that either hasn't picked up a (primary or secondary) specialization yet or resets their current spec in order to re-spec you get an error when you change between specs.
You seem to be listing two conditions:

1) Dualspeccing over to any spec which has not been chosen

2) Resetting your current spec in order to respec?

I know for sure I've fixed condition 1), but are you sure about an error popping up when respeccing? As far as I know the addon should not have this problem because it doesn't check for respecs. Please let me know if I'm misunderstanding what you say though.

Once again thanks so much for bringing this to my attention!! Can't believe I've never respecced over to a blank spec

Also as an aside: I've had a bit more practice with coding and was able to get the pet respecs working! The 'learned/unlearned' messages are now all filtered, but unfortunately when adding a message saying what spec the pet switched to doesn't seem doable. As in, it works, but it works too well... apparently PET_SPECIALIZATION_CHANGED fires upon login/reloadui/basically whenever your pet 'spawns', so you would be barraged by the message for doing something as ridiculous as flying up in the air and dismounting... Until Blizzard adds a more finetuned way of detecting an actual pet respec (or maybe there is one and I just can't find the event for it?) I can only filter the spam for now.

Thanks for everybody's help and suggestions! Keep them coming if you find anything else!
fostic_popcorn is offline Report comment to moderator  
Reply With Quote
Old 10-29-12, 08:40 AM  
AutolycusWolf
A Kobold Labourer
 
AutolycusWolf's Avatar

Forum posts: 0
File comments: 58
Uploads: 0
Big fan of this addon, kudos for keeping it up! I know you aren't a real programmer and I did try to tamper with the code myself (with zero knowledge of what to do; only by looking at the code structure and trying to figure out the logic behind it), but there is a small issue you might need to look into.

If you have a toon that either hasn't picked up a (primary or secondary) specialization yet or resets their current spec in order to re-spec you get an error when you change between specs. From the little I could get out of the error message the addon tries to check if your specialization hasn't been picked up yet (is nil) and breaks when it finds exactly that: A non set spec. So the solution might lie into a clause that checks that (like "if current spec = nil" or something) and then adjust the "Switched to" messages accordingly when a non-defined specialization is activated (like print a: "Switched to NONE because you haven't picked up a specialization yet" message). For the record, when you change into a non-defined specialization the error reads as follows:

Code:
1x DualSpecSpamFilter-1.2\core.lua:46: Usage: GetSpecializationInfo(specIndex[, isInspect[, isPet]])
<in C code>
DualSpecSpamFilter-1.2\core.lua:46: in function <DualSpecSpamFilter\core.lua:27>

Locals:
self = <unnamed> {
 0 = <userdata>
 filter = <func> @DualSpecSpamFilter\core.lua:14
}
event = "ACTIVE_TALENT_GROUP_CHANGED"
unit = 1
spellName = 2
specId = nil
primarySpecSpellName = "Activating Primary Spec"
secondarySpecSpellName = "Activating Secondary Spec"
Thanks for keeping this addon up!

EDIT: The addon AutoRole which checks your current active spec and sets your role automatically in groups/raids (based on that info) has foreseen the possibility of not having set a specialization yet so you might find their solution handy. In particular the addon scans your specs and if you haven't set a specialization yet it tells you so via a printed message. The code that checks for that info reads:

Code:
function AutoRole:SetRole(event)
	local currentSpec = GetSpecialization()
	if (currentSpec == nil) then
		UnitSetRole("player", "NONE")
		if (event == nil) then
			self:Print("Role set to NONE because you have no specialization.")
		end
	else
		local currentRole = GetSpecializationRole(currentSpec)
		local currentSpecName = currentSpec and select(2, GetSpecializationInfo(currentSpec))
		UnitSetRole("player", currentRole)
		if (event == nil) then
			self:Print("Role set to", currentRole, "because your specialization is", currentSpecName)
		end
	end
end
Last edited by AutolycusWolf : 10-29-12 at 09:25 AM.
AutolycusWolf is offline Report comment to moderator  
Reply With Quote
Old 10-24-12, 09:34 PM  
fostic_popcorn
A Murloc Raider
 
fostic_popcorn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 53
Uploads: 2
Originally Posted by swalker
Awesome addon! Can you add hunter pets spec to it? Would be perfect.
I've looked at this and I can't get it to work sorry, I'm not a real programmer... I'm pretty sure I have the variables right (ERR_PET_SPELL_UNLEARNED_S, ERR_PET_LEARN_ABILITY_S, ERR_PET_LEARN_SPELL_S), but it just doesn't work.

You could try the addon SilentRespec as I tested that out and it works for pet respecs.
fostic_popcorn is offline Report comment to moderator  
Reply With Quote
Old 10-19-12, 09:26 AM  
swalker
A Kobold Labourer
 
swalker's Avatar

Forum posts: 0
File comments: 1
Uploads: 0
Awesome addon! Can you add hunter pets spec to it? Would be perfect.
swalker is offline Report comment to moderator  
Reply With Quote
Old 10-08-12, 11:02 AM  
Mato
A Kobold Labourer
 
Mato's Avatar

Forum posts: 0
File comments: 6
Uploads: 0
Works brilliant! Cheers!
Mato is offline Report comment to moderator  
Reply With Quote
Old 09-07-12, 11:23 PM  
fostic_popcorn
A Murloc Raider
 
fostic_popcorn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 53
Uploads: 2
I'm so glad you found it useful!
fostic_popcorn is offline Report comment to moderator  
Reply With Quote
Old 09-05-12, 11:43 AM  
LiNK2088
A Murloc Raider

Forum posts: 7
File comments: 157
Uploads: 0
You are a hero! Been looking for an update for this
LiNK2088 is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: