From 2f5d2c34884c5089baed5d5a1e8b6ab5a8e49b79 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 15 Nov 2013 19:57:51 +0000 Subject: [PATCH] Rename the "ApplySpell" methods in OvaleState for better documentation. ApplySpellStart -> ApplySpellStartCast ApplySpellOnPlayer -> ApplySpellAfterCast ApplySpellOnTarget -> ApplySpellOnHit git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1175 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleAura.lua | 4 ++-- OvaleComboPoints.lua | 2 +- OvaleCooldown.lua | 2 +- OvaleEclipse.lua | 2 +- OvaleFuture.lua | 2 +- OvalePower.lua | 2 +- OvaleRunes.lua | 2 +- OvaleState.lua | 12 ++++++------ 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/OvaleAura.lua b/OvaleAura.lua index bbd7cac..f93ce24 100644 --- a/OvaleAura.lua +++ b/OvaleAura.lua @@ -643,7 +643,7 @@ function OvaleAura:ResetState(state) end -- Apply the effects of the spell on the player's state, assuming the spellcast completes. -function OvaleAura:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleAura:ApplySpellAfterCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already ended, then the effects on the player have already occurred. if endCast <= OvaleState.now then return @@ -657,7 +657,7 @@ function OvaleAura:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCa end -- Apply the effects of the spell on the target's state when it lands on the target. -function OvaleAura:ApplySpellOnTarget(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleAura:ApplySpellOnHit(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) local si = OvaleData.spellInfo[spellId] if si and si.aura and si.aura.target then -- Apply the auras on the target. diff --git a/OvaleComboPoints.lua b/OvaleComboPoints.lua index f4faaca..8a2ffe1 100644 --- a/OvaleComboPoints.lua +++ b/OvaleComboPoints.lua @@ -121,7 +121,7 @@ function OvaleComboPoints:ResetState(state) end -- Apply the effects of the spell on the player's state, assuming the spellcast completes. -function OvaleComboPoints:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleComboPoints:ApplySpellAfterCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already ended, then the effects on the player have already occurred. if endCast <= OvaleState.now then return diff --git a/OvaleCooldown.lua b/OvaleCooldown.lua index cf65cbc..09f2487 100644 --- a/OvaleCooldown.lua +++ b/OvaleCooldown.lua @@ -103,7 +103,7 @@ function OvaleCooldown:ResetState(state) end -- Apply the effects of the spell on the player's state, assuming the spellcast completes. -function OvaleCooldown:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleCooldown:ApplySpellAfterCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already ended, then the effects on the player have already occurred. if endCast <= OvaleState.now then return diff --git a/OvaleEclipse.lua b/OvaleEclipse.lua index 758a44d..a63297a 100644 --- a/OvaleEclipse.lua +++ b/OvaleEclipse.lua @@ -136,7 +136,7 @@ function OvaleEclipse:ResetState(state) end -- Apply the effects of the spell on the player's state, assuming the spellcast completes. -function OvaleEclipse:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleEclipse:ApplySpellAfterCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already ended, then the effects on the player have already occurred. if endCast <= OvaleState.now then return diff --git a/OvaleFuture.lua b/OvaleFuture.lua index 3513746..d2d69f1 100644 --- a/OvaleFuture.lua +++ b/OvaleFuture.lua @@ -522,7 +522,7 @@ function OvaleFuture:ResetState(state) end -- Apply the effects of the spell at the start of the spellcast. -function OvaleFuture:ApplySpellStart(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleFuture:ApplySpellStartCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already started, then the effects have already occurred. if startCast < OvaleState.now then return diff --git a/OvalePower.lua b/OvalePower.lua index 6b5f232..dc03bff 100644 --- a/OvalePower.lua +++ b/OvalePower.lua @@ -232,7 +232,7 @@ function OvalePower:ResetState(state) end -- Apply the effects of the spell on the player's state, assuming the spellcast completes. -function OvalePower:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvalePower:ApplySpellAfterCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already ended, then the effects on the player have already occurred. if endCast <= OvaleState.now then return diff --git a/OvaleRunes.lua b/OvaleRunes.lua index a680b98..a188967 100644 --- a/OvaleRunes.lua +++ b/OvaleRunes.lua @@ -195,7 +195,7 @@ function OvaleRunes:ResetState(state) end -- Apply the effects of the spell on the player's state, assuming the spellcast completes. -function OvaleRunes:ApplySpellOnPlayer(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) +function OvaleRunes:ApplySpellAfterCast(state, spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) -- If the spellcast has already ended, then the effects on the player have already occurred. if endCast <= OvaleState.now then return diff --git a/OvaleState.lua b/OvaleState.lua index 7d8f5f9..6a6a41a 100644 --- a/OvaleState.lua +++ b/OvaleState.lua @@ -146,12 +146,12 @@ function OvaleState:ApplySpell(spellId, startCast, endCast, nextCast, nocd, targ --[[ Apply the effects of the spellcast in three phases. - 1. Spell effects at the beginning of the cast. - 2. Spell effects on player assuming the cast completes. - 3. Spell effects on target when it lands. + 1. Effects at the beginning of the spellcast. + 2. Effects when the spell has been cast. + 3. Effects when the spellcast hits the target. --]] - self:InvokeMethod("ApplySpellStart", spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) - self:InvokeMethod("ApplySpellOnPlayer", spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) - self:InvokeMethod("ApplySpellOnTarget", spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) + self:InvokeMethod("ApplySpellStartCast", spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) + self:InvokeMethod("ApplySpellAfterCast", spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) + self:InvokeMethod("ApplySpellOnHit", spellId, startCast, endCast, nextCast, nocd, targetGUID, spellcast) end -- -- 1.7.9.5