Quantcast Updated Cooldowns (Engine/Feature) - WoWInterface
Thread Tools Display Modes
11-03-11, 01:50 PM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
Updated Cooldowns (Engine/Feature)

In \RDX\RosterMgr\Cooldown\Core.lua it reads:

-- A cooldown database is created using the registererCoodldown(spellid, duration, group) function
-- -> the duration is not really accurate, because some duration could change with talent + glyph
-- A local engine will store real cooldown per character (duration + timeleft)
-- this local engine is sync with all members of the raid
If we use GetSpellCooldown, though, we can find out the duration left on any (personal) ability. I'm not too sure if it works outside of just the player uid.

Using this, wouldn't it be possible to change the cooldown variable in \RDX\Designs\Variables\CooldownVariables.lua to refelct something like this?

Code:
local name = GetSpellInfo(12043);
local start, duration, enabled = GetSpellCooldown(name);
if enabled == 0 then
	DEFAULT_CHAT_FRAME:AddMessage(.. name .. " is currently active, use it and wait " .. duration .. " seconds for the next one.");
elseif ( start > 0 and duration > 1.5) then
	DEFAULT_CHAT_FRAME:AddMessage(.. name .. " is cooling down, wait " .. (start + duration - GetTime()) .. " seconds for the next one.");
else
	DEFAULT_CHAT_FRAME:AddMessage(.. name .. " is ready.");
end
How \RDX\RosterMgr\Cooldown\Core.lua could possibly be changed:

Code:
function RDXCD.RegisterCooldown(race, boss, class, talent, spellid, dduration, group, event)
	if not spellid then VFL.print(VFLI.i18n("|cFFFF0000[RDX]|r Info : Attempt to register an anonymous omni cooldown.")); return; end
	if cd[spellid] then VFL.print(VFLI.i18n("|cFFFF0000[RDX]|r Info : Attempt to register duplicate object type ") .. spellid .. "."); return; end 
	local spellname, _, icon = GetSpellInfo(spellid);
	if not spellname then VFL.print(VFLI.i18n("|cFFFF0000[RDX]|r Info : unknown spellid ") .. spellid .. "."); return; end
	local start, duration, enabled = GetSpellCooldown(spellname);
	if not dduration then dduration = duration; end
	-- Duration Defined:  RDXCD.RegisterCooldown(nil, nil, "PALADIN", nil, 85673, 20, nil, "SPELL_CAST_SUCCESS");
	-- Duration Default:  RDXCD.RegisterCooldown(nil, nil, "PALADIN", nil, 85673, nil, nil, "SPELL_CAST_SUCCESS");
	local text = "";
	if race then text = text .. race .. ":"; end
	if boss then text = text .. boss .. ":"; end
	if class then text = text .. class .. ":"; end
	if talent then text = text .. talent .. ":"; end
	text = text .. spellname;
	local cdtemp = {
		text = text;
		race = race;
		class = class;
		talent = talent;
		spellid = spellid;
		spellname = spellname;
		start = start;
		duration = dduration;
		enabled = enabled;
		icon = icon;
		group = group;
	};
	cd[spellid] = cdtemp;
	if boss then cdb[spellid] = cdtemp; end
	if talent then cdt[spellid] = cdtemp; end
	if not talent and not boss then cdc[spellid] = cdtemp; end
	if event ==  "SPELL_CAST_SUCCESS" then cdcastspell[spellid] = true;
	elseif event ==  "SPELL_DAMAGE" then cddmgspell[spellid] = true;
	elseif event ==  "SPELL_HEAL" then cdhealspell[spellid] = true;
	elseif event ==  "SPELL_AURA_APPLIED" then cdauraAspell[spellid] = true;
	elseif event ==  "SPELL_AURA_REMOVED" then cdauraRspell[spellid] = true;
	elseif event ==  "SPELL_RESURRECT" then cdresuspell[spellid] = true;
	elseif event ==  "SPELL_SUMMON" then cdsumspell[spellid] = true;
	end
	return true;
end
I realize that the "duration defined" bit is not correct LUA, it was just there as an example: it's pretty easy to realize what it means, but just in case:

