Quantcast WoWInterface: SVN - PowerAurasClassic - Path Comparison - / Rev 23 and / Rev 24

WoWInterface SVN PowerAurasClassic

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 23 to Rev 24
    Reverse comparison

Rev 23 → Rev 24

trunk/PowerAuras/Timers2.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/PowerAuras/localisation_frFR.lua
176,6 → 176,7
aideOwnTex = "Use the De/Buff or Ability Texture instead.", -- untranslated
nomStacks = "Stacks", -- untranslated
 
nomUpdateSpeed = "Update speed",
nomSpeed = "Vitesse d'Anim.",
nomBegin = "Animation de d\195\169part",
nomEnd = "Animation de fin",
trunk/PowerAuras/localisation_koKR.lua New file
0,0 → 1,274
if (GetLocale() == "koKR") then
PowaAuras.Anim[0] = "[보이지 않음]";
PowaAuras.Anim[1] = "공전";
PowaAuras.Anim[2] = "점멸";
PowaAuras.Anim[3] = "성장";
PowaAuras.Anim[4] = "파동";
PowaAuras.Anim[5] = "거품";
PowaAuras.Anim[6] = "낙수";
PowaAuras.Anim[7] = "전기장";
PowaAuras.Anim[8] = "꽁무니";
PowaAuras.Anim[9] = "화염";
PowaAuras.Anim[10] = "궤도";
 
PowaAuras.BeginAnimDisplay[0] = "[없음]";
PowaAuras.BeginAnimDisplay[1] = "확대";
PowaAuras.BeginAnimDisplay[2] = "축소";
PowaAuras.BeginAnimDisplay[3] = "불투명도만";
PowaAuras.BeginAnimDisplay[4] = "좌측";
PowaAuras.BeginAnimDisplay[5] = "상단-좌측";
PowaAuras.BeginAnimDisplay[6] = "상단";
PowaAuras.BeginAnimDisplay[7] = "상단-우측";
PowaAuras.BeginAnimDisplay[8] = "우측";
PowaAuras.BeginAnimDisplay[9] = "하단-우측";
PowaAuras.BeginAnimDisplay[10] = "하단";
PowaAuras.BeginAnimDisplay[11] = "하단-좌측";
PowaAuras.BeginAnimDisplay[12] = "Bounce";
 
PowaAuras.EndAnimDisplay[0] = "[없음]";
PowaAuras.EndAnimDisplay[1] = "확대";
PowaAuras.EndAnimDisplay[2] = "축소";
PowaAuras.EndAnimDisplay[3] = "불투명도만";
 
 
PowaAuras.Sound[0] = "없음";
PowaAuras.Sound[1] = "LEVELUP";
PowaAuras.Sound[2] = "LOOTWINDOWCOINSOUND";
PowaAuras.Sound[3] = "MapPing";
PowaAuras.Sound[4] = "Exploration";
PowaAuras.Sound[5] = "QUESTADDED";
PowaAuras.Sound[6] = "QUESTCOMPLETED";
PowaAuras.Sound[7] = "WriteQuest";
PowaAuras.Sound[8] = "Fishing Reel in";
PowaAuras.Sound[9] = "igPVPUpdate";
PowaAuras.Sound[10] = "ReadyCheck";
PowaAuras.Sound[11] = "RaidWarning";
PowaAuras.Sound[12] = "AuctionWindowOpen";
PowaAuras.Sound[13] = "AuctionWindowClose";
PowaAuras.Sound[14] = "TellMessage";
PowaAuras.Sound[15] = "igBackPackOpen";
 
PowaAuras.Text = {
welcome = "옵션을 볼려면 /powa를 입력하십시오.",
 
aucune = "없음",
aucun = "없음",
largeur = "너비",
hauteur = "높이",
mainHand = "주무기",
offHand = "보조 무기",
bothHands = "둘다",
 
DebuffType =
{
Magic = "마법",
Disease = "질병",
Curse = "저주",
Poison = "독",
},
 
DebuffCatType =
{
[PowaAuras.DebuffCatType.CC] = "군중제어",
[PowaAuras.DebuffCatType.Silence] = "침묵",
[PowaAuras.DebuffCatType.Snare] = "덫",
[PowaAuras.DebuffCatType.Stun] = "기절",
[PowaAuras.DebuffCatType.Root] = "올가미",
[PowaAuras.DebuffCatType.Disarm] = "무장해제",
[PowaAuras.DebuffCatType.PvE] = "PvE",
},
 
-- main
nomEnable = "Power Auras 활성화",
aideEnable = "모든 Power Auras 효과를 활성화합니다.",
nomDebug = "디버그 메시지 활성화",
aideDebug = "디버그 메시지를 활성화합니다.",
ListePlayer = "페이지",
ListeGlobal = "공통",
aideMove = "여기로 효과를 이동시킵니다.",
aideCopy = "여기로 효과를 복사합니다.",
nomRename = "이름 변경",
aideRename = "선택된 효과의 페이지의 이름을 변경합니다.",
nomTest = "테스트",
nomHide = "모두 숨기기",
nomEdit = "편집",
nomNew = "새로",
nomDel = "삭제",
nomImport = "들여오기",
nomExport = "내보내기",
aideImport = "오라 구문열을 붙여넣기 하려면 Ctrl-V를 누르고 \'승낙\'을 누르십시오.",
aideExport = "공유하기 위해 오라 구문열을 복사하려면 Ctrl-C를 누르십시오.",
aideDel = "선택된 효과를 제거합니다(이 버튼을 작동되게 하려면 CTRL을 누르십시오).",
nomMove = "이동",
nomCopy = "복사",
nomPlayerEffects = "캐릭터별 효과",
nomGlobalEffects = "공통 효과",
aideEffectTooltip = "(효과 켜기/끄기를 전환하려면 Shift-클릭하십시오)",
 
-- editor
nomSound = "재생할 소리",
aideSound = "애니메이션 시작시 소리를 재생합니다.",
nomCustomSound = "혹은 소리 파일:",
aideCustomSound = "게임을 시작하기 전에, Sounds 폴더내의 소리 파일의 이름을 아래의 빈칸에 입력하십시오. mp3 및 wav 확장자를 지원합니다. (예: 'cookie.mp3' ;)",
 
nomTexture = "텍스쳐",
aideTexture = "보여지게 될 텍스쳐를 선택합니다. 애드온 폴더내의 Aura#.tga 파일의 변경을 통해 텍스쳐를 쉽게 바꿀 수 있습니다.",
 
nomAnim1 = "주 애니메이션",
nomAnim2 = "보조 애니메이션",
aideAnim1 = "다양한 효과와 더불어 텍스쳐에 움직임을 부여할 지 여부를 선택합니다.",
aideAnim2 = "이 애니메이션은 주 애니메이션보다는 덜 불투명하게 보여지게 됩니다. 화면의 과부하를 줄이기 위해 한개의 보조 애니메이션만이 동시에 보여지게 된다는 점에 주의 하십시오.",
 
nomDeform = "형태 변경",
aideDeform = "텍스쳐를 높이 혹은 너비로 늘립니다.",
 
aideColor = "텍스쳐의 색상을 변경하려면 여기를 클릭하십시오.",
aideFont = "글꼴을 선택하려면 여기를 클릭하십시오. 선택한 것을 적용하려면 '확인'을 누르십시오.",
aideMultiID = "체크한 것과 연결시키기 위해 다른 오라 ID를 여기에 입력합니다. 다중 ID는 '/'로 구별지워져야만 합니다. 오라 ID는 오라 툴팁의 첫번째 줄에서 [#]로 찾을 수 있습니다.",
aideTooltipCheck = "Also check the tooltip starts with this text",
 
aideBuff = "여기에 이 효과를 활성/비활성화해야만 하는 버프의 이름을, 혹은 이름의 일부분을 입력합니다. 구분되어 있어야 할 이름이라면 각각의 이름을 ('/'로 분리해) 입력할 수 있습니다(예: Super Buff/Power).",
aideBuff2 = "여기에 이 효과를 활성/비활성화해야만 하는 디버프의 이름을, 혹은 이름의 일부분을 입력합니다. 구분되어 있어야 할 이름이라면 각각의 이름을 ('/'로 분리해) 입력할 수 있습니다(예: Dark Disease/Plague).",
aideBuff3 = "여기에 이 효과를 활성/비활성화해야만 하는 디버프의 유형(독, 질병, 저주, 마법, 군중제어, 침묵, 기절, 덫, 올가미 혹은 없음)을 입력합니다. 디버프 각각의 유형을 ('/'로 분리해) 입력할 수도 있습니다(예: 질병/독).",
aideBuff4 = "여기에 이 효과에 적용해야만 하는 효과의 범위 이름(AOE)을 입력합니다(예를 들면 불의 비와 같은 경우입니다. 이 효과의 범위(AOE)의 이름을 전투 기록에서 찾을 수 있습니다).",
aideBuff5 = "여기에 이 효과를 활성화해야만 하는 일시적인 무기 강화를 입력합니다 : 선택적으로 주무기 혹은 보조무기 장착 칸을 지정하기 위해 '주무기', '보조 무기' 혹은 양 무기에 대해 '둘다'(예: 주무기/crippling).",
aideBuff6 = "여기에 이 효과를 활성화해야만 하는 연계 점수의 숫자를 입력합니다(예 : 1 혹은 1/2/3 혹은 0/4/5 등등...).",
aideBuff7 = "여기에 단축 행동바에 있는 행동의 이름을, 혹은 이름의 일부분을 입력합니다. 이 행동이 사용 가능한 경우에 효과는 활성화될 것입니다.",
aideBuff8 = "여기에 마법책에 있는 주문의 이름을, 혹은 이름의 일부분을 입력합니다. 주문의 ID를 입력하여도 됩니다(예: 12345).",
 
aideSpells = "여기에 주문 경고 오라를 적용할 주문의 이름을 입력합니다.",
aideStacks = "여기에 이 효과를 활성/비활성화하는데 요구되는 연산자와 중첩 횟수를 입력합니다. 연산자를 사용한 경우에만 작동합니다! 예: '<5' '>3' '=11' '!5' '>=0' '<=6' '2<>8'",
 
aideUnitn = "여기에 이 효과를 활성/비활성화해야만 하는 유닛의 이름을 입력합니다. 공격대 혹은 그룹에 속해 있는 유닛의 이름만 입력할 수 있습니다.",
aideUnitn2 = "공격대/그룹에 한해",
 
aideMaxTex = "효과 편집기에 가능한 텍스쳐의 최대 갯수를 정의 합니다. 애드온 폴더에 텍스쳐를 추가하려면(AURA1.tga에서 AURA50.tga까지 이름과 함께), 여기에 올바른 갯수를 지시해야만 합니다.",
aideAddEffect = "편집을 위한 효과를 추가합니다.",
aideWowTextures = "이 효과에 대해 Power Auras 폴더내의 텍스쳐 대신에 WoW의 텍스쳐를 사용하려면 이 옵션에 체크하십시오.",
aideCustomTextures = "하위 폴더 'Custom'에 있는 텍스쳐를 사용하려면 이 옵션에 체크하십시오. 아래에 텍스쳐의 이름을 기입해야만 합니다(예: myTexture.tga)",
aideTextAura = "텍스쳐 대신에 문자를 입력하려면 이 옵션에 체크하십시오.",
aideRealaura = "활성 오오라",
aideRandomColor = "이 효과를 알리기 위해 활성화되는 매 시간마다 무작위 색상을 사용하려면 이 옵션에 체크하십시오.",
aideTexMode = "불투명한 텍스쳐를 사용하려면 이 옵션을 체크 해제하십시오. 기본적으로 가장 어두운 색상이 더욱 반투명합니다.",
 
 
nomActivationBy = "활성화:",
nomOwnTex = "자신의 텍스쳐 사용",
aideOwnTex = "기본 텍스쳐 대신에 자신의 디/버프 혹은 능력 텍스쳐를 사용합니다.",
nomStacks = "중첩",
nomUpdateSpeed = "Update speed",
nomSpeed = "애니메이션 속도",
nomBegin = "시작 애니메이션",
nomEnd = "종료 애니메이션",
nomSymetrie = "좌우 대칭",
nomAlpha = "불투명도",
nomPos = "위치",
nomTaille = "크기",
nomExact = "정확한 이름",
nomGCD = "전역 재사용 대기",
nomThreshold = "한계치",
nomStance = "태세",
aideThreshInv = "한계치 값을 뒤집으려면 이 옵션에 체크하십시오. 생명력/마나: 기본 = 낮음 경고/체크시 = 높음 경고. 기력/분노/마력: 기본 = 높음 경고/체크시 = 낮음 경고",
nomThreshInv = "</>",
nomMine = "나에 의해 시전된",
nomDispellable = "내가 해제할 수 있는",
 
nomCheckBuff = "버프",
nomCheckDebuff = "디버프",
nomCheckAoeDebuff = "AOE 디버프",
nomCheckDebuffType = "디버프의 유형",
nomCheckEnchant = "무기 강화",
nomCheckCombo = "연계 점수",
nomCheckSkill = "사용 가능한 행동",
nomCheckHealth = "생명력",
nomCheckMana = "마나",
nomCheckRageEnergy = "분노/기력/룬",
nomCheckAggro = "어그로",
nomCheckPvP = "PvP",
nomCheckStance = "태세",
nomCheckSpells = "주문 경고",
nomCheckOwnSpell = "나의 주문",
 
nomCheckTarget = "적대적 대상",
nomCheckFriend = "우호적 대상",
nomCheckParty = "파티원",
nomCheckFocus = "주시 대상",
nomCheckRaid = "공격대원",
nomCheckGroupOrSelf = "공격대/파티원 혹은 자신",
nomCheckGroupAny = "특정",
nomCheckOptunitn = "유닛 이름",
 
aideTarget = "적대적 대상에 한해 테스트하려면 이곳에 체크하십시오.",
aideTargetFriend = "우호적 대상에 한해 테스트하려면 이곳에 체크하십시오.",
aideParty = "파티원에 한해 테스트하려면 이곳에 체크하십시오.",
aideGroupOrSelf = "파티 혹은 공격대원 혹은 자신에 한해 테스트하려면 이곳에 체크하십시오.",
aideFocus = "주시 대상에 한해 테스트하려면 이곳에 체크하십시오.",
aideRaid = "공격대원에 한해 테스트하려면 이곳에 체크하십시오.",
aideGroupAny = "'특정' 파티/공격대원에 대해 버프를 테스트하려면 이곳에 체크하십시오. 비체크시: '모든' 파티/공격대원에 대해 버프가 테스트됩니다.",
aideOptunitn = "공격대/그룹에 속해 있는 특정 캐릭터에 한해 테스트하려면 이곳에 체크하십시오.",
aideExact = "버프/디버프/행동의 정확한 이름을 테스트하려면 이곳에 체크하십시오.",
aideGCD = "'사용 가능한 행동'과 함께 GCD를 적용하려면 이곳에 체크하십시오. 행동이 GCD를 갖고 있는 경우에 오라가 번쩍이게 됩니다.",
aideStance = "이벤트에 적용할 태세, 오라 혹은 변신을 선택하십시오.",
aideMine = "플레이어에 의해 시전된 버프/디버프에 한해 테스트하려면 이곳에 체크하십시오.",
 
nomCheckShowTimer = "보이기",
nomTimerDuration = "지속시간",
aideTimerDuration = "대상에 대해 버프/디버프 지속시간을 시연하기 위해서 타이머를 보여줍니다(비활성화하려면 0)",
aideShowTimer = "이 효과의 타이머를 보여주려면 이곳에 체크하십시오.",
aideSelectTimer = "지속시간을 보여줄 타이머를 선택합니다.",
aideSelectTimerBuff = "지속시간을 보여줄 타이머를 선택합니다(이중 하나는 플레이어의 버프를 위해 남겨둔 상태입니다).",
aideSelectTimerDebuff = "지속시간을 보여줄 타이머를 선택합니다(이중 하나는 플레이어의 디버프를 위해 남겨둔 상태입니다).",
 
nomCheckShowStacks = "보이기",
 
nomCheckInverse = "비활성화시 보이기",
aideInverse = "버프/디버프가 비활성화되어 있는 경우에만 이 효과를 보여주려면 여기에 체크하십시오.",
 
nomCheckIgnoreMaj = "대문자 무시",
aideIgnoreMaj = "버프/디버프 이름의 대/소문자를 무시하려면 여기에 체크하십시오.",
 
nomDuration = "애니메이션 지속시간",
aideDuration = "이 시간 이후로 이 효과는 나타나지 않습니다(비활성화 하려면 0)",
 
nomCentiemes = "초 백단위 보이기",
nomDual = "타이머 두개 보이기",
nomHideLeadingZeros = "0일때 숨기기",
nomTransparent = "반투명한 텍스쳐 사용",
nomClose = "닫기",
nomEffectEditor = "효과 편집기",
nomAdvOptions = "확장 옵션",
nomMaxTex = "가능한 텍스쳐의 최대 갯수",
nomTabAnim = "애니메이션",
nomTabActiv = "활성화",
nomTabSound = "소리",
nomTabTimer = "타이머",
nomTabStacks = "중첩",
nomWowTextures = "WoW 텍스쳐",
nomCustomTextures = "사용자 텍스쳐",
nomTextAura = "문자 오라",
nomRealaura = "활성 오라",
nomRandomColor = "무작위 색상",
nomTexMode = "빛남",
nomInCombat = "전투중에 한해",
aideInCombat = "전투중인 경우에만 이 효과를 보여줍니다.",
nomTalentGroup1 = "특성 전문화 1",
aideTalentGroup1 = "첫번째 특성을 전문화한 경우에만 이 효과를 보여줍니다.",
nomTalentGroup2 = "특성 전문화 2",
aideTalentGroup2 = "두번째 특성을 전문화한 경우에만 이 효과를 보여줍니다.",
nomTalentGroup1 = "특성 전문화 1",
aideTalentGroup1 = "첫번째 특성을 전문화한 경우에만 이 효과를 보여줍니다.",
nomTalentGroup2 = "특성 전문화 2",
aideTalentGroup2 = "두번째 특성을 전문화한 경우에만 이 효과를 보여줍니다.",
nomNotInCombat = "비전투중에 한해",
aideNotInCombat = "비전투중인 경우에만 이 효과를 보여줍니다.",
nomIsMounted = "탈것 탑승에 한해",
aideIsMounted = "탈것에 올라 있는 경우에만 이 효과를 보여줍니다. 비체크시: 탈것에서 내려 있는 경우에만 보여줍니다.",
nomInVehicle = "차량 탑승에 한해",
aideInVehicle = "체크시: 차량에 탑승한 경우에만 이 효과를 보여줍니다. 비체크시: 차량에서 내려 있는 경우에만 보여줍니다.",
nomIsInRaid = "공격대에 한해",
aideIsInRaid = "공격대에 속해 있는 경우에만 이 효과를 보여줍니다.",
nomResting = "휴식중이면 숨기기",
aideResting = "체크시: 전투를 하지 않고 휴식중인 경우에 숨기게 됩니다. 비체크시: 평상시",
};
 
