WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/preview/Aloft/AloftCrowdControl
    from Rev 1990 to Rev 1993
    Reverse comparison

Rev 1990 → Rev 1993

AloftCrowdControl.lua
120,10 → 120,12
 
-- TODO: clean all this up, use spell id for basic mapping, get rid of redundant GetSpellInfo() calls, etc
 
local POLYMORPH_SPELL_ID = 118
 
local spellIdList =
{
-- mage
[ 118] = true, -- Polymorph: Sheep
[POLYMORPH_SPELL_ID] = true, -- Polymorph: Sheep
[61721] = true, -- Polymorph: Rabbit
[28271] = true, -- Polymorph: Turtle
[61780] = true, -- Polymorph: Turkey
153,7 → 155,7
-- is the crowd control spell cancelled on damage? (if false, it is supposed to run to its full duration)
local spellDamageCancel =
{
[GetSpellInfo( 118)] = true, -- Polymorph: Sheep
[GetSpellInfo(POLYMORPH_SPELL_ID)] = true, -- Polymorph: Sheep
[GetSpellInfo(61721)] = true, -- Polymorph: Rabbit
[GetSpellInfo(28271)] = true, -- Polymorph: Turtle
[GetSpellInfo(61780)] = true, -- Polymorph: Turkey
178,7 → 180,7
-- duration of last resort: hardcoded
local spellGrossDuration =
{
[GetSpellInfo( 118)] = { [86] = 50, }, -- Polymorph: Sheep
[GetSpellInfo(POLYMORPH_SPELL_ID)] = { [86] = 50, }, -- Polymorph: Sheep
[GetSpellInfo(61721)] = { [86] = 50, }, -- Polymorph: Rabbit
[GetSpellInfo(28271)] = { [86] = 50, }, -- Polymorph: Turtle
[GetSpellInfo(61780)] = { [86] = 50, }, -- Polymorph: Turkey
265,7 → 267,7
local name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange = GetSpellInfo(spellId)
if not self.spellInfoList[name] then self.spellInfoList[name] = { } end
self.spellInfoList[name][rank] = { duration = 0, icon = icon }
-- ChatFrame7:AddMessage("AloftCrowdControl:OnEnable(): " .. tostring(name) .. "/" .. tostring(rank) .. "/" .. tostring(self.spellInfoList[name][rank].duration) .. "/" .. tostring(self.spellInfoList[name][rank].icon))
-- ChatFrame7:AddMessage("AloftCrowdControl:OnEnable(): " .. tostring(name) .. "/" .. tostring(rank) .. "/" .. tostring(type(rank)) .. "/" .. tostring(self.spellInfoList[name][rank].duration) .. "/" .. tostring(self.spellInfoList[name][rank].icon))
end
end
 
670,10 → 672,11
crowdControlDuration = 30
 
local now = GetTime()
local _, _, icon, _, _, _, _, _, _ = GetSpellInfo(POLYMORPH_SPELL_ID)
 
self.crowdControlSpellName = "Spell Name"
self.crowdControlSpellRank = "Rank"
self.crowdControlSpellIcon = (self.spellInfoList["Polymorph"] and self.spellInfoList["Polymorph"]["Rank 1"] and self.spellInfoList["Polymorph"]["Rank 1"].icon) or ""
self.crowdControlSpellIcon = icon
self.endTime = now + crowdControlDuration
 
local value, width = self:CalculateFrameWidth(aloftData, crowdControlDuration, now, self.endTime)
689,6 → 692,8
-- self.crowdControlFrame.crowdControlRegion:Show()
-- ChatFrame7:AddMessage("AloftCrowdControl:OnConfigModeChanged(): show/" .. tostring(self.crowdControlFrame.crowdControlRegion:IsVisible()))
 
crowdControlNameplate = aloftData
 
self:SendMessage("Aloft:OnCrowdControlBarShow")
 
return