If a time is defined on a cooldown, ie:
Code:
RDXCD.RegisterCooldown(nil, nil, "PALADIN", nil, 85673, 20, nil, "SPELL_CAST_SUCCESS");
Then that time will be used instead.

If a time is NOT defined on a cooldown, ie:
Code:
RDXCD.RegisterCooldown(nil, nil, "PALADIN", nil, 85673, nil, nil, "SPELL_CAST_SUCCESS");
Then the duration from:
Code:
local start, duration, enabled = GetSpellCooldown(spellname);
Should be used instead.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 11-03-11 at 06:51 PM.
  Reply With Quote
11-05-11, 07:06 PM   #2
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
bump.

rump a dump chump.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
11-06-11, 03:30 AM   #3
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,250
Hi Unlimit

there is a problem.

local start, duration, enabled = GetSpellCooldown(spellname);

GetSpellCooldown only work when the cooldown is used. it returns nil if your cooldown is available.

So to fix that problem, we have the register cooldowDB and the dynamic cooldownDB.

The register cooldownDB is the one you want to modify.
The dynamic cooldownD is based on GetSpellCooldown.

Open the file C:\Program Files (x86)\World of Warcraft\WTF\Account\XXXX\SavedVariables\RDX.lua and search for the cooldowndb.

RDX actionbars store the cooldowns per character in this file. (That mean, if you don't use the actionbars, it won't work)

The engine cooldown always get the duration from the dynamic cooldowndb before the register cooldowndb for player and pet.

For enemies, boss, the cooldown will always used the default duration of the register cooldowndb.

For members of your raid, there is a synchronisation of long cooldown (superior to 3 minutes) using communication stuff.


Or cooldown engine is simply the best.

__________________
RDX manager
Sigg
  Reply With Quote
11-06-11, 11:46 AM   #4
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
The engine cooldown always get the duration from the dynamic cooldowndb before the register cooldowndb for player and pet.
I've NEVER seen this happen.

Good example: in retribution I have a talent that decreases my Crusader Strikes cooldown the more haste that I have.

By default, Crusader Strike is 4.5 seconds, and in RDX Crusader Strike is registered by the CooldownDB for 4.5 seconds.

Crusader Strike is the FIRST thing on my bars in RDX. MY Crusader Strike should be 3.7 seconds. Why does it not show up?
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
11-06-11, 11:49 AM   #5
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,250
erf

Open the file C:\Program Files (x86)\World of Warcraft\WTF\Account\XXXX\SavedVariables\RDX.lua and search for the cooldowndb of your character.

And try to find if there is your spellid in the cooldowndb and the duration value.
__________________
RDX manager
Sigg
  Reply With Quote
11-06-11, 12:06 PM   #6
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
Yes and no.

Crusader Strike is registered to a different realm, which is unlimit_lightningsblade.

I'm on Sargeras, transfered off Lightning's Blade like a year ago. Then went to Demon Soul, it didn't create a new one for Demon Soul, either. Now I'm on Sargeras. <_<

Shouldn't it automatically create a new Cooldowndb for a new realm, if I'm using actionbars there too?

I deleted my the RDX saved variable to try it out, and it certianly works... it just seems that it should work automatically and per-character, instead of me having to take that step.

I'm not trying to be whiny, just trying to help ya know? There are TONS of addons that I can imagine having more functionality in this specific field than RDX does, like CLCinfo or ForteXorcist. Even if our cooldown engine is (don't know if it is or not) superior, we're not putting it into practice as well as it should be.

For instance, I've NEVER been able to get the cooldown Cooldown Type (AVAIL) option to work in Vars: Cooldown.

Personally, I believe we should have customization there, for it being both available and used, like for it to automatically color the icon texture for us:

That way, if Use texture variable is checked:

We can use certain colors to help us, or make it completely disappear.

This way the original functionality also stays intact, if you so want, you could always make the "available" color completely transparent.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 11-07-11 at 04:29 AM.
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Support » OpenRDX: Feature Requests » Updated Cooldowns (Engine/Feature)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off