end
\ No newline at end of file
trunk/PowerAuras/localisation.lua
155,6 → 155,7
nomOwnTex = "Use own Texture",
aideOwnTex = "Use the De/Buff or Ability Texture instead.",
nomStacks = "Stacks",
nomUpdateSpeed = "Update speed",
nomSpeed = "Animation speed",
nomBegin = "Begin Animation",
nomEnd = "End Animation",
166,7 → 167,7
nomGCD = "Global Cooldown",
nomThreshold = "Threshold",
nomStance = "Stance",
aideThreshInv = "Check this to invert the threshold logic. Health/Mana: default = Low Warning / checked = High Warning. Energy/Rage/Power: default = High Warning / checked = Low Warning",
aideThreshInv = "Check this to invert the threshold logic. Unchecked = Low Warning / Checked = High Warning.",
nomThreshInv = "</>",
nomMine = "Cast by me",
nomDispellable = "I can dispell",
216,6 → 217,8
aideSelectTimer = "Select which timer will show the duration",
aideSelectTimerBuff = "Select which timer will show the duration (this one is reserved for player's buffs)",
aideSelectTimerDebuff = "Select which timer will show the duration (this one is reserved for player's debuffs)",
 
nomCheckShowStacks = "Show",
 
nomCheckInverse = "Invert",
aideInverse = "Invert the logic to show this effect only when buff/debuff is not active.",
238,6 → 241,7
nomTabActiv = "Activation",
nomTabSound = "Sound",
nomTabTimer = "Timer",
nomTabStacks = "Stacks",
nomWowTextures = "WoW Textures",
nomCustomTextures = "Custom Textures",
nomTextAura = "Text Aura",
trunk/PowerAuras/PowerAuras.lua
129,7 → 129,14
--- drag it to an actionbar (doesn't have to be a visible one)
 
-- Exposed for Saving
PowaMisc = {};
PowaMisc =
{
disabled = false,
debug = false,
OnUpdateLimit = 0,
AnimationLimit = 0,
};
 
PowaSet = {};
PowaTimer = {};
 
153,14 → 160,14
PowaAuras_Frame:Show(); -- Show Main Options Frame
self:RegisterEvents(PowaAuras_Frame);
end
self.Misc.disabled = false;
PowaMisc.disabled = false;
else
if PowaAuras_Frame and PowaAuras_Frame:IsShown() then
PowaAuras_Frame:UnregisterAllEvents();
PowaAuras_Frame:Hide();
end
self:OptionHideAll(true);
self.Misc.disabled = true;
PowaMisc.disabled = true;
end
end
 
169,7 → 176,7
--- Setting up the Import/Export static popups
self:SetupStaticPopups();
 
if (not self.Misc.disabled) then
if (not PowaMisc.disabled) then
self:RegisterEvents(frame);
end
 
284,11 → 291,13
function PowaAuras:VARIABLES_LOADED(...)
DEFAULT_CHAT_FRAME:AddMessage("|cffB0A0ff<Power Auras Classic>|r |cffffff00"..self.Version.."|r - "..self.Text.welcome);
 
PowaMisc.OnUpdateLimit = PowaMisc.OnUpdateLimit or 0;
PowaMisc.AnimationLimit = PowaMisc.AnimationLimit or 0;
 
if (TestPA==nil) then
PowaState = {};
end
 
self.Misc = PowaMisc;
_, self.playerclass = UnitClass("player");
 
self:LoadAuras();
310,12 → 319,11
getglobal("PowaBarAuraTextureSlider"):SetMinMaxValues(1, self.maxtextures);
getglobal("PowaBarAuraTextureSliderHigh"):SetText(self.maxtextures);
 
self.Initialising = false;
self:CreateEffectLists();
end
 
function PowaAuras:PLAYER_ENTERING_WORLD(...)
if (self.Misc.disabled == true) then
if (PowaMisc.disabled == true) then
self:Toggle(false);
return;
end
332,10 → 340,6
end
end
 
for key in pairs(self.DoCheck) do
self.DoCheck[key] = true;
end
 
if UnitIsDeadOrGhost("player") then
self.WeAreAlive = false;
end
352,6 → 356,10
self:GetStances();
 
self:MemorizeActions();
 
self.Initialising = false;
 
self.DoCheck.All = true;
end
 
function PowaAuras:GetStances()
739,14 → 747,14
 
function PowaAuras:SPELL_UPDATE_COOLDOWN(...)
if (self.ModTest == false) then
self.DoCheck.OwnSpell = true;
self.DoCheck.OwnSpells = true;
--self:Message("SPELL_UPDATE_COOLDOWN", ...);
end
end
 
function PowaAuras:SPELL_UPDATE_USABLE(...)
if (self.ModTest == false) then
self.DoCheck.OwnSpell = true;
self.DoCheck.OwnSpells = true;
--self:Message("SPELL_UPDATE_USABLE", ...);
end
end
759,6 → 767,30
end
end
 
function PowaAuras:UNIT_THREAT_SITUATION_UPDATE(...)
local unit = ...;
if (self.ModTest == false) then
--self:Message("UNIT_THREAT_SITUATION_UPDATE ", unit);
if unit == "player" then
self.DoCheck.Aggro = true;
return;
end
 
for i=1,GetNumPartyMembers() do
if unit == "party"..i then
self.DoCheck.PartyAggro = true;
break;
end
end
for i=1, GetNumRaidMembers() do
if unit == "raid"..i then
self.DoCheck.RaidAggro = true;
break;
end
end
end
end
 
function PowaAuras:CustomTexPath(customname)
local texpath;
if string.find(customname,".", 1, true) then
801,10 → 833,31
return self.TimerFrame[auraId][1], self.TimerFrame[auraId][2];
end
 
function PowaAuras:CreateStacksFrameIfMissing(auraId)
if (not self.StacksFrames[auraId]) then
--self:Message("Creating missing StacksFrame for aura "..tostring(auraId));
local frame = CreateFrame("Frame", "StacksFrame"..auraId);
self.StacksFrames[auraId] = frame;
 
frame:SetFrameStrata("LOW");
frame:Hide();
 
frame.texture = frame:CreateTexture(nil,"BACKGROUND");
frame.texture:SetBlendMode("ADD");
frame.texture:SetAllPoints(frame);
if (self.Auras[auraId].Stacks.Transparent) then
frame.texture:SetTexture("Interface\\Addons\\PowerAuras\\timersTransparent.tga");
else
frame.texture:SetTexture("Interface\\Addons\\PowerAuras\\timers.tga");
end
end
self:UpdateOptionsStacks(auraId);
return self.StacksFrames[auraId];
end
 
--- ----------------------------------------------------------------------------------------------- CREE LA LISTE DES CHECKS
 
function PowaAuras:CreateEffectLists()
if (self.Initialising) then return; end
 
for k in pairs(self.AurasByType) do
self.AurasByType[k] = {};
817,7 → 870,7
end
end
 
if (self.Misc.debug == true) then
if (PowaMisc.debug == true) then
for k in pairs(self.AurasByType) do
self:Message(k .. " : " .. #self.AurasByType[k]); --OK
end
936,7 → 989,7
end
 
if shouldShow then
if (not aura.Showing) then
if (not aura.Showing or aura.HideRequest) then
--self:Message("ShowAura ", aura.buffname, " (",auraId,") ", reason);
self:DisplayAura(auraId);
end
975,6 → 1028,7
--- -----------------------------------------------------------------------------------------------------------
function PowaAuras:ShowAuraForFirstTime(aura)
self:UnitTestInfo("ShowAuraForFirstTime", aura.id);
--self:Message("ShowAuraForFirstTime ", aura.id);
local auraId = aura.id;
 
if (self.ModTest == false) then
1056,6 → 1110,7
frame.statut = 0;
 
aura.TimeShown = 0;
aura.DurationExpired = false;
if (aura.Timer and aura.timerduration) then
aura.Timer.CustomDuration = aura.timerduration;
end
1078,6 → 1133,10
frame:Show(); -- Show Aura Frame
 
aura.Showing = true;
if (aura.Timer) then
aura.Timer.HideRequest = false;
end
if (aura.Stacks) then aura.Stacks.HideRequest = false; end
aura.HideRequest = false;
self:ShowSecondaryAuraForFirstTime(aura);
end
1193,361 → 1252,149
 
--self:Message("DisplayAura aura ", aura);
 
if (not aura.Showing) then --- si pas en cours
if (not aura.Showing or aura.HideRequest) then
self:ShowAuraForFirstTime(aura);
end
end
 
--- ------------------------------------------------------------------------------------------------- ON UPDATE
function PowaAuras:AnimateAura(aura, elapsed)
self:UnitTestInfo("AnimateAura", aura.id, elapased);
 
 
local frame = aura:GetFrame();
 
self.curScale.w=frame.baseL;
self.curScale.h=frame.baseH;
function PowaAuras:UpdateAura(aura, elapsed)
--self:Message("UpdateAura ", aura.id, " ", elapsed);
if (aura == nil) then
self:UnitTestInfo("UpdateAura: Don't show, aura missing");
--self:Message("UpdateAura: Don't show, aura missing");
return;
end
if (aura.off) then
if (not aura.Showing and not aura:TimerShowing() and not aura:StacksShowing()) then
self:UnitTestInfo("UpdateAura: Don't show, off=", aura.off);
--self:Message("UpdateAura: Don't show, off=", aura.off);
return;
end
aura.HideRequest = true;
if (aura.Timer) then aura.Timer.HideRequest = true; end
end
--if (not aura.Showing and not aura:TimerShowing() and not aura:StacksShowing()) then
--self:UnitTestInfo("UpdateAura: Nothing Showing");
--self:Message("UpdateAura: Nothing Showing");
--return;
--end
 
 
--- Animations ----------------------------------------------------------------------
self:UnitTestInfo("Animation type", aura.anim1);
 
--- Animation 1 : aucune
if (aura.anim1 == 1) then
 
--- Animation 2 : max alpha <-> mi-alpha
elseif (aura.anim1 == 2) then
 
self.minScale.a = aura.alpha * 0.5 * aura.speed;
self.maxScale.a = aura.alpha;
 
if (frame.statut == 0) then
self.curScale.a = frame:GetAlpha() - (elapsed / 2);
frame:SetAlpha( self.curScale.a )
if (frame:GetAlpha() < self.minScale.a) then
frame:SetAlpha(self.minScale.a);
frame.statut = 1;
end
else
self.curScale.a = frame:GetAlpha() + (elapsed / 2);
if (self.curScale.a > 1.0) then self.curScale.a = 1.0; end --- pas trop haut non plus
frame:SetAlpha( self.curScale.a )
if (frame:GetAlpha() >= self.maxScale.a) then
frame:SetAlpha(self.maxScale.a);
frame.statut = 0;
end
--self:Message("aura.Showing ", aura.Showing);
if (aura.Showing) then
local frame = aura:GetFrame();
if (frame == nil) then
self:UnitTestInfo("UpdateAura: Don't show, frame missing");
--self:Message("UpdateAura: Don't show, frame missing");
return;
end
--- Animation 3 : mini-zoom in repetitif + fading
elseif (aura.anim1 == 3) then
self.minScale.w = self.curScale.w * 0.90;
self.minScale.h = self.curScale.h * 0.90;
self.maxScale.w = self.curScale.w * 1.20;
self.maxScale.h = self.curScale.h * 1.20;
local speedScale = (25 * aura.speed) * aura.size;
 
if (frame.statut == 1) then --- decale anim 2
frame:SetWidth(self.curScale.w * 1.15);
frame:SetHeight(self.curScale.h * 1.15);
frame.statut = 0;
end
 
frame:SetWidth( frame:GetWidth() + (elapsed * speedScale) )
frame:SetHeight( frame:GetHeight() + (elapsed * speedScale) )
 
frame:SetAlpha( ((self.maxScale.w - frame:GetWidth()) / (self.maxScale.w - self.minScale.w)) * aura.alpha );
 
if (frame:GetWidth() > self.maxScale.w) then
frame:SetWidth(self.minScale.w);
frame:SetHeight(self.minScale.h);
end
--- Animation 4 : mini-zoom in/out
elseif (aura.anim1 == 4) then
self.minScale.w = self.curScale.w * 0.95;
self.minScale.h = self.curScale.h * 0.95;
self.maxScale.w = self.curScale.w * 1.05;
self.maxScale.h = self.curScale.h * 1.05;
local speedScale = (50 * aura.speed) * aura.size;
 
if (frame.statut == 0) then
frame:SetWidth( frame:GetWidth() + (elapsed * speedScale * aura.torsion) )
frame:SetHeight( frame:GetHeight() + (elapsed * speedScale * (2-aura.torsion) ) )
if (frame:GetWidth() > self.maxScale.w) then
frame:SetWidth(self.maxScale.w);
frame:SetHeight(self.maxScale.h);
frame.statut = 1;
--self:Message("UpdateAura ", aura, " ", elapsed);
 
if (not aura.HideRequest and not aura.isSecondary and not self.ModTest and not aura.DurationExpired and aura.duration > 0) then
aura.TimeShown = aura.TimeShown + elapsed;
if (aura.TimeShown > aura.duration) then --- If duration has expired then hide this aura
self:UnitTestInfo("UpdateAura: Hide, duration expired");
--self:Message("UpdateAura: Hide, duration expired");
aura.HideRequest = true;
aura.DurationExpired = true;
end
else
frame:SetWidth( frame:GetWidth() - (elapsed * speedScale * aura.torsion) )
frame:SetHeight( frame:GetHeight() - (elapsed * speedScale * (2-aura.torsion) ) )
if (frame:GetWidth() < self.minScale.w) then
frame:SetWidth(self.minScale.w);
frame:SetHeight(self.minScale.h);
frame.statut = 0;
end
end
--- Animation 5 : effet bulle
elseif (aura.anim1 == 5) then
self.minScale.w = self.curScale.w * 0.95;
self.minScale.h = self.curScale.h * 0.95;
self.maxScale.w = self.curScale.w * 1.05;
self.maxScale.h = self.curScale.h * 1.05;
local speedScale = (50 * aura.speed) * aura.size;
 
if (frame.statut == 0) then
frame:SetWidth( frame:GetWidth() + (elapsed * speedScale * aura.torsion) )
frame:SetHeight( frame:GetHeight() - (elapsed * speedScale * (2-aura.torsion) ) )
if (frame:GetWidth() > self.maxScale.w) then
frame:SetWidth(self.maxScale.w);
frame:SetHeight(self.minScale.h);
frame.statut = 1;
end
else
frame:SetWidth( frame:GetWidth() - (elapsed * speedScale * aura.torsion) )
frame:SetHeight( frame:GetHeight() + (elapsed * speedScale * (2-aura.torsion) ) )
if (frame:GetHeight() > self.maxScale.h) then
frame:SetWidth(self.minScale.w);
frame:SetHeight(self.maxScale.h);
frame.statut = 0;
end
end
--- position au hasard + zoom in + fade (water-drop)
elseif (aura.anim1 == 6) then
if (frame:GetAlpha() > 0) then
self.curScale.a = frame:GetAlpha() - (elapsed * aura.alpha * 0.5 * aura.speed);
if (self.curScale.a < 0) then frame:SetAlpha(0.0);
else frame:SetAlpha(self.curScale.a); end
self.maxScale.w = frame:GetWidth() + (elapsed * 100 * aura.speed * aura.size);
self.maxScale.h = frame:GetHeight() + (elapsed * 100 * aura.speed * aura.size);
if ( (self.maxScale.w * 1.5) > frame:GetWidth()) then --- evite les lags
frame:SetWidth(self.maxScale.w)
frame:SetHeight(self.maxScale.h)
end
else
self.maxScale.w = (random(0,20) - 10) * aura.speed;
self.maxScale.h = (random(0,20) - 10) * aura.speed;
frame:SetAlpha(aura.alpha);
frame:SetWidth(self.curScale.w * 0.85);
frame:SetHeight(self.curScale.h * 0.85);
frame:SetPoint("Center",aura.x + self.maxScale.w, aura.y + self.maxScale.h);
end
--- static sauf parfois ou la texture est decalee + opaque (type electrique)
elseif (aura.anim1 == 7) then
if (frame.statut < 2) then
frame:SetAlpha(aura.alpha / 2); --- mi-alpha
if (random( 210-(aura.speed*100) ) == 1) then
frame.statut = 2;
self.maxScale.w = random(0,10) - 5;
self.maxScale.h = random(0,10) - 5;
frame:SetPoint("Center",aura.x + self.maxScale.w, aura.y + self.maxScale.h);
frame:SetAlpha(aura.alpha);
end
else
frame:SetPoint("Center",aura.x, aura.y);
frame.statut = 0;
end
--- zoom out + stop + fade
elseif (aura.anim1 == 8) then
self.minScale.w = self.curScale.w;
self.minScale.h = self.curScale.h;
self.maxScale.w = self.curScale.w * 1.30;
self.maxScale.h = self.curScale.h * 1.30;
local speedScale = (50 * aura.speed) * aura.size;
 
if (frame.statut == 0) then --- demarre le zoom out (max size)
frame:SetWidth(self.maxScale.w);
frame:SetHeight(self.maxScale.h);
frame:SetAlpha(0.0);
frame.statut = 2;
elseif (frame.statut == 2) then --- zoom out + fade in
frame:SetWidth( frame:GetWidth() - (elapsed * speedScale * aura.torsion) )
frame:SetHeight( frame:GetHeight() - (elapsed * speedScale * (2-aura.torsion) ) )
 
frame:SetAlpha( ((self.maxScale.w - frame:GetWidth()) / (self.maxScale.w - self.minScale.w)) * aura.alpha );
 
if (frame:GetWidth() < self.curScale.w) then
frame:SetWidth(self.curScale.w);
frame:SetHeight(self.curScale.h);
frame.statut = 1;
if (aura.HideRequest) then
if (aura.Timer and self.ModTest) then
aura.Timer.HideRequest = true;
end
elseif (frame.statut == 1) then --- demarre le fade-out
frame:SetWidth(self.curScale.w);
frame:SetHeight(self.curScale.h);
frame:SetAlpha(aura.alpha);
frame.statut = 3;
 
elseif (frame.statut == 3) then --- fade-out
self.curScale.a = frame:GetAlpha() - (elapsed / random(1,2));
 
if (self.curScale.a < 0.0) then
frame:SetAlpha(0.0);
frame.statut = 0;
else
frame:SetAlpha(self.curScale.a);
if (aura.Stacks) then
aura.Stacks.HideRequest = true;
aura.Stacks:Hide();
end
--self:Message("Hide Requested for ",aura.id);
aura.animation = self:AnimationEndFactory(aura.finish, aura, frame);
if (not aura.animation) then
aura:Hide();
end
end
--- deplacement vers le haut + fade-out + reduction
elseif (aura.anim1 == 9) then
local speedScale = (50 * aura.speed) * aura.size;
 
if (frame.statut < 2) then --- debut
frame:SetWidth(self.curScale.w);
frame:SetHeight(self.curScale.h);
frame:SetPoint("Center",aura.x, aura.y);
frame:SetAlpha(aura.alpha);
frame.statut = 2;
else
_,_,_,xOfs,yOfs = frame:GetPoint();
frame:SetPoint("Center",xOfs + (random(1,3)-2), yOfs + (elapsed * random(10,20)));
self.curScale.a = frame:GetAlpha() - ( (elapsed / random(2,4)) * aura.alpha);
 
frame:SetWidth( frame:GetWidth() - (elapsed * speedScale * aura.torsion) )
frame:SetHeight( frame:GetHeight() - (elapsed * speedScale * (2-aura.torsion) ) )
self:UpdateAuraAnimation(aura, elapsed);
 
if (self.curScale.a < 0.0) then
frame:SetAlpha(0.0);
frame.statut = 1;
else
frame:SetAlpha(self.curScale.a);
end
if (aura.Stacks and not aura.Stacks.HideRequest) then
aura.Stacks:Update();
end
--- rotation autour du centre
elseif (aura.anim1 == 10) then
self.maxScale.w = math.max(aura.x, -aura.x, 5) * 1.0;
self.maxScale.h = self.maxScale.w * (1.6 - aura.torsion);
local speedScale = elapsed * 75 * aura.speed;
 
if (aura.isSecondary and (self.Frames[aura.id].anim1 == 10)) then
if (aura.symetrie < 2) then
frame.statut = self.Frames[aura.id].statut + 180;
if (frame.statut > 360) then frame.statut = frame.statut - 360; end
else
frame.statut = 180-self.Frames[aura.id].statut;
if (frame.statut < 0) then frame.statut = frame.statut + 360; end
end
elseif (aura.symetrie == 1 or aura.symetrie == 3) then
frame.statut = frame.statut - speedScale;
if (frame.statut < 0) then frame.statut = 360; end
end
 
if (aura.isSecondary) then return; end
 
if (aura.Timer) then
if (aura.Timer.HideRequest) then
aura.Timer:Hide();
else
frame.statut = frame.statut + speedScale;
if (frame.statut > 360) then frame.statut = 0; end
aura.Timer:Update(elapsed);
end
 
--- annule la torsion
frame:SetWidth(self.curScale.w / aura.torsion);
frame:SetHeight(self.curScale.h / (2-aura.torsion));
--- annule la symetrie
if not aura.textaura == true then
local texture = aura:GetTexture();
if (texture) then
texture:SetTexCoord(0, 1, 0, 1);
end
end
 
--- transparence
if (frame.statut < 180) then --- zone de transparence
if (frame.statut < 90) then
frame:SetAlpha( (1-(frame.statut / 90)) * aura.alpha );
else
frame:SetAlpha( ((frame.statut-90) / 90) * aura.alpha );
end
else
frame:SetAlpha(aura.alpha);
end
 
frame:SetPoint("Center",self.maxScale.w * cos(frame.statut), (self.maxScale.h * sin(frame.statut)) + aura.y);
end
 
 
aura.HideRequest = false;
 
end
 
function PowaAuras:UpdateAura(aura, elapsed)
--self:Message("UpdateAura ", aura, " ", elapsed);
if (aura == nil) then
self:UnitTestInfo("UpdateAura: Don't show, aura missing");
return;
end
if (aura.off or not aura.Showing) then
self:UnitTestInfo("UpdateAura: Don't show, ", aura.off, aura.Showing);
return;
end
local frame = aura:GetFrame();
if (frame == nil) then
self:UnitTestInfo("UpdateAura: Don't show, frame missing");
return;
end
--self:Message("UpdateAura ", aura, " ", elapsed);
function PowaAuras:UpdateAuraAnimation(aura, elapsed)
if (not aura.Showing) then return; end
if (not aura.animation or elapsed==0) then return; end
 
local finished = aura.animation:Update(math.min(elapsed, 0.03));
 
if (aura.HideRequest) then
--self:Message("Hide Requested for ",aura.id);
aura.HideRequest = false;
aura.animation = self:AnimationEndFactory(aura.finish, aura, frame);
if (not aura.animation) then
aura:Hide();
return;
end
end
if (not finished) then return end
 
if (not aura.isSecondary) then
if (self.ModTest == false) then
if (aura.duration > 0) then
aura.TimeShown = aura.TimeShown + elapsed;
if (aura.TimeShown > aura.duration) then --- If duration has expired then hide this aura
self:UnitTestInfo("UpdateAura: Hide, duration expired");
aura.HideRequest = true;
return;
end
if (aura.animation.IsBegin) then
aura.animation = self:AnimationMainFactory(aura.anim1, aura, frame);
local secondaryAura = self.SecondaryAuras[aura.id];
if (secondaryAura) then
local secondaryAuraFrame = self.SecondaryFrames[aura.id];
if (secondaryAuraFrame) then
secondaryAura.animation = self:AnimationMainFactory(aura.anim2, secondaryAura, secondaryAuraFrame);
end
end
aura.Timer:Update(elapsed);
end
 
if (aura.animation) then
local finished = aura.animation:Update(elapsed);
if (finished) then
if (aura.animation.IsBegin) then
aura.animation = self:AnimationMainFactory(aura.anim1, aura, frame);
local secondaryAura = self.SecondaryAuras[aura.id];
if (secondaryAura) then
local secondaryAuraFrame = self.SecondaryFrames[aura.id];
if (secondaryAuraFrame) then
secondaryAura.animation = self:AnimationMainFactory(aura.anim2, secondaryAura, secondaryAuraFrame);
end
end
elseif (aura.animation.IsEnd) then
aura:Hide();
end
end
return;
else
self:AnimateAura(aura, elapsed);
end
 
if (aura.animation.IsEnd) then
aura:Hide();
end
 
end
 
function PowaAuras:OnUpdate(elapsed)
--- lance les checks de la cible
self:UnitTestInfo("OnUpdate", elapsed);
 
if (self.Initialising) then return; end --- Addon Disabled
if (self.Initialising) then return; end
 
self.DebugTimer = self.DebugTimer + elapsed;
self.ChecksTimer = self.ChecksTimer + elapsed;
self.AnimationThrottleTimer = self.AnimationThrottleTimer + elapsed;
self.ThrottleTimer = self.ThrottleTimer + elapsed;
 
if (self.ModTest == false) then
local checkAura = false;
if (PowaMisc.OnUpdateLimit == 0 or self.ThrottleTimer >= PowaMisc.OnUpdateLimit) then
checkAura = true;
self.ThrottleTimer = 0;
end
 
if (not self.ModTest and checkAura) then
 
--self:Message("OnUpdate ",elapsed, " ", self.ChecksTimer);
self.ChecksTimer = self.ChecksTimer + elapsed;
--self:Message("OnUpdate ",elapsedCheck, " ", self.ChecksTimer);
self:UnitTestInfo("ChecksTimer", self.ChecksTimer, self.NextCheck);
if (self.ChecksTimer > self.NextCheck) then
if (self.ChecksTimer > (self.NextCheck + PowaMisc.OnUpdateLimit)) then
self.ChecksTimer = 0;
if (self.ModTest == false) then
local isMountedNow = (IsMounted()~=nil);
if (isMountedNow ~= self.WeAreMounted) then
self.DoCheck.All = true;
self.WeAreMounted = isMountedNow;
end
self.DoCheck.Enchants = true;
end
local isMountedNow = (IsMounted()~=nil);
if (isMountedNow ~= self.WeAreMounted) then
self.DoCheck.All = true;
self.WeAreMounted = isMountedNow;
end
self.DoCheck.Enchants = true;
self.DoCheck.OwnSpells = true;
end
 
self.DebugTimer = self.DebugTimer + elapsed;
 
 
--- Usable pending Checks
if self.UsablePending then
self:UnitTestInfo("UsablePending");
1564,7 → 1411,6
end
end
 
--- lance les checks normaux
self:UnitTestInfo("DoCheck update");
for k ,v in pairs(self.DoCheck) do
self:Debug("DoCheck "..k.." = " .. tostring(v) );
1575,8 → 1421,14
end
end
 
-- Check each aura
self:UnitTestInfo("Aura checks");
if (PowaMisc.AnimationLimit > 0 and self.AnimationThrottleTimer < PowaMisc.AnimationLimit) then
return;
end
elapsed = self.AnimationThrottleTimer;
self.AnimationThrottleTimer = 0;
 
-- Update each aura (timers and animations)
self:UnitTestInfo("Aura updates");
for _, aura in pairs(self.Auras) do
self:UpdateAura(aura, elapsed);
end
1614,6 → 1466,7
local temptbl = {strsplit(";", aurastring)};
local importAuraSettings = {};
local importTimerSettings = {};
local hasTimerSettings = false;
 
for i, val in ipairs(temptbl) do
--self:Message(i, " ", val);
1621,9 → 1474,10
local varpref = string.sub(var,1,2);
var = string.sub(var,3);
if (string.sub(key,1,6) == "timer.") then
importTimerSettings[key] = self:ExtractImportValue(varpref, var)
importTimerSettings[key] = self:ExtractImportValue(varpref, var);
hasTimerSettings = true;
else
importAuraSettings[key] = self:ExtractImportValue(varpref, var)
importAuraSettings[key] = self:ExtractImportValue(varpref, var);
end
end
 
1648,8 → 1502,9
if (importAuraSettings.timer) then --backwards compatability
aura.Timer = cPowaTimer(aura.id);
end
 
if (#importTimerSettings>0) then
 
--self:Message("hasTimerSettings=", hasTimerSettings);
if (hasTimerSettings) then
--self:CreateTimerFrameIfMissing(aura.id)
if (aura.Timer==nil) then
aura.Timer = cPowaTimer(aura.id);
1775,37 → 1630,17
end
end
 
function PowaAuras:HideTimerFrame(auraId, i)
if (self.TimerFrame[auraId] and self.TimerFrame[auraId][i]) then
--self:Message("Hide Timer Frame 1 for ", auraId);
self.TimerFrame[auraId][i]:Hide();
end
end
 
function PowaAuras:HideTimerFrames(auraId)
if self.TimerFrame[auraId] then
self:HideTimerFrame(auraId, 1);
self:HideTimerFrame(auraId, 2);
end
end
 
function PowaAuras:DeleteTimerFrames(auraId)
self:HideTimerFrames(auraId);
if self.TimerFrame[auraId] then
self.TimerFrame[auraId][1] = nil;
self.TimerFrame[auraId][2] = nil;
self.TimerFrame[auraId] = nil;
end
end
 
function PowaAuras:OptionHideAll(now) --- cache tous les effets
--- force Hide on mod shutdown
for _, aura in pairs(self.Auras) do
function PowaAuras:OptionHideAll(now) --- Hide all auras
--self:Message("Hide All Frames now=", now);
for id, aura in pairs(self.Auras) do
if now then
--self:Message("Hide aura id=", id);
aura:Hide();
self:HideTimerFrames(aura.id);
else
aura.HideRequest = true;
if (aura.Timer) then aura.Timer.HideRequest = true; end
if (aura.Stacks) then aura.Stacks.HideRequest = true; end
end
end
 
trunk/PowerAuras/PowerAuras.toc
1,7 → 1,7
## Interface: 30200
## Title: Power Auras Classic |cff7f7fffv.2.6.2Q|r
## Title: Power Auras Classic |cff7f7fffv.2.6.2V|r
## Author: Smacker 'lolcat',Driizt 'classic',Garstiger 'continued',Sinsthar 'base'
## Version: 2.6.2Q
## Version: 2.6.2V
## Notes: Cool Effects around the player for ingame events. Authors: |cff7f7fff-Sinsthar-, -Garstiger-, -Driizt-, and -Smacker-|r
## Notes-frFR: Affiche des effets visuels autour du personnage.
## Notes-zhCN: 多功能条件触发式超酷特效音效
17,6 → 17,7
localisation_ruRU.lua
localisation_zhCN.lua
localisation_zhTW.lua
localisation_koKR.lua
PowerAurasDump.lua
PowerAurasClasses.lua
PowerAurasAnimations.lua
24,3 → 25,4
PowerOptions.lua
PowerAuras.xml
PowerOptions.xml
PowerBlizzOptions.xml
\ No newline at end of file
trunk/PowerAuras/localisation_zhTW.lua
183,6 → 183,7
nomOwnTex = "Use own Texture", -- untranslated
aideOwnTex = "Use the De/Buff or Ability Texture instead.", -- untranslated
nomStacks = "Stacks", -- untranslated
nomUpdateSpeed = "Update speed",
nomSpeed = "運動速度",
nomBegin = "進場效果",
nomEnd = "結束效果",
trunk/PowerAuras/localisation_ruRU.lua
158,6 → 158,7
nomOwnTex = "Своя текстуру",
aideOwnTex = "Используйте Де/Бафф или способность вместо текстур.",
nomStacks = "Сумма",
nomUpdateSpeed = "Update speed",
nomSpeed = "Скорость анимации",
nomBegin = "Начало анимации",
nomEnd = "Конец анимации",
trunk/PowerAuras/localisation_deDE.lua
150,6 → 150,7
 
nomStacks = "Stacks",
 
nomUpdateSpeed = "Update speed",
nomSpeed = "Animations Tempo",
nomBegin = "Animations Start",
nomEnd = "Animations Ende",
trunk/PowerAuras/PowerBlizzOptions.xml New file
0,0 → 1,127
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\..\FrameXML\UI.xsd">
 
<Frame name="PowaOptionsCpuFrame2" parent="UIParent">
 
<Scripts>
<OnLoad>
PowaOptionsCpuFrame2_OnLoad(self);
</OnLoad>
<OnShow>
PowaOptionsCpuFrame2_OnShow();
</OnShow>
</Scripts>
 
<Frames>
 
 
<!-- Enable PA Checkbox -->
<CheckButton name="PowaEnableButton" inherits="PowaCheckTemplate">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaOptionsCpuFrame2"
relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20"
y="-15" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self.tooltipText = PowaAuras.Text.aideEnable;
getglobal("PowaEnableButtonText"):SetText(PowaAuras.Text.nomEnable);
</OnLoad>
<OnClick>
--PowaAuras:EnableChecked();
</OnClick>
</Scripts>
</CheckButton>
 
<CheckButton name="PowaDebugButton" inherits="PowaCheckTemplate">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaEnableButton"
relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0"
y="-10" />
</Offset>
</Anchor>
</Anchors> <Scripts>
<OnLoad>
self.tooltipText = PowaAuras.Text.aideDebug;
getglobal("PowaDebugButtonText"):SetText(PowaAuras.Text.nomDebug);
</OnLoad>
<OnClick>
--PowaAuras:DebugChecked();
</OnClick>
</Scripts>
</CheckButton>
 
<Slider name="PowaOptionsUpdateSlider2"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="360"
y="16" />
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaDebugButton"
relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0"
y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(0,100); self:SetValue(100-200*PowaMisc.OnUpdateLimit); self:SetValueStep(2);
getglobal("PowaOptionsUpdateSlider2Text"):SetText(PowaAuras.Text.nomUpdateSpeed.." : 100");
getglobal("PowaOptionsUpdateSlider2Low"):SetText("0%");
getglobal("PowaOptionsUpdateSlider2High"):SetText("100%");
</OnLoad>
<OnValueChanged>PowaAuras:PowaOptionsUpdateSliderChanged2(self);</OnValueChanged>
</Scripts>
</Slider>
 
<Slider name="PowaOptionsAnimationsSlider2"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="360"
y="16" />
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaOptionsUpdateSlider2"
relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0"
y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(0,100); self:SetValue(100-1000*PowaMisc.AnimationLimit); self:SetValueStep(2);
getglobal("PowaOptionsAnimationsSlider2Text"):SetText(PowaAuras.Text.nomSpeed.." : 100");
getglobal("PowaOptionsAnimationsSlider2Low"):SetText("0%");
getglobal("PowaOptionsAnimationsSlider2High"):SetText("100%");
</OnLoad>
<OnValueChanged>PowaAuras:PowaOptionsAnimationsSliderChanged2(self);</OnValueChanged>
</Scripts>
</Slider>
 
</Frames>
</Frame>
 
</Ui>
trunk/PowerAuras/localisation_zhCN.lua
155,6 → 155,7
aideOwnTex = "使用buff/debuff或技能的默认图标做为材质",
nomStacks = "叠加",
 
nomUpdateSpeed = "Update speed",
nomSpeed = "运动速度",
nomBegin = "进场效果",
nomEnd = "结束效果",
trunk/PowerAuras/PowerAurasClasses.lua
76,9 → 76,95
end
end
end
stacker.Showing = false;
stacker.id = id;
end);
function cPowaStacks:Update()
PowaAuras:UnitTestInfo("Stacks.Update ",self.id);
local aura = PowaAuras.Auras[self.id];
if (aura == nil) then
PowaAuras:UnitTestInfo("Stacks aura missing");
return;
end
if (self.enabled==false) then
PowaAuras:UnitTestInfo("Stacks disabled");
return;
end
local newvalue = 0;
if (PowaAuras.ModTest) then
newvalue = random(1,12);
else
newvalue = aura.StackCount;
end
if (not newvalue or newvalue==0) then
local frame = PowaAuras.StacksFrames[self.id];
if (frame and frame:IsVisible()) then
frame:Hide();
end
self.Showing = false;
return;
end
PowaAuras:CreateStacksFrameIfMissing(self.id);
self:ShowValue(aura, newvalue);
self.Showing = true;
self.HideRequest = false;
end
 
 
function cPowaStacks:ShowValue(aura, newvalue)
local frame = PowaAuras.StacksFrames[self.id];
if (aura.texmode == 1) then
frame.texture:SetBlendMode("ADD");
else
frame.texture:SetBlendMode("DISABLE");
end
local auraTexture = PowaAuras.Textures[self.id];
if (auraTexture) then
if auraTexture:GetObjectType() == "Texture" then
frame.texture:SetVertexColor(auraTexture:GetVertexColor());
elseif auraTexture:GetObjectType() == "FontString" then
frame.texture:SetVertexColor(auraTexture:GetTextColor());
end
else
timerFrame.texture:SetVertexColor(aura.r,aura.g,aura.b);
end
 
--PowaAuras:Message("newvalue=", newvalue);
 
local deci = math.floor(newvalue / 10);
local uni = math.floor(newvalue - (deci*10));
--PowaAuras:Message("Show stacks: ",deci, " ", uni);
local tStep = PowaAuras.Tstep;
if (deci==0) then
frame.texture:SetTexCoord(tStep , tStep * 1.5, tStep * uni, tStep * (uni+1));
else
frame.texture:SetTexCoord(tStep * uni, tStep * (uni+1), tStep * deci, tStep * (deci+1));
end
if (not frame:IsVisible()) then
--PowaAuras:Message("Show Stacks Frame for ", self.id);
frame:Show();
end
end
 
function cPowaStacks:Hide()
--PowaAuras:Message("Hide Stacks Frame for ", self.id, " ", self.Showing, " ", PowaAuras.StacksFrames[self.id]);
if (not self.Showing) then return; end
if (PowaAuras.StacksFrames[self.id]) then
PowaAuras.StacksFrames[self.id]:Hide();
end
self.Showing = false;
self.HideRequest = true;
end
 
function cPowaStacks:Delete()
self:Hide();
if PowaAuras.StacksFrames[self.id] then
PowaAuras.StacksFrames[self.id] = nil;
end
end
 
------- Timer -------
 
cPowaTimer = PowaClass(function(timer, id, base)
timer.enabled = false;
timer.x = 0;
101,6 → 187,7
end
end
end
timer.Showing = false;
timer.id = id;
--for k,v in pairs (timer) do
-- PowaAuras:Message(" "..tostring(k).."="..tostring(v));
111,20 → 198,33
--- ------------------------------------------------------------------------------------------------- TIMERS
function cPowaTimer:Update(elapsed)
PowaAuras:UnitTestInfo("Timer.Update ",self.id);
--PowaAuras:Message("Timer.Update ",self.id);
local aura = PowaAuras.Auras[self.id];
if (aura == nil) then --- cet effet n'affiche pas de timer
if (aura == nil) then
PowaAuras:UnitTestInfo("Timer aura missing");
--PowaAuras:Message("Timer aura missing");
return;
end
if (self.enabled==false) then --- cet effet n'affiche pas de timer
if (self.enabled==false) then
PowaAuras:UnitTestInfo("Timer disabled");
--PowaAuras:Message("Timer disabled");
return;
end
 
--PowaAuras:Message("Showing=", aura.Showing);
--PowaAuras:Message("CanHaveTimer=", aura.CanHaveTimer);
--PowaAuras:Message("CanHaveTimerOnInverse=", aura.CanHaveTimerOnInverse);
--PowaAuras:Message("Inverse=", aura.inverse);
--PowaAuras:Message("CooldownAura=", aura.CooldownAura);
local auraShowing = aura.Showing and not aura.HideRequest;
if (not PowaAuras.ModTest and ((not auraShowing and not aura.CooldownAura) or (auraShowing and aura.CooldownAura))) then
return;
end
 
local debugCycle;
if (PowaAuras.NextDebugCheck>0 and PowaAuras.DebugTimer > PowaAuras.NextDebugCheck) then
PowaAuras.DebugTimer = 0;
PowaAuras:Message("Update Timer #",self.id); --OK
--PowaAuras:Message("Update Timer #",self.id); --OK
debugCycle = true;
end
 
149,6 → 249,7
end
 
PowaAuras:UnitTestInfo("Timer newvalue", newvalue);
--PowaAuras:Message("Timer newvalue=", newvalue);
 
if (newvalue and newvalue > 0) then --- Time has value to display
 
181,12 → 282,17
end
self:ShowValue(aura, 2, small);
end
self.Showing = true;
if (self.HideRequest) then
self.HideRequest = false;
end
 
else
elseif (self.Showing) then
if (debugCycle) then
PowaAuras:Message("HideTimerFrames"); --OK
end
PowaAuras:HideTimerFrames(self.id);
--PowaAuras:Message("HideTimerFrames");
self:Hide();
PowaAuras:TestThisEffect(self.id);
end
 
200,12 → 306,16
timerFrame.texture:SetBlendMode("DISABLE");
end
local auraTexture = PowaAuras.Textures[self.id];
if auraTexture:GetObjectType() == "Texture" then
timerFrame.texture:SetVertexColor(auraTexture:GetVertexColor());
elseif auraTexture:GetObjectType() == "FontString" then
timerFrame.texture:SetVertexColor(auraTexture:GetTextColor());
if (auraTexture) then
if auraTexture:GetObjectType() == "Texture" then
timerFrame.texture:SetVertexColor(auraTexture:GetVertexColor());
elseif auraTexture:GetObjectType() == "FontString" then
timerFrame.texture:SetVertexColor(auraTexture:GetTextColor());
end
else
timerFrame.texture:SetVertexColor(aura.r,aura.g,aura.b);
end
 
 
--PowaAuras:Message("newvalue=", newvalue);
 
local deci = math.floor(newvalue / 10);
218,6 → 328,7
timerFrame.texture:SetTexCoord(tStep * uni, tStep * (uni+1), tStep * deci, tStep * (deci+1));
end
if (not timerFrame:IsVisible()) then
--PowaAuras:Message("Show timer frame");
timerFrame:Show(); -- Timer Frame
end
--PowaAuras:Message("Show #3 ", k, " ", i, " ", j, " ", seconds);
226,7 → 337,33
end
 
 
function cPowaTimer:HideFrame(i)
if (PowaAuras.TimerFrame[self.id] and PowaAuras.TimerFrame[self.id][i]) then
--PowaAuras:Message("Hide Timer Frame ", i," for ", self.id);
PowaAuras.TimerFrame[self.id][i]:Hide();
end
end
 
function cPowaTimer:Hide()
if (not self.Showing) then return; end
if PowaAuras.TimerFrame[self.id] then
self:HideFrame(1);
self:HideFrame(2);
end
self.Showing = false;
self.HideRequest = true;
--PowaAuras:Message("Hide timer frame");
end
 
function cPowaTimer:Delete()
self:Hide();
if PowaAuras.TimerFrame[self.id] then
PowaAuras.TimerFrame[self.id][1] = nil;
PowaAuras.TimerFrame[self.id][2] = nil;
PowaAuras.TimerFrame[self.id] = nil;
end
end
 
------------cPowaAura----------------
-- cPowaAura is the base class and is not instanced directly, the other classes inherit properties and methods from it
--===========================
326,29 → 463,75
end
 
if (base.Timer) then
--if ((base.CanHaveTimerOnInverse or base.CanHaveTimer) and base.Timer) then
aura.Timer = cPowaTimer(id, base.Timer);
end
 
if (base.Stacks) then
if (base.Stacks and not base.isSecondary) then
aura.Stacks = cPowaStacks(id, base.Stacks);
end
end
 
if (not aura.Timer) then
--if ((base.CanHaveTimerOnInverse or base.CanHaveTimer) and not aura.Timer) then
aura.Timer = cPowaTimer(id);
end
 
if (not aura.Stacks) then
if (base.CanHaveStacks and not aura.Stacks and not aura.isSecondary) then
aura.Stacks = cPowaStacks(id);
end
 
if (aura.Timer) then
aura.Timer.Showing = false;
aura.Timer.HideRequest = false;
end
if (aura.Stacks) then
aura.Stacks.Showing = false;
aura.Stacks.HideRequest = false;
end
aura.Showing = false;
aura.HideRequest = false;
aura.id = id;
 
end);
 
 
function cPowaAura:TimerShowing()
if (not self.Timer) then return false; end
return self.Timer.Showing;
end
 
function cPowaAura:StacksShowing()
if (not self.Stacks) then return false; end
return self.Stacks.Showing;
end
 
function cPowaAura:HideShowTabs()
if ((self.CanHaveTimer and not self.inverse) or (self.CanHaveTimerOnInverse and self.inverse)) then
PowaEditorTab3:Show();
if (not self.Timer) then
self.Timer = cPowaTimer(self.id);
end
else
PowaEditorTab3:Hide();
if (self.Timer) then
self.Timer.enabled = false;
end
end
if (self.CanHaveStacks and not self.inverse) then
PowaEditorTab5:Show();
if (not self.Stacks) then
self.Stacks = cPowaStacks(self.id);
end
else
PowaEditorTab5:Hide();
if (self.Stacks) then
self.Stacks.enabled = false;
end
end
end
function cPowaAura:GetDuration(durationInfo)
--PowaAuras:Message("GetDuration=", durationInfo);
if (durationInfo and durationInfo > 0) then
return math.max(durationInfo - GetTime(), 0);
end
430,7 → 613,8
end
 
if (not self.isSecondary) then
PowaAuras:HideTimerFrames(self.id);
if (self.Timer and PowaAuras.ModTest) then self.Timer:Hide(); end
if (self.Stacks) then self.Stacks:Hide(); end
local frame = PowaAuras.Frames[self.id];
if (frame) then
frame:Hide();
668,28 → 852,32
pword = self:Trim(pword);
if (string.len(pword)>0) then
local textToSearch;
local textureMatch;
if string.find(pword, "_") then
_, _,textToSearch = string.find(spellTexture, "([%w_]*)$")
else
textToSearch = spellName;
pword = self:GetSpellNameFromMatch(pword);
pword, textureMatch = self:GetSpellNameFromMatch(pword);
end
if (textToSearch) then
if (self.ignoremaj) then
textToSearch = string.upper(textToSearch)
pword = string.upper(pword);
end
PowaAuras:Debug("pword=", pword);
PowaAuras:Debug("search=", textToSearch);
if (self.exact) then
PowaAuras:Debug("exact=", (textToSearch == pword));
if (textToSearch == pword) then
return true;
PowaAuras:Debug("textureMatch=", textureMatch);
if (not textureMatch or textureMatch==spellTexture) then
if (textToSearch) then
if (self.ignoremaj) then
textToSearch = string.upper(textToSearch)
pword = string.upper(pword);
end
else
PowaAuras:Debug("find=", string.find(textToSearch, pword, 1, true));
if (string.find(textToSearch, pword, 1, true)) then
return true;
PowaAuras:Debug("pword=", pword);
PowaAuras:Debug("search=", textToSearch);
if (self.exact) then
PowaAuras:Debug("exact=", (textToSearch == pword));
if (textToSearch == pword) then
return true;
end
else
PowaAuras:Debug("find=", string.find(textToSearch, pword, 1, true));
if (string.find(textToSearch, pword, 1, true)) then
return true;
end
end
end
end
731,16 → 919,28
if k == "multiids" then
v = "";
end
varType = type(v);
local varType = type(v);
if (varType == "string" or varType == "boolean" or varType == "number") then
tempstr = tempstr..k..":"..string.sub(varType,1,2)..tostring(v).."; ";
tempstr = tempstr..k..":"..string.sub(varType,1,2)
if (varType == "string") then
tempstr = tempstr..v;
else
tempstr = tempstr..tostring(v);
end
tempstr = tempstr.."; ";
end
end
if (self.Timer) then
for k, v in pairs (self.Timer) do
varType = type(v);
local varType = type(v);
if (varType == "string" or varType == "boolean" or varType == "number") then
tempstr = tempstr.."timer."..k..":"..string.sub(varType,1,2)..tostring(v).."; ";
tempstr = tempstr.."timer."..k..":"..string.sub(varType,1,2);
if (varType == "string") then
tempstr = tempstr..v;
else
tempstr = tempstr..tostring(v);
end
tempstr = tempstr.."; ";
end
end
end
823,7 → 1023,7
end
end
if (not giveReason) then return false; end
return false,self.NoMatchReason;
return false, unit.." "..self.NoMatchReason;
end
 
function cPowaAura:CheckStacks(count)
841,7 → 1041,7
or (operator == "!" and count ~= stacks));
end
 
cPowaBuffBase = PowaClass(cPowaAura);
cPowaBuffBase = PowaClass(cPowaAura, {CanHaveTimer=true, CanHaveStacks=true});
 
function cPowaBuffBase:AddEffect(i)
 
898,6 → 1098,9
if (self.Timer) then
self.Timer.DurationInfo = expirationTime;
end
if (self.Stacks) then
self.StackCount = count;
end
return true;
end
end
1081,7 → 1284,7
if (self.mine) then
removeable = 1;
end
local name, _, texture, _, typeDebuff, _, expirationTime = UnitDebuff(target, z, removeable);
local name, _, texture, count, typeDebuff, _, expirationTime = UnitDebuff(target, z, removeable);
if (not name) then
return false;
end
1110,6 → 1313,9
if (self.Timer) then
self.Timer.DurationInfo = expirationTime;
end
if (self.Stacks) then
self.StackCount = count;
end
if (self.icon == "") then
getglobal("PowaIconTexture"):SetTexture(texture);
self.icon = getglobal("PowaIconTexture"):GetTexture();
1158,14 → 1364,23
end
end
 
cPowaEnchant = PowaClass(cPowaAura, {AuraType = "Enchants"});
function cPowaEnchant:CheckforEnchant(slot, enchantText)
cPowaEnchant = PowaClass(cPowaAura, {AuraType = "Enchants", CanHaveTimer=true, CanHaveTimerOnInverse=true, CanHaveStacks=true, CooldownAura=true});
function cPowaEnchant:GetDuration(durationInfo)
if (durationInfo and durationInfo > 0) then
return durationInfo / 1000;
end
return 0;
end
function cPowaEnchant:CheckforEnchant(slot, enchantText, textToFind)
PowaAuras:Debug("Check enchant ("..enchantText..") active in slot",slot);
--PowaAuras:Message("Check enchant ("..enchantText..") active in slot",slot);
PowaAuras_Tooltip:SetOwner(UIParent, "ANCHOR_NONE");
PowaAuras_Tooltip:SetInventoryItem("player", slot);
PowaAuras:UnitTestDebug("search in tooltip for ", self.buffname);
PowaAuras:UnitTestDebug("search in tooltip for ", textToFind);
--PowaAuras:Message("search in tooltip for ", textToFind);
for z = 1, PowaAuras_Tooltip:NumLines() do
PowaAuras:UnitTestDebug("Check tooltip line ",z);
--PowaAuras:Message("Check tooltip line ",z);
local textlinel = getglobal("PowaAuras_TooltipTextLeft"..z);
local textl = textlinel:GetText();
local text = "";
1179,7 → 1394,8
end
if (text ~= "") then
PowaAuras:UnitTestDebug("| "..text.." |");
if (self:MatchText(text, self.buffname)) then
--PowaAuras:Message("| "..text.." |");
if (self:MatchText(text, textToFind)) then
PowaAuras_Tooltip:Hide();
return true;
end
1196,42 → 1412,63
getglobal("PowaIconTexture"):SetTexture( GetInventoryItemTexture("player", slot) );
self.icon = getglobal("PowaIconTexture"):GetTexture();
end
if (self.Stacks) then
self.StackCount = count;
end
return true;
end
return false;
end
 
 
function cPowaEnchant:CheckIfShouldShow(giveReason)
PowaAuras:Debug("Check weapon enchant");
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges = GetWeaponEnchantInfo();
 
if (hasMainHandEnchant) then
if (self:CheckforEnchant(16, PowaAuras.Text.mainHand)) then
if (self:SetForEnchant("MH", 16, mainHandCharges, 1)) then
if (self.Timer) then
self.Timer.DurationInfo = mainHandExpiration;
end
if (not giveReason) then return true; end
return true, "Main Hand "..self.buffname.." enchant found";
local checkMain = true;
local checkOff = true;
for pword in string.gmatch(self.buffname, "[^/]+") do
if (pword==PowaAuras.Text.mainHand) then
checkMain = true;
checkOff = false;
elseif (pword==PowaAuras.Text.offHand) then
checkOff = true;
checkMain = false;
else
if (hasMainHandEnchant and checkMain) then
if (self:CheckforEnchant(16, PowaAuras.Text.mainHand, pword)) then
if (self:SetForEnchant("MH", 16, mainHandCharges, 1)) then
if (self.Timer) then
self.Timer.DurationInfo = mainHandExpiration;
end
if (self.Stacks) then
self.StackCount = mainHandCharges;
end
if (not giveReason) then return true; end
return true, "Main Hand "..self.buffname.." enchant found";
end
end
end
end
end
if (hasOffHandEnchant) then
if (self:CheckforEnchant(17, PowaAuras.Text.offHand)) then
if (self:SetForEnchant("OH", 17, offHandCharges, 2)) then
if (self.Timer) then
self.Timer.DurationInfo = offHandExpiration;
end
if (not giveReason) then return true; end
return true, "Off Hand "..self.buffname.." enchant found";
if (hasOffHandEnchant and checkOff) then
if (self:CheckforEnchant(17, PowaAuras.Text.offHand, pword)) then
if (self:SetForEnchant("OH", 17, offHandCharges, 2)) then
if (self.Timer) then
self.Timer.DurationInfo = offHandExpiration;
end
if (self.Stacks) then
self.StackCount = offHandCharges;
end
if (not giveReason) then return true; end
return true, "Off Hand "..self.buffname.." enchant found";
end
end
end
end
end
end
if (not giveReason) then return false; end
return false, "No enchant found on weapons";
end
 
cPowaCombo = PowaClass(cPowaAura, {AuraType = "Combo"});
cPowaCombo = PowaClass(cPowaAura, {AuraType = "Combo", CanHaveStacks=true});
function cPowaCombo:CheckIfShouldShow(giveReason)
if (not(PowaAuras.playerclass == "ROGUE" or (PowaAuras.playerclass=="DRUID" and GetShapeshiftForm()==3))) then
return nil, "You do not use combo points";
1244,6 → 1481,9
getglobal("PowaIconTexture"):SetTexture("Interface\\icons\\inv_sword_48");
self.icon = getglobal("PowaIconTexture"):GetTexture();
end
if (self.Stacks) then
self.StackCount = nCombo;
end
if (not giveReason) then return true; end
return true, "Combo points "..nCombo.." match "..self.buffname;
end
1251,7 → 1491,7
return false, "Combo points "..nCombo.." no match with "..self.buffname;
end
 
cPowaActionReady = PowaClass(cPowaAura, {AuraType = "Actions"});
cPowaActionReady = PowaClass(cPowaAura, {AuraType = "Actions", CanHaveTimer=true, CanHaveTimerOnInverse=true, CooldownAura=true});
function cPowaActionReady:CheckIfShouldShow(giveReason)
PowaAuras:Debug("Check Action / Button:", self.slot);
if (not self.slot or self.slot == 0) then
1284,10 → 1524,11
return false, "Action Not Ready, on cooldown";
end
 
cPowaOwnSpell = PowaClass(cPowaAura, {AuraType = "OwnSpell"});
cPowaOwnSpell = PowaClass(cPowaAura, {AuraType = "OwnSpells", CanHaveTimer=true, CanHaveTimerOnInverse=true, CooldownAura=true});
function cPowaOwnSpell:CheckIfShouldShow(giveReason)
PowaAuras:Debug("Check Spell:", self.buffname);
 
--PowaAuras:Message("Check Spell:", self.buffname);
local reason = "";
for pword in string.gmatch(self.buffname, "[^/]+") do
local spellName, spellIcon = self:GetSpellNameFromMatch(pword);
if (self.icon == "") then
1302,6 → 1543,7
local show = false;
local cdstart, cdduration, enabled = GetSpellCooldown(spellName);
PowaAuras:UnitTestDebug("cdstart= ",cdstart," duration= ",cdduration," enabled= ",enabled);
--PowaAuras:Message("cdstart= ",cdstart," duration= ",cdduration," enabled= ",enabled);
if (enabled) then
local isUsable = IsUsableSpell(spellName);
if (cdduration > 0.2 and cdduration < 1.7 and self.gcd == false) then
1309,17 → 1551,29
else
show = (isUsable == 1 and cdstart == 0);
end
--PowaAuras:Message("show= ",show," self.Timer= ",self.Timer);
if (show) then
--self.duration = math.max(cdstart + cdduration - GetTime(), 0)
if (not giveReason) then return true; end
return true, "Spell "..spellName.." usable";
else
if (self.Timer) then
self.Timer.DurationInfo = spellName;
self.Timer.DurationInfo = cdstart + cdduration;
--PowaAuras:Message("Set DurationInfo= ",self.Timer.DurationInfo);
end
if (not giveReason) then return true; end
return true, "Spell "..spellName.." usable";
if (giveReason) then
reason = reason..spellName.." not usable ";
end
end
elseif (giveReason) then
reason = reason..spellName.." not enabled "
end
end
if (not giveReason) then return false; end
return false, "Spell "..self.buffname.." not found";
if (reason == "") then
return false, "Spell "..self.buffname.." not found";
end
return false, reason
end
 
cPowaAuraStats = PowaClass(cPowaAura);
1422,11 → 1676,11
function cPowaAggro:AddEffect(i)
 
if not self.target
and not self.targetfriend
and not self.party
and not self.raid
and not self.focus
and not self.optunitn then --- self Aggro
and not self.targetfriend
and not self.party
and not self.raid
and not self.focus
and not self.optunitn then --- self Aggro
table.insert(PowaAuras.AurasByType.Aggro, i);
end
if self.party then --- party Aggro
1438,9 → 1692,14
end
 
function cPowaAggro:CheckUnit(unit)
--PowaAuras:Message(unit," UnitThreatSituation=", UnitThreatSituation(unit));
return (UnitThreatSituation(unit) or -1)> 0;
end
function cPowaAggro:CheckIfShouldShow(giveReason)
if (self.icon == "") then
getglobal("PowaIconTexture"):SetTexture("Interface\\icons\\Ability_Warrior_EndlessRage");
self.icon = getglobal("PowaIconTexture"):GetTexture();
end
PowaAuras:Debug("Check Aggro status");
return self:CheckAllUnits(giveReason);
end
trunk/PowerAuras/PowerAuras.xml
2,7 → 2,8
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\..\FrameXML\UI.xsd">
 
 
<!-- Main Frame -->
<Frame name="PowaAuras_Frame"
hidden="false">
<Scripts>
21,6 → 22,7
</Scripts>
</Frame>
 
<!-- Tootips -->
<GameTooltip name="PowaAuras_Tooltip"
frameStrata="TOOLTIP"
hidden="false"
51,6 → 53,9
</Anchor>
</Anchors>
</GameTooltip>
 
<!-- Templates -->
 
<!-- Copied from OptionSliderTemplate 2.4.3 because Blizzard is ......
Check to see if they use consistent fontsizes in build > 8982 and remove this template.
Revert PowaBarSliderTemplate to inherit from OptionsSliderTemplate if it's fixed as well. -->
246,6 → 251,7
</Layers>
</Frame>
 
<!-- Aura Configuration Frame -->
<Frame name="PowaBarConfigFrame"
movable="true"
parent="UIParent"
254,7 → 260,7
enableMouse="true"
enableKeyboard="true">
<Size>
<AbsDimension x="348"
<AbsDimension x="388"
y="704" />
</Size>
<Anchors>
352,9 → 358,11
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight"
alphaMode="ADD" />
</Button>
 
<!-- Top Panel -->
<Frame name="PowaBarConfigFrameEditor">
<Size>
<AbsDimension x="310"
<AbsDimension x="350"
y="300" />
</Size>
<Anchors>
407,7 → 415,7
<Slider name="PowaBarAuraTextureSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="230"
<AbsDimension x="250"
y="16" />
</Size>
<Anchors>
415,7 → 423,7
relativeTo="AuraTexture"
relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="-80"
<AbsDimension x="-40"
y="-104" />
</Offset>
</Anchor>
427,6 → 435,35
<OnValueChanged>PowaAuras:BarAuraTextureSliderChanged();</OnValueChanged>
</Scripts>
</Slider>
<EditBox name="PowaBarAuraTextureEdit"
autoFocus="false"
inherits="InputBoxTemplate">
<Size>
<AbsDimension x="40"
y="16" />
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT"
relativeTo="PowaBarAuraTextureSlider"
relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="0"
y="5" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="ChatFontNormal"
bytes="6" />
</Layer>
</Layers>
<Scripts>
<OnLoad>self:SetMaxLetters(2)</OnLoad>
<OnEnterPressed>self:ClearFocus(); PowaAuras:TextAuraTextureChanged();</OnEnterPressed>
</Scripts>
</EditBox>
 
<EditBox name="PowaBarAurasText"
autoFocus="false"
inherits="InputBoxTemplate">
658,7 → 695,7
<Slider name="PowaBarAuraAlphaSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="130"
<AbsDimension x="210"
y="16" />
</Size>
<Anchors>
666,7 → 703,7
relativeTo="PowaBarAuraTextureSlider"
relativePoint="BOTTOM">
<Offset>
<AbsDimension x="50"
<AbsDimension x="20"
y="-17" />
</Offset>
</Anchor>
692,7 → 729,7
relativeTo="PowaBarAuraAlphaSlider"
relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0"
<AbsDimension x="40"
y="-17" />
</Offset>
</Anchor>
710,7 → 747,7
<Slider name="PowaBarAuraSizeSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="268"
<AbsDimension x="328"
y="16" />
</Size>
<Anchors>
736,7 → 773,7
<Slider name="PowaBarAuraCoordXSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="220"
<AbsDimension x="280"
y="16" />
</Size>
<Anchors>
795,7 → 832,7
<Slider name="PowaBarAuraCoordSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="220"
<AbsDimension x="280"
y="16" />
</Size>
<Anchors>
900,9 → 937,11
<NormalTexture name="$parentNormalTexture"
file="Interface\ChatFrame\ChatFrameColorSwatch" />
</Button>
 
<!-- First Configuration Tab Panel (Activation)-->
<Frame name="PowaBarConfigFrameEditor2">
<Size>
<AbsDimension x="310"
<AbsDimension x="350"
y="340" />
</Size>
<Anchors>
1866,10 → 1905,11
</EditBox>
</Frames>
</Frame>
<Frame name="PowaBarConfigFrameEditor3"
<!-- Second Configuration Tab Panel (Animation)-->
<Frame name="PowaBarConfigFrameEditor3"
hidden="true">
<Size>
<AbsDimension x="310"
<AbsDimension x="350"
y="130" />
</Size>
<Anchors>
2120,10 → 2160,11
</Slider>
</Frames>
</Frame>
<Frame name="PowaBarConfigFrameEditor5"
<!-- Third Configuration Tab Panel (Sound)-->
<Frame name="PowaBarConfigFrameEditor5"
hidden="true">
<Size>
<AbsDimension x="310"
<AbsDimension x="350"
y="150" />
</Size>
<Anchors>
2253,10 → 2294,11
</EditBox>
</Frames>
</Frame>
<Frame name="PowaBarConfigFrameEditor4"
<!-- Fourth Configuration Tab Panel (Timer)-->
<Frame name="PowaBarConfigFrameEditor4"
hidden="true">
<Size>
<AbsDimension x="310"
<AbsDimension x="350"
y="260" />
</Size>
<Anchors>
2543,6 → 2585,210
 
</Frames>
</Frame>
 
<!-- Fith Configuration Tab Panel (Stacks)-->
<Frame name="PowaBarConfigFrameEditor6"
hidden="true">
<Size>
<AbsDimension x="350"
y="260" />
</Size>
<Anchors>
<Anchor point="TOP"
relativeTo="PowaBarConfigFrameEditor"
relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0"
y="-25" />
</Offset>
</Anchor>
</Anchors>
<Backdrop bgFile="Dungeons\Textures\rock\BM_BRSPIRE_CUBEROCK01"
edgeFile="Interface\Tooltips\UI-Tooltip-Border"
tile="true">
<EdgeSize>
<AbsValue val="12" />
</EdgeSize>
<TileSize>
<AbsValue val="128" />
</TileSize>
<BackgroundInsets>
<AbsInset left="2"
right="2"
top="2"
bottom="2" />
</BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad>self:SetBackdropBorderColor(0.0, 0.0, 0.0); self:SetBackdropColor(0.1, 0.1, 0.1);</OnLoad>
</Scripts>
<Frames>
<CheckButton name="PowaShowStacksButton"
inherits="PowaCheckTemplate">
<Size>
<AbsDimension x="25"
y="25" />
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaBarConfigFrameEditor6"
relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="10"
y="-5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self.tooltipText = PowaAuras.Text.aideShowStacks;
getglobal("PowaShowStacksButtonText"):SetText(PowaAuras.Text.nomCheckShowStacks);
getglobal("PowaShowStacksButtonText"):SetTextColor(0.2,1.0,0.2);
</OnLoad>
<OnClick>PowaAuras:ShowStacksChecked(self);</OnClick>
</Scripts>
</CheckButton>
<Slider name="PowaStacksCoordXSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="130"
y="16" />
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaBarConfigFrameEditor6"
relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="10"
y="-42" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(-150,150); self:SetValue(0); self:SetValueStep(5);
getglobal("PowaStacksCoordXSliderText"):SetText(PowaAuras.Text.nomPos.." X : 0");
getglobal("PowaStacksCoordXSliderLow"):SetText("-150");
getglobal("PowaStacksCoordXSliderHigh"):SetText("150");
</OnLoad>
<OnValueChanged>PowaAuras:StacksCoordXSliderChanged();</OnValueChanged>
<OnMouseUp>
self:SetMinMaxValues(self:GetValue()-100,self:GetValue()+100);
getglobal("PowaStacksCoordXSliderLow"):SetText(self:GetValue()-100);
getglobal("PowaStacksCoordXSliderHigh"):SetText(self:GetValue()+100);
</OnMouseUp>
</Scripts>
</Slider>
<Slider name="PowaStacksCoordSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="130"
y="16" />
</Size>
<Anchors>
<Anchor point="LEFT"
relativeTo="PowaStacksCoordXSlider"
relativePoint="RIGHT">
<Offset>
<AbsDimension x="10"
y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(-200,100); self:SetValue(0); self:SetValueStep(5);
getglobal("PowaStacksCoordSliderText"):SetText(PowaAuras.Text.nomPos.." Y : 0");
getglobal("PowaStacksCoordSliderLow"):SetText("-200");
getglobal("PowaStacksCoordSliderHigh"):SetText("100");
</OnLoad>
<OnValueChanged>PowaAuras:StacksCoordSliderChanged();</OnValueChanged>
<OnMouseUp>
self:SetMinMaxValues(self:GetValue()-100,self:GetValue()+100);
getglobal("PowaStacksCoordSliderLow"):SetText(self:GetValue()-100);
getglobal("PowaStacksCoordSliderHigh"):SetText(self:GetValue()+100);
</OnMouseUp>
</Scripts>
</Slider>
<Slider name="PowaStacksSizeSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="130"
y="16" />
</Size>
<Anchors>
<Anchor point="TOP"
relativeTo="PowaStacksCoordXSlider"
relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0"
y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(0.5,2.0); self:SetValue(1.0); self:SetValueStep(0.05);
getglobal("PowaStacksSizeSliderText"):SetText(PowaAuras.Text.nomTaille.." : 1.0");
getglobal("PowaStacksSizeSliderLow"):SetText("0.5");
getglobal("PowaStacksSizeSliderHigh"):SetText("2.0");
</OnLoad>
<OnValueChanged>PowaAuras:StacksSizeSliderChanged();</OnValueChanged>
</Scripts>
</Slider>
<Slider name="PowaStacksAlphaSlider"
inherits="PowaBarSliderTemplate">
<Size>
<AbsDimension x="130"
y="16" />
</Size>
<Anchors>
<Anchor point="TOP"
relativeTo="PowaStacksCoordSlider"
relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0"
y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:SetMinMaxValues(0.1,1.0); self:SetValue(1.0); self:SetValueStep(0.05);
getglobal("PowaStacksAlphaSliderText"):SetText(PowaAuras.Text.nomAlpha.." : 1.0");
getglobal("PowaStacksAlphaSliderLow"):SetText("0.1");
getglobal("PowaStacksAlphaSliderHigh"):SetText("1.0");
</OnLoad>
<OnValueChanged>PowaAuras:StacksAlphaSliderChanged();</OnValueChanged>
</Scripts>
</Slider>
 
<CheckButton name="PowaBuffStacksTransparentButton"
inherits="PowaCheckTemplate">
<Size>
<AbsDimension x="25"
y="25" />
</Size>
<Anchors>
<Anchor point="TOPLEFT"
relativeTo="PowaStacksSizeSlider"
relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0"
y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>getglobal("PowaBuffStacksTransparentButtonText"):SetText(PowaAuras.Text.nomTransparent);</OnLoad>
<OnClick>PowaAuras:StacksChecked(self, "Transparent");</OnClick>
</Scripts>
</CheckButton>
 
</Frames>
</Frame>
 
 
<Button name="PowaEditorTab2"
inherits="TabButtonTemplate">
<Anchors>
2561,10 → 2807,12
PanelTemplates_DeselectTab(PowaEditorTab1);
PanelTemplates_DeselectTab(PowaEditorTab3);
PanelTemplates_DeselectTab(PowaEditorTab4);
PanelTemplates_DeselectTab(PowaEditorTab5);
getglobal("PowaBarConfigFrameEditor2"):Show();
getglobal("PowaBarConfigFrameEditor3"):Hide();
getglobal("PowaBarConfigFrameEditor4"):Hide();
getglobal("PowaBarConfigFrameEditor5"):Hide();
getglobal("PowaBarConfigFrameEditor6"):Hide();
PlaySound("igCharacterInfoTab");
</OnClick>
<OnLoad>
2592,10 → 2840,12
PanelTemplates_DeselectTab(PowaEditorTab2);
PanelTemplates_DeselectTab(PowaEditorTab3);
PanelTemplates_DeselectTab(PowaEditorTab4);
PanelTemplates_DeselectTab(PowaEditorTab5);
getglobal("PowaBarConfigFrameEditor2"):Hide();
getglobal("PowaBarConfigFrameEditor3"):Show();
getglobal("PowaBarConfigFrameEditor4"):Hide();
getglobal("PowaBarConfigFrameEditor5"):Hide();
getglobal("PowaBarConfigFrameEditor6"):Hide();
PlaySound("igCharacterInfoTab");
</OnClick>
<OnLoad>
2624,10 → 2874,12
PanelTemplates_DeselectTab(PowaEditorTab1);
PanelTemplates_DeselectTab(PowaEditorTab2);
PanelTemplates_DeselectTab(PowaEditorTab3);
PanelTemplates_DeselectTab(PowaEditorTab5);
getglobal("PowaBarConfigFrameEditor5"):Show();
getglobal("PowaBarConfigFrameEditor2"):Hide();
getglobal("PowaBarConfigFrameEditor3"):Hide();
getglobal("PowaBarConfigFrameEditor4"):Hide();
getglobal("PowaBarConfigFrameEditor6"):Hide();
PlaySound("igCharacterInfoTab");
</OnClick>
<OnLoad>
2656,10 → 2908,12
PanelTemplates_DeselectTab(PowaEditorTab1);
PanelTemplates_DeselectTab(PowaEditorTab2);
PanelTemplates_DeselectTab(PowaEditorTab4);
PanelTemplates_DeselectTab(PowaEditorTab5);
getglobal("PowaBarConfigFrameEditor4"):Show();
getglobal("PowaBarConfigFrameEditor2"):Hide();
getglobal("PowaBarConfigFrameEditor3"):Hide();
getglobal("PowaBarConfigFrameEditor5"):Hide();
getglobal("PowaBarConfigFrameEditor6"):Hide();
PowaAuras:UpdateTimerOptions();
PlaySound("igCharacterInfoTab");
</OnClick>
2671,6 → 2925,41
</OnLoad>
</Scripts>
</Button>
<Button name="PowaEditorTab5"
inherits="TabButtonTemplate">
<Anchors>
<Anchor point="LEFT"
relativePoint="RIGHT"
relativeTo="PowaEditorTab3">
<Offset>
<AbsDimension x="0"
y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PanelTemplates_SelectTab(self);
PanelTemplates_DeselectTab(PowaEditorTab1);
PanelTemplates_DeselectTab(PowaEditorTab2);
PanelTemplates_DeselectTab(PowaEditorTab3);
PanelTemplates_DeselectTab(PowaEditorTab4);
getglobal("PowaBarConfigFrameEditor6"):Show();
getglobal("PowaBarConfigFrameEditor2"):Hide();
getglobal("PowaBarConfigFrameEditor3"):Hide();
getglobal("PowaBarConfigFrameEditor4"):Hide();
getglobal("PowaBarConfigFrameEditor5"):Hide();
PowaAuras:UpdateStacksOptions();
PlaySound("igCharacterInfoTab");
</OnClick>
<OnLoad>
getglobal("PowaEditorTab5Text"):SetText(PowaAuras.Text.nomTabStacks);
PanelTemplates_DeselectTab(self);
PanelTemplates_TabResize(self, 0);
getglobal(self:GetName().."HighlightTexture"):SetWidth(self:GetTextWidth() + 31);
</OnLoad>
</Scripts>
</Button>
</Frames>
</Frame>
</Frames>
trunk/PowerAuras/PowerOptions.lua
12,12 → 12,12
getglobal("PowaMainTestButton"):SetText(self.Text.nomTest);
getglobal("PowaEditButton"):SetText(self.Text.nomEdit);
getglobal("PowaOptionsRename"):SetText(self.Text.nomRename);
if (self.Misc.disabled) then
if (PowaMisc.disabled) then
getglobal("PowaEnableButton"):SetChecked(false);
else
getglobal("PowaEnableButton"):SetChecked(true);
end
if (self.Misc.debug) then
if (PowaMisc.debug) then
getglobal("PowaDebugButton"):SetChecked(true);
else
getglobal("PowaDebugButton"):SetChecked(false);
106,6 → 106,7
return;
elseif (aura.Showing) then -- deja visible, on la cache
aura.HideRequest = true;
if (aura.Timer) then aura.Timer.HideRequest = true; end
getglobal("PowaIcone"..iconeID):SetAlpha(0.33);
else -- pas visible alors on affiche
self:DisplayAura(auraId);
359,19 → 360,23
 
if (not IsControlKeyDown()) then return; end
 
self.Auras[auraId]:Hide();
local aura = self.Auras[auraId];
aura:Hide();
 
self.Auras[auraId] = nil;
if (auraId > 120) then
PowaGlobalSet[auraId] = nil;
end
self:DeleteTimerFrames(auraId);
if (aura.Timer) then aura.Timer:Delete(); end
if (aura.Stacks) then aura.Stacks:Delete(); end
 
self.Frames[auraId] = nil;
self.Textures[auraId] = nil;
self.SecondaryAuras[auraId] = nil;
self.SecondaryFrames[auraId] = nil;
self.SecondaryTextures[auraId] = nil;
 
self.Auras[auraId] = nil;
if (auraId > 120) then
PowaGlobalSet[auraId] = nil;
end
 
getglobal("PowaSelected"):Hide();
 
if (getglobal("PowaBarConfigFrame"):IsVisible()) then
583,6 → 588,7
-- cache tous les effets en test
for _, aura in pairs(self.Auras) do
aura.HideRequest = true;
if (aura.Timer and aura.CooldownAura) then aura.Timer.HideRequest = false; end
end
 
self:CreateEffectLists();
590,23 → 596,6
self:NewCheckBuffs();
self:MemorizeActions();
end
 
function PowaAuras:EnableChecked()
if (getglobal("PowaEnableButton"):GetChecked()) then
self:Toggle(true);
else
self:MainOptionClose();
self:Toggle(false);
end
end
 
function PowaAuras:DebugChecked()
if (getglobal("PowaDebugButton"):GetChecked()) then
self.Misc.debug = true;
else
self.Misc.debug = false;
end
end
-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< MAIN OPTIONS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
640,6 → 629,32
end
end
 
function PowaAuras:UpdateStacksOptions()
 
local stacks = self.Auras[self.CurrentAuraId].Stacks;
if (stacks) then
 
getglobal("PowaShowStacksButton"):SetChecked(stacks.enabled);
 
getglobal("PowaStacksAlphaSlider"):SetValue(stacks.a);
getglobal("PowaStacksSizeSlider"):SetValue(stacks.h);
-- ajuste slider Y
getglobal("PowaStacksCoordSlider"):SetMinMaxValues(stacks.y-5000,stacks.y+5000);
getglobal("PowaStacksCoordSliderLow"):SetText(stacks.y-100);
getglobal("PowaStacksCoordSliderHigh"):SetText(stacks.y+100);
getglobal("PowaStacksCoordSlider"):SetValue(stacks.y);
getglobal("PowaStacksCoordSlider"):SetMinMaxValues(stacks.y-100,stacks.y+100);
-- ajuste slider X
getglobal("PowaStacksCoordXSlider"):SetMinMaxValues(stacks.x-5000,stacks.x+5000);
getglobal("PowaStacksCoordXSliderLow"):SetText(stacks.x-100);
getglobal("PowaStacksCoordXSliderHigh"):SetText(stacks.x+100);
getglobal("PowaStacksCoordXSlider"):SetValue(stacks.x);
getglobal("PowaStacksCoordXSlider"):SetMinMaxValues(stacks.x-100,stacks.x+100);
 
getglobal("PowaBuffStacksTransparentButton"):SetChecked(stacks.Transparent);
end
end
 
function PowaAuras:InitPage()
 
--self:Message("InitPage ", self.CurrentAuraId);
712,14 → 727,8
getglobal("PowaInCombatButton"):SetChecked(false);
end
 
-- inverse, target and timer
if ((aura.inverse) and not (aura.bufftype == self.BuffTypes.ActionReady or aura.bufftype == self.BuffTypes.OwnSpell)) then
aura.Timer.enabled = false;
PowaEditorTab3:Hide();
else
PowaEditorTab3:Show();
end
 
aura:HideShowTabs();
 
--self:Message("bufftype ", aura.bufftype);
 
-- Dropdown selection alias buffs type. variable self.Auras[int].bufftype
766,9 → 775,6
getglobal("PowaTimerDurationSlider"):Hide();
end
 
if (aura.inverse == false) then
PowaEditorTab3:Show();
end
getglobal("PowaTargetButtonText"):SetTextColor(1.0,0.2,0.2);
getglobal("PowaTargetFriendButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaPartyButtonText"):SetTextColor(0.2,1.0,0.2);
819,7 → 825,7
else
getglobal("PowaTimerDurationSlider"):Hide();
end
if (aura.inverse == false) then PowaEditorTab3:Show(); end
 
getglobal("PowaTargetButtonText"):SetTextColor(1.0,0.2,0.2);
getglobal("PowaTargetFriendButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaPartyButtonText"):SetTextColor(0.2,1.0,0.2);
866,7 → 872,6
else
getglobal("PowaTimerDurationSlider"):Hide();
end
if (aura.inverse == false) then PowaEditorTab3:Show(); end
getglobal("PowaTargetButtonText"):SetTextColor(1.0,0.2,0.2);
getglobal("PowaTargetFriendButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaPartyButtonText"):SetTextColor(0.2,1.0,0.2);
896,7 → 901,6
getglobal("PowaBarThresholdSlider"):Hide();
getglobal("PowaThresholdInvertButton"):Hide();
getglobal("PowaDropDownStance"):Hide();
PowaEditorTab3:Hide();
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaTargetButton");
self:DisableCheckBox("PowaTargetFriendButton");
913,7 → 917,6
getglobal("PowaGroupAnyButton"):SetChecked(false);
self:DisableCheckBox("PowaGroupAnyButton");
-- -------
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.Enchant) then -- ENCHANT
getglobal("PowaBarBuffName").aide = self.Text.aideBuff5;
933,6 → 936,7
self:EnableCheckBox("PowaIsInRaidButton");
self:EnableCheckBox("PowaRestingButton");
self:EnableCheckBox("PowaIsMountedButton");
self:EnableCheckBox("PowaOwntexButton");
-- disabled
getglobal("PowaBarThresholdSlider"):Hide();
getglobal("PowaThresholdInvertButton"):Hide();
947,15 → 951,12
self:DisableCheckBox("PowaGroupOrSelfButton");
self:DisableCheckBox("PowaOptunitnButton");
self:DisableCheckBox("PowaGCDButton");
self:DisableCheckBox("PowaOwntexButton");
getglobal("PowaMineButton"):SetChecked(false);
self:DisableCheckBox("PowaMineButton");
getglobal("PowaGroupAnyButton"):SetChecked(false);
self:DisableCheckBox("PowaGroupAnyButton");
-- --------
 
