NameplateCooldowns

NameplateCooldowns

8M Downloads

Thank you for your hard work in making this classic compatible.

Arcaidius opened this issue · 13 comments

commented

From my experience with your addon, its working with every spell. The only fix I see is with a number of different spells not showing the spell icon, only the cooldown number above the nameplate. Mage spells seem to all be working to the addons intended value, but classes like warrior, rogue still have problems with their spell images showing with the cool down countdown.

commented

Sorry for late reply. There is a major problem - I don't play WoW Classic. On lvl 1 characters addon is working as intended. I just have not ability to make proper testing.

commented

@casualshammy Could u tell how did you fix level 1 icons? ( line of code or release link if possible pls )

I'll help you with the rest of them.

commented

It's not a fix, it's just a matter of CLEU (COMBAT_LOG_EVENT_UNFILTERED). I don't know what happens, but I guess that it returns some strange values for certain spells.
This is metatable that returns textureID for spell name:

local SpellTextureByName = setmetatable({ }, {
__index = function(t, key)
local texture = GetSpellTexture(key);
t[key] = texture;
return texture;
end
});

This is event handler:
local cTime = GetTime();
local _, eventType, _, _, srcName, srcFlags, _, _, _, _, _, spellID, spellName = CombatLogGetCurrentEventInfo(); -- spellID actually is 0, always!
if (bit_band(srcFlags, COMBATLOG_OBJECT_IS_HOSTILE) ~= 0) then
local entry = db.SpellCDs[spellName];
if (entry and entry.enabled) then
if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_MISSED" or eventType == "SPELL_SUMMON") then
-- entry.refSpellID = spellID;
entry.texture = SpellTextureByName[spellName];
local name = string_match(srcName, "[%P]+");
if (not charactersDB[name]) then charactersDB[name] = { }; end
local expires = cTime + entry.cooldown;
charactersDB[name][spellName] = { ["spellName"] = spellName, ["expires"] = expires, ["texture"] = SpellTextureByName[spellName] };
for frame, charName in pairs(NameplatesVisible) do
if (charName == name) then
UpdateOnlyOneNameplate(frame, charName);
break;
end
end
end
end

commented

@Derranion if you figure out a fix please update on this thread ty <3

commented

@casualshammy
Thanks a lot for the info.

Don't you think that it's related to the spell ranks in classic?
There are no ranks in actual wow.

Looks like " GetSpellTexture(key) " method gets unknown key because of this.

Not sure why it works well for " db.SpellCDs[spellName] " though.

Btw /eventtrace helps to see spell IDs in the game.

commented

@Derranion
Oh. I forgot about spell ranks, but (as you've mentioned) if CombatLogGetCurrentEventInfo() returns something like "Frostbolt (Rank 3)" then

local entry = db.SpellCDs[spellName]; 
if (entry and entry.enabled) then 

wouldn't work at all.

commented

@casualshammy

I can't see what's inside the " db.SpellCDs " table, probably there are values for all ranks of the spells in this table.

And looks like only rank 1 spells are in the table that " GetSpellTexture " method uses.

Because GetSpellTexture(key) works for level 1 spells and doesn't work for other spells.

commented

@Derranion
No, i don't think so. "db.SpellCDs" is the table that contains options for all spells. It's populated on first addon usage (with predefined list of spells), and by user via options dialog. There are not spell ranks.

["SpellCDs"] = {
	["Grappling Hook"] = { -- spell name is a key
		["enabled"] = true, -- is spell enabled for tracking
		["refSpellID"] = 195457, -- spell id for options dialog
		["spellIDs"] = { -- list of spell ids for tracking (it can be nil, then tracking all spells with same spell name)
			[195457] = true,
		},
		["cooldown"] = 30, -- cooldown is seconds
		["texture"] = 1373906, -- texture id for options dialog
	},
	["Revival"] = {
		["enabled"] = true,
		["refSpellID"] = 115310,
		["spellIDs"] = {
			[115310] = true,
		},
		["cooldown"] = 180,
		["texture"] = 1020466,
	},

Anyway, I'll up my mage to level 8 (there is rank 2 frostbolt) and try to solve this issue. But I'm banned for 'suspicious economic activity' and waiting for reply from Blizz :D

commented

Would be nice, btw level 6 is enough ( u'll get Fireblast lvl 2 ).

Pls write a few words here what was the issue, when you will find it out.

Thanks!

commented

@casualshammy ty for the effort and best of luck with the ban

commented

Okay, there are not problems with spell ranks. 'Fireblast rank 1' and 'Fireblast rank 2' have the same names in combatlog, and my code returns correct icon id for this spells. But maybe I've found the issue. The latest release (80205.1-release) will be published soon, please check it out.

commented

Thanks man, can’t wait to get home and try the latest release, your addons is indeed unique and currently there is no other addon that does this feature, cuz I’ve searched and searched and couldn’t find any. Also it is really needed for world pvp as well. So once again, thanks so much for the effort, I hope to see this addon fully functional ^^

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.