if (aura.inverse == false) then PowaEditorTab3:Show(); end
 
 
elseif (aura.bufftype == self.BuffTypes.Combo) then -- COMBOS
getglobal("PowaBarBuffName").aide = self.Text.aideBuff6;
getglobal("PowaExactButton").aide = self.Text.aideExact6;
976,7 → 977,6
getglobal("PowaThresholdInvertButton"):Hide();
getglobal("PowaDropDownStance"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaTargetButton");
self:DisableCheckBox("PowaTargetFriendButton");
992,9 → 992,7
self:DisableCheckBox("PowaMineButton");
getglobal("PowaGroupAnyButton"):SetChecked(false);
self:DisableCheckBox("PowaGroupAnyButton");
-- --------
aura.Timer.enabled = false;
 
-- --------
elseif (aura.bufftype == self.BuffTypes.ActionReady) then -- ACTION READY
getglobal("PowaBarBuffName").aide = self.Text.aideBuff7;
getglobal("PowaExactButton").aide = self.Text.aideExact7;
1015,10 → 1013,6
self:EnableCheckBox("PowaIsMountedButton");
self:EnableCheckBox("PowaOwntexButton");
 
if (aura.inverse == true) then
PowaEditorTab3:Show();
end
 
-- disabled
getglobal("PowaBarThresholdSlider"):Hide();
getglobal("PowaThresholdInvertButton"):Hide();
1036,8 → 1030,7
self:DisableCheckBox("PowaMineButton");
getglobal("PowaGroupAnyButton"):SetChecked(false);
self:DisableCheckBox("PowaGroupAnyButton");
-- -------
 
-- -------
elseif (aura.bufftype == self.BuffTypes.Health) then -- HEALTH
getglobal("PowaDropDownBuffTypeText"):SetText(self.Text.nomCheckHealth);
-- enabled
1057,7 → 1050,6
-- disabled
getglobal("PowaDropDownStance"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
self:DisableTextfield("PowaBarBuffName");
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaExactButton");
1077,8 → 1069,6
getglobal("PowaRaidButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaOptunitnButtonText"):SetTextColor(0.2,1.0,0.2);
 
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.Mana) then -- Mana
getglobal("PowaDropDownBuffTypeText"):SetText(self.Text.nomCheckMana);
-- enabled
1098,7 → 1088,6
-- disabled
getglobal("PowaDropDownStance"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
self:DisableTextfield("PowaBarBuffName");
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaExactButton");
1117,7 → 1106,6
getglobal("PowaFocusButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaRaidButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaOptunitnButtonText"):SetTextColor(0.2,1.0,0.2);
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.EnergyRagePower) then -- Rage/Energy/RunicPower
getglobal("PowaDropDownBuffTypeText"):SetText(self.Text.nomCheckRageEnergy);
1138,7 → 1126,6
-- disabled
getglobal("PowaDropDownStance"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
self:DisableTextfield("PowaBarBuffName");
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaExactButton");
1157,7 → 1144,6
getglobal("PowaFocusButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaRaidButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaOptunitnButtonText"):SetTextColor(0.2,1.0,0.2);
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.Aggro) then -- Aggro
getglobal("PowaDropDownBuffTypeText"):SetText(self.Text.nomCheckAggro);
1175,7 → 1161,6
getglobal("PowaThresholdInvertButton"):Hide();
getglobal("PowaDropDownStance"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
self:DisableTextfield("PowaBarBuffName");
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaTargetButton");
1194,7 → 1179,6
getglobal("PowaPartyButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaGroupOrSelfButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaRaidButtonText"):SetTextColor(0.2,1.0,0.2);
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.PvP) then -- PvP Flag
getglobal("PowaDropDownBuffTypeText"):SetText(self.Text.nomCheckPvP);
1213,7 → 1197,6
getglobal("PowaBarThresholdSlider"):Hide();
getglobal("PowaThresholdInvertButton"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
self:DisableTextfield("PowaBarBuffName");
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaExactButton");
1233,7 → 1216,6
getglobal("PowaPartyButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaGroupOrSelfButtonText"):SetTextColor(0.2,1.0,0.2);
getglobal("PowaRaidButtonText"):SetTextColor(0.2,1.0,0.2);
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.SpellAlert) then -- SPELL ALERT
getglobal("PowaBarBuffName").aide = self.Text.aideSpells;
1267,9 → 1249,6
getglobal("PowaGroupAnyButton"):SetChecked(false);
self:DisableCheckBox("PowaGroupAnyButton");
-- --------
if (aura.inverse == false) then
PowaEditorTab3:Show();
end
getglobal("PowaTargetButtonText"):SetTextColor(1.0,0.2,0.2);
getglobal("PowaFocusButtonText"):SetTextColor(0.2,1.0,0.2);
 
1293,7 → 1272,6
getglobal("PowaBarThresholdSlider"):Hide();
getglobal("PowaThresholdInvertButton"):Hide();
getglobal("PowaBarTooltipCheck"):Hide();
PowaEditorTab3:Hide();
self:DisableTextfield("PowaBarBuffName");
getglobal("PowaBarBuffStacks"):Hide();
self:DisableCheckBox("PowaTargetButton");
1321,7 → 1299,6
getglobal("PowaGroupAnyButton"):SetChecked(false);
self:DisableCheckBox("PowaGroupAnyButton");
-- --------
aura.Timer.enabled = false;
 
elseif (aura.bufftype == self.BuffTypes.OwnSpell) then -- One of my spells
getglobal("PowaBarBuffName").aide = self.Text.aideBuff8;
1356,9 → 1333,6
-- --------
getglobal("PowaTimerDurationSlider"):Show();
 
if (aura.inverse == true) then
PowaEditorTab3:Show();
end
getglobal("PowaTargetButtonText"):SetTextColor(0.3,0.3,0.3);
getglobal("PowaTargetFriendButtonText"):SetTextColor(0.3,0.3,0.3);
getglobal("PowaPartyButtonText"):SetTextColor(0.3,0.3,0.3);
1531,11 → 1505,20
 
getglobal("PowaBarAuraTextureSliderText"):SetText(self.Text.nomTexture.." : "..SliderValue);
getglobal("AuraTexture"):SetVertexColor(self.Auras[auraId].r,self.Auras[auraId].g,self.Auras[auraId].b);
 
 
PowaBarAuraTextureEdit:SetText(SliderValue);
 
self.Auras[auraId].texture = SliderValue;
self:RedisplayAura();
end
 
function PowaAuras:TextAuraTextureChanged()
local thisText = getglobal("PowaBarAuraTextureEdit"):GetText();
local thisNumber = tonumber(thisText);
getglobal("PowaBarAuraTextureSlider"):SetValue(thisNumber or 0);
end
 
 
function PowaAuras:BarAuraAlphaSliderChanged()
if (self.Initialising) then return; end
local SliderValue = getglobal("PowaBarAuraAlphaSlider"):GetValue();
1783,17 → 1766,10
local aura = self.Auras[self.CurrentAuraId];
if (getglobal("PowaInverseButton"):GetChecked()) then
aura.inverse = true;
if (aura.bufftype == self.BuffTypes.OwnSpell or aura.bufftype == self.BuffTypes.ActionReady) then
PowaEditorTab3:Show();
end
else
aura.inverse = false;
if (aura.bufftype == self.BuffTypes.OwnSpell or aura.bufftype == self.BuffTypes.ActionReady) then
PowaEditorTab3:Hide();
aura.Timer.enabled = false;
self:DeleteTimerFrames(aura.id);
end
end
aura:HideShowTabs();
end
 
function PowaAuras:IgnoreMajChecked()
2486,8 → 2462,8
return;
end
local aura = self.Auras[self.CurrentAuraId];
if (aura) then --- ouvre seulement si l'effet existe
if (aura.Timer.enabled) then
if (aura) then
if (aura.Timer and aura.Timer.enabled) then
self:CreateTimerFrameIfMissing(aura.id);
end
self:InitPage();
2540,7 → 2516,7
 
local stackOpts = self.Auras[auraId].Stacks;
 
local frame1 = self.StacksFrame[auraId];
local frame = self.StacksFrames[auraId];
frame:SetAlpha(stackOpts.a);
frame:SetWidth(20 * stackOpts.h);
frame:SetHeight(20 * stackOpts.h);
2554,8 → 2530,7
self:CreateTimerFrameIfMissing(self.CurrentAuraId);
else
self.Auras[self.CurrentAuraId].Timer.enabled = false;
self:HideTimerFrames(self.CurrentAuraId);
self.TimerFrame[self.CurrentAuraId] = nil;
self.Auras[self.CurrentAuraId].Timer:Delete();
end
end
 
2620,7 → 2595,7
else
self.Auras[self.CurrentAuraId].Timer[setting] = false;
end
self:HideTimerFrames(self.CurrentAuraId);
self:HideTimerFrames(self.Auras[self.CurrentAuraId]);
self.TimerFrame[self.CurrentAuraId] = nil;
self:CreateTimerFrameIfMissing(self.CurrentAuraId);
end
2632,11 → 2607,79
else
self.Auras[self.CurrentAuraId].Timer.Transparent = false;
end
self:HideTimerFrames(self.CurrentAuraId);
self.TimerFrame[self.CurrentAuraId] = nil;
self.Auras[self.CurrentAuraId].Timer:Delete();
self:CreateTimerFrameIfMissing(self.CurrentAuraId);
end
 
------ Stacks ----
 
function PowaAuras:ShowStacksChecked(control)
if (self.Initialising) then return; end
if (control:GetChecked()) then
self.Auras[self.CurrentAuraId].Stacks.enabled = true;
self:CreateStacksFrameIfMissing(self.CurrentAuraId);
else
self.Auras[self.CurrentAuraId].Stacks.enabled = false;
self.Auras[self.CurrentAuraId].Stacks:Delete();
end
end
 
function PowaAuras:StacksAlphaSliderChanged()
local SliderValue = getglobal("PowaStacksAlphaSlider"):GetValue();
 
if (self.Initialising) then return; end -- desactived
 
getglobal("PowaStacksAlphaSliderText"):SetText(self.Text.nomAlpha.." : "..format("%.2f", SliderValue) );
 
self.Auras[self.CurrentAuraId].Stacks.a = SliderValue;
self:CreateStacksFrameIfMissing(self.CurrentAuraId);
end
 
function PowaAuras:StacksSizeSliderChanged()
local SliderValue = getglobal("PowaStacksSizeSlider"):GetValue();
 
if (self.Initialising) then return; end -- desactived
 
getglobal("PowaStacksSizeSliderText"):SetText(self.Text.nomTaille.." : "..format("%.2f", SliderValue) );
 
self.Auras[self.CurrentAuraId].Stacks.h = SliderValue;
self:CreateStacksFrameIfMissing(self.CurrentAuraId);
end
 
function PowaAuras:StacksCoordSliderChanged()
local SliderValue = getglobal("PowaStacksCoordSlider"):GetValue();
 
if (self.Initialising) then return; end -- desactived
 
getglobal("PowaStacksCoordSliderText"):SetText(self.Text.nomPos.." Y : "..SliderValue);
 
self.Auras[self.CurrentAuraId].Stacks.y = SliderValue;
self:CreateStacksFrameIfMissing(self.CurrentAuraId);
end
 
function PowaAuras:StacksCoordXSliderChanged()
local SliderValue = getglobal("PowaStacksCoordXSlider"):GetValue();
 
if (self.Initialising) then return; end -- desactived
 
getglobal("PowaStacksCoordXSliderText"):SetText(self.Text.nomPos.." X : "..SliderValue);
 
self.Auras[self.CurrentAuraId].Stacks.x = SliderValue;
self:CreateStacksFrameIfMissing(self.CurrentAuraId);
end
 
 
function PowaAuras:StacksChecked(control, setting)
if (self.Initialising) then return; end
if (control:GetChecked()) then
self.Auras[self.CurrentAuraId].Stacks[setting] = true;
else
self.Auras[self.CurrentAuraId].Stacks[setting] = false;
end
self.Auras[self.CurrentAuraId].Stacks:Delete();
self:CreateStacksFrameIfMissing(self.CurrentAuraId);
end
 
-- ----------------------------------------------------------- LIGNE DE COMMANDE
 
function PowaAuras_CommanLine(msg)
2687,3 → 2730,73
getglobal(checkBox):Enable();
getglobal(checkBox.."Text"):SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
end
 
---- Blizzard Addon -----
 
 
function PowaAuras:EnableChecked()
if (PowaEnableButton:GetChecked()) then
self:Toggle(true);
else
self:MainOptionClose();
self:Toggle(false);
end
end
 
function PowaAuras:DebugChecked()
if (PowaDebugButton:GetChecked()) then
PowaMisc.debug = true;
else
PowaMisc.debug = false;
end
end
 
function PowaAuras:OptionsOK()
PowaMisc.OnUpdateLimit = (100 - PowaOptionsUpdateSlider2:GetValue()) / 200;
PowaMisc.AnimationLimit = (100 - PowaOptionsAnimationsSlider2:GetValue()) / 1000;
PowaAuras:EnableChecked();
PowaAuras:DebugChecked();
end
 
function PowaAuras:OptionsCancel()
PowaOptionsCpuFrame2_OnShow();
end
 
function PowaAuras:OptionsDefault()
PowaMisc.OnUpdateLimit = 0;
PowaMisc.AnimationLimit = 0;
PowaMisc.disabled = false;
PowaMisc.debug = false;
PowaOptionsCpuFrame2_OnShow();
end
 
function PowaOptionsCpuFrame2_OnLoad(panel)
panel.name = "Power Auras Classic";
panel.okay = function (self) PowaAuras.OptionsOK(); end;
panel.cancel = function (self) PowaAuras:OptionsCancel(); end;
panel.default = function (self) PowaAuras.OptionsDefault(); end;
InterfaceOptions_AddCategory(panel);
end
 
function PowaOptionsCpuFrame2_OnShow()
if (PowaAuras.Initialising) then return; end
--PowaAuras:Message("PowaOptionsCpuFrame2_OnShow");
--PowaAuras:Message("OnUpdateLimit=", PowaMisc.OnUpdateLimit);
--PowaAuras:Message("AnimationLimit=", PowaMisc.AnimationLimit);
--PowaAuras:Message("disabled=", PowaMisc.disabled ~= false);
--PowaAuras:Message("debug=", PowaMisc.debug);
PowaOptionsUpdateSlider2:SetValue(100-200*PowaMisc.OnUpdateLimit);
PowaOptionsAnimationsSlider2:SetValue(100-1000*PowaMisc.AnimationLimit);
PowaEnableButton:SetChecked(PowaMisc.disabled ~= true);
PowaDebugButton:SetChecked(PowaMisc.debug);
end
 
function PowaAuras:PowaOptionsUpdateSliderChanged2(control)
if (self.Initialising) then return; end
getglobal("PowaOptionsUpdateSlider2Text"):SetText(self.Text.nomUpdateSpeed.." : "..control:GetValue().."%");
end
 
function PowaAuras:PowaOptionsAnimationsSliderChanged2(control)
if (self.Initialising) then return; end
getglobal("PowaOptionsAnimationsSlider2Text"):SetText(self.Text.nomSpeed.." : "..control:GetValue().."%");
end
trunk/PowerAuras/PowerAurasAnimations.lua
205,23 → 205,24
cPowaAnimationBeginBounce = PowaClass(cPowaAnimationBaseTranslate, {OffsetX=0, OffsetY=100, MinVelocity=100, Acceleration=1000});
function cPowaAnimationBeginBounce:Initialise()
self.Velocity = 0;
self.Acceleration = self.Acceleration * self.Aura.speed;
self:InitialiseBase();
--PowaAuras:Message("Bounce Init v=", self.Velocity, " Y=", self.Y);
end
function cPowaAnimationBeginBounce:Update(elapsed)
PowaAuras:UnitTestInfo("BeginBounce Update ", elapsed);
 
self.Alpha = math.max(self.TargetAlpha + elapsed * 2 * self.Aura.speed * self.TargetAlpha , self.TargetAlpha);
 
self.Velocity = self.Velocity + self.Acceleration * elapsed;
self.Velocity = math.max(math.min(self.Velocity + self.Acceleration * self.Aura.speed * elapsed, 1000), -1000);
 
self.Y = self.Y - elapsed * (self.Velocity + self.Acceleration * elapsed / 2);
self.Y = self.Y - elapsed * (self.Velocity + self.Acceleration * self.Aura.speed * elapsed / 2);
 
local result = false;
if (self.Y <= self.TargetY and self.Velocity>0) then
self.Y = self.TargetY;
self.Alpha = self.TargetAlpha;
if (self.Velocity <= self.MinVelocity) then
self.Velocity = 0;
result = true;
else
self.Velocity = -self.Velocity * 0.9;
372,67 → 373,55
self:UpdateFrame();
end
 
--[[
cPowaAnimationWaterDrop = PowaClass(cPowaAnimationBase);
 
cPowaAnimationWaterDrop = PowaClass(cPowaAnimationBaseTranslate, {OffsetX=0, OffsetY=0});
function cPowaAnimationWaterDrop:Initialise()
self.Alpha = self.Frame:GetAlpha();
self.Width = self.Frame:GetWidth();
self.Height = self.Frame:GetHeight();
self.Alpha = self.Frame:GetAlpha();
self.TargetX = self.Aura.x;
self.TargetY = self.Aura.y;
self.X = self.TargetX;
self.Y = self.TargetY;
self.Status = 0;
end
function cPowaAnimationWaterDrop:Update(elapsed)
PowaAuras:UnitTestInfo("cPowaAnimationWaterDrop Update ", elapsed);
 
if (self.Alpha>0) then
self.Alpha = math.max(self.Alpha - self.TargetAlpha * elapsed * 0.5 * self.Aura.speed, 0);
local newWidth = self.Width + self.Aura.size * elapsed * 100 * self.Aura.speed;
if (newWidth * 1.5 > self.Width) then
self.Width = newWidth;
self.Height = self.Height + self.Aura.size * elapsed * 100 * self.Aura.speed;
end
else
 
self.Alpha = self.Alpha - elapsed * self.TargetAlpha * 0.5 * self.Aura.speed;
if (self.Alpha <= 0) then
self.Alpha = self.TargetAlpha;
self.Width = self.TargetWidth * 0.85;
self.Height = self.TargetHeight * 0.85;
local deltaX = (random(0,20) - 10) * self.Aura.speed;;
local deltaY = (random(0,20) - 10) * self.Aura.speed;;
frame:SetPoint("Center",self.Aura.x + deltaX, self.Aura.y + deltaY);
self.X = self.TargetX + (random(0,20) - 10) * self.Aura.speed
self.Y = self.TargetY + (random(0,20) - 10) * self.Aura.speed
else
local width = self.Width + elapsed * 100 * self.Aura.speed * self.Aura.size;
if ( (width * 1.5) > self.Width) then --- evite les lags
self.Width = width;
self.Height = self.Height + elapsed * 100 * self.Aura.speed * self.Aura.size;
end
end
 
self:UpdateFrame();
end
 
 
if (frame:GetAlpha() > 0) then
self.curScale.a = frame:GetAlpha() - (elapsed * aura.alpha * 0.5 * aura.speed);
if (self.curScale.a < 0) then frame:SetAlpha(0.0);
else frame:SetAlpha(self.curScale.a); end
self.maxScale.w = frame:GetWidth() + (elapsed * 100 * aura.speed * aura.size);
self.maxScale.h = frame:GetHeight() + (elapsed * 100 * aura.speed * aura.size);
if ( (self.maxScale.w * 1.5) > frame:GetWidth()) then --- evite les lags
frame:SetWidth(self.maxScale.w)
frame:SetHeight(self.maxScale.h)
end
else
self.maxScale.w = (random(0,20) - 10) * aura.speed;
self.maxScale.h = (random(0,20) - 10) * aura.speed;
frame:SetAlpha(aura.alpha);
frame:SetWidth(self.curScale.w * 0.85);
frame:SetHeight(self.curScale.h * 0.85);
frame:SetPoint("Center",aura.x + self.maxScale.w, aura.y + self.maxScale.h);
end
]]
 
cPowaAnimationElectric = PowaClass(cPowaAnimationBaseTranslate, {OffsetX=0, OffsetY=0});
function cPowaAnimationElectric:Initialise()
self.Alpha = self.Frame:GetAlpha();
self.Width = self.Frame:GetWidth();
self.Height = self.Frame:GetHeight();
self.TargetX = self.Aura.x;
self.TargetY = self.Aura.y;
self.X = self.TargetX;
self.Y = self.TargetY;
self.Status = 0;
end
function cPowaAnimationElectric:Update(elapsed)
PowaAuras:UnitTestInfo("cPowaAnimationElectric Update ", elapsed);
 
if (self.Status ~=1) then
if (random( 210-(self.Aura.speed*100) ) == 1) then
if (self.Status == 0) then
if (random( 210 - self.Aura.speed * 100 ) == 1) then
self.X = self.TargetX + random(0,10) - 5;
self.Y = self.TargetY + random(0,10) - 5;
self.Alpha = self.TargetAlpha;
449,6 → 438,150
self:UpdateFrame();
end
 
 
cPowaAnimationShrinking = PowaClass(cPowaAnimationBase);
function cPowaAnimationShrinking:Initialise()
self.Alpha = self.Frame:GetAlpha();
self.Width = self.Frame:GetWidth();
self.Height = self.Frame:GetHeight();
self.MinWidth = self.TargetWidth;
self.MinHeight = self.TargetHeight;
self.MaxWidth = self.TargetWidth * 1.3;
self.MaxHeight = self.TargetHeight * 1.3;
self.Status = 0;
end
function cPowaAnimationShrinking:Update(elapsed)
PowaAuras:UnitTestInfo("cPowaAnimationShrinking Update ", elapsed);
 
if (self.Status == 0) then --- demarre le zoom out (max size)
self.Width = self.MaxWidth;
self.Height = self.MaxHeight;
self.Alpha = 0.0;
self.Status = 2;
elseif (self.Status == 2) then --- zoom out + fade in
local speedScale = 50 * self.Aura.speed * self.Aura.size;
self.Width = self.Width - elapsed * speedScale * self.Aura.torsion;
self.Height = self.Height - elapsed * speedScale * (2-self.Aura.torsion);
self.Alpha = self.TargetAlpha * (self.MaxWidth - self.Width) / (self.MaxWidth - self.MinWidth);
 
if (self.Width <= self.MinWidth) then
self.Width = self.MinWidth;
self.Height = self.MinHeight;
self.Status = 1;
end
elseif (self.Status == 1) then --- demarre le fade-out
self.Width = self.MinWidth;
self.Height = self.MinHeight;
self.Alpha = self.TargetAlpha;
self.Status = 3;
 
elseif (self.Status == 3) then --- fade-out
self.Alpha = self.Alpha - (elapsed / random(1,2));
if (self.Alpha <= 0.0) then
self.Alpha = 0;
self.Status = 0;
end
end
self:UpdateFrame();
end
 
 
 
cPowaAnimationFlame = PowaClass(cPowaAnimationBaseTranslate, {OffsetX=0, OffsetY=0});
function cPowaAnimationFlame:Initialise()
self.Alpha = self.Frame:GetAlpha();
self.Width = self.Frame:GetWidth();
self.Height = self.Frame:GetHeight();
self.TargetX = self.Aura.x;
self.TargetY = self.Aura.y;
self.X = self.TargetX;
self.Y = self.TargetY;
self.Status = 0;
end
function cPowaAnimationFlame:Update(elapsed)
PowaAuras:UnitTestInfo("cPowaAnimationFlame Update ", elapsed);
 
 
if (self.Status < 2) then --- reset to center
self.Width = self.TargetWidth;
self.Height = self.TargetHeight;
self.Alpha = self.TargetAlpha;
self.X = self.TargetX;
self.Y = self.TargetY;
self.Status = 2;
else
local speedScale = 50 * self.Aura.speed * self.Aura.size;
self.X = self.X + random(1,3) - 2;
self.Y = self.Y + elapsed * random(10,20);
self.Alpha = self.Alpha - self.TargetAlpha * elapsed / random(2,4);
self.Width = self.Width - elapsed * speedScale * self.Aura.torsion;
self.Height = self.Height - elapsed * speedScale * (2-self.Aura.torsion);
if (self.Alpha < 0.0) then
self.Alpha = 0;
self.Status = 1;
end
end
 
self:UpdateFrame();
end
 
cPowaAnimationOrbit = PowaClass(cPowaAnimationBaseTranslate, {OffsetX=0, OffsetY=0});
function cPowaAnimationOrbit:Initialise()
self.Alpha = self.Frame:GetAlpha();
self.TargetX = self.Aura.x;
self.TargetY = self.Aura.y;
self.X = self.TargetX;
self.Y = self.TargetY;
self.MaxWidth = math.max(self.TargetX, -self.TargetX, 5) * 1.0;
self.MaxHeight = self.MaxWidth * (1.6 - self.Aura.torsion);
self.Width = self.TargetWidth / self.Aura.torsion;
self.Height = self.TargetHeight / (2-self.Aura.torsion);
self.Angle = 0;
--- annule la symetrie
if self.Aura.textaura ~= true then
local texture = self.Aura:GetTexture();
if (texture) then
texture:SetTexCoord(0, 1, 0, 1);
end
end
end
function cPowaAnimationOrbit:Update(elapsed)
PowaAuras:UnitTestInfo("cPowaAnimationOrbit Update ", elapsed);
 
local speedScale = elapsed * 75 * self.Aura.speed;
 
if (self.Aura.isSecondary and (PowaAuras.Auras[self.Aura.id].anim1 == PowaAuras.AnimationTypes.Orbit)) then
if (self.Aura.symetrie < 2) then
self.Angle = PowaAuras.Auras[self.Aura.id].animation.Angle + 180;
if (self.Angle > 360) then self.Angle = self.Angle - 360; end
else
self.Angle = 180 - PowaAuras.Auras[self.Aura.id].animation.Angle;
if (self.Angle < 0) then self.Angle = self.Angle + 360; end
end
elseif (self.Aura.symetrie == 1 or self.Aura.symetrie == 3) then
self.Angle = self.Angle - speedScale;
if (self.Angle < 0) then self.Angle = 360; end
else
self.Angle = self.Angle + speedScale;
if (self.Angle > 360) then self.Angle = 0; end
end
 
--- transparence
if (self.Angle < 180) then --- zone de transparence
if (self.Angle < 90) then
self.Alpha = self.TargetAlpha * (1-self.Angle/90);
else
self.Alpha = self.TargetAlpha * (self.Angle/90-1);
end
else
self.Alpha = self.TargetAlpha;
end
self.X = self.MaxWidth * cos(self.Angle);
self.Y = self.TargetY + self.MaxHeight * sin(self.Angle);
 
self:UpdateFrame();
end
 
-- Concrete Animation Classes
PowaAuras.AnimationMainClasses = {
[PowaAuras.AnimationTypes.Static] = cPowaAnimationBase,
trunk/PowerAuras/Manual_Pics/Thumbs.db Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/PowerAuras/PowerAurasBase.lua
1,20 → 1,19
PowaAuras = {
Version = "v2.6.2Q";
Version = GetAddOnMetadata("PowerAuras", "Version");
 
CurrentAuraId = 1;
MaxAuras = 360;
ChecksTimer = 0;
NextCheck = 0.2;
Tstep = 0.09765625;
DebugTimer = 0;
NextDebugCheck = 0;
 
DebugTimer = 0;
ChecksTimer = 0;
ThrottleTimer = 0;
AnimationThrottleTimer = 0;
 
Initialising = true;
ModTest = false; --- on test les effets
 
minScale = {a=0, w=0, h=0};
maxScale = {a=0, w=0, h=0};
curScale = {a=0, w=0, h=0};
 
DoResetAoe = false;
ResetTargetTimers = false;
49,7 → 48,7
MainOptionPage = 1;
CurrentAuraPage = 1;
 
maxtextures = 50;
maxtextures = 58;
 
MoveEffect = 0; -- 1 = copie / 2 = move
 
60,7 → 59,7
Textures = {};
SecondaryTextures = {};
TimerFrame = {};
StacksFrame = {};
StacksFrames = {};
 
Sound = {};
BeginAnimDisplay = {};
70,13 → 69,6
 
DebuffCatSpells = {};
 
--- These will be saved out to SavedVariables
Misc =
{
disabled = false,
debug = false,
};
 
playerclass = "unknown",
 
Events =
114,6 → 106,7
"UNIT_SPELLCAST_CHANNEL_UPDATE",
"UNIT_SPELLCAST_CHANNEL_STOP",
"UNIT_SPELLCAST_SUCCEEDED",
"UNIT_THREAT_SITUATION_UPDATE",
"PARTY_MEMBERS_CHANGED",
"RAID_ROSTER_UPDATE",
"COMBAT_LOG_EVENT_UNFILTERED",
183,7 → 176,7
TargetSpells = false,
FocusSpells = false,
 
OwnSpell = false,
OwnSpells = false,
};
 
BuffTypes =
297,7 → 290,7
TargetSpells = {},
FocusSpells = {},
 
OwnSpell = {},
OwnSpells = {},
};
 
DebuffCatType =
555,7 → 548,7
end
 
function PowaAuras:Debug(...)
if (self.Misc.debug == true) then
if (PowaMisc.debug == true) then
self:Message(...) --OK
end
self:UnitTestDebug(...);
trunk/PowerAuras/PowerOptions.xml
67,7 → 67,7
-- ------------------------------------------------------------------------------------------------
<Frame name="PowaOptionsFrame" toplevel="true" movable="true" parent="UIParent" frameStrata="MEDIUM" hidden="true" enableMouse="true" enableKeyboard="true">
<Size>
<AbsDimension x="328" y="470" />
<AbsDimension x="328" y="430" />
</Size>
<Anchors>
<Anchor point="CENTER" relativeTo="UIParent">
169,49 → 169,6
</Anchors>
</Button>
 
-- case desactiver
<CheckButton name="PowaEnableButton" inherits="PowaCheckTemplate">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="PowaOptionsFrame" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self.tooltipText = PowaAuras.Text.aideEnable;
getglobal("PowaEnableButtonText"):SetText(PowaAuras.Text.nomEnable);
</OnLoad>
<OnClick>
PowaAuras:EnableChecked();
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="PowaDebugButton" inherits="PowaCheckTemplate">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="PowaOptionsFrame" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-45"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self.tooltipText = PowaAuras.Text.aideDebug;
getglobal("PowaDebugButtonText"):SetText(PowaAuras.Text.nomDebug);
</OnLoad>
<OnClick>
PowaAuras:DebugChecked();
</OnClick>
</Scripts>
</CheckButton>
-- bouton Editer
<Button name="PowaEditButton" inherits="OptionsButtonTemplate" text="Editer">
<Anchors>
271,7 → 228,8
</OnClick>
</Scripts>
</Button>
-- --------------------------------------------------------------------- Fenetre icones effets
 
-- --------------------------------------------------------------------- Fenetre icones effets
<Frame name="PowaOptionsSelectorFrame">
<Size>
<AbsDimension x="194" y="355"/>
279,7 → 237,7
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-20" y="-70"/>
<AbsDimension x="-20" y="-30"/>
</Offset>
</Anchor>
</Anchors>