Quantcast

Version changed to 3.1.3

Taracque [02-08-13 - 18:24]
Version changed to 3.1.3
Added: Stormlash totem now automaticaly announced to the raid/party chat.
Filename
Change_log.txt
Ele_GUI.lua
Elementarist.lua
Elementarist.toc
Localization_enUS.lua
diff --git a/Change_log.txt b/Change_log.txt
index be32bc8..6862e4e 100755
--- a/Change_log.txt
+++ b/Change_log.txt
@@ -1,3 +1,6 @@
+**v3.1.3**
+* Added: Stormlash totem now automaticaly announced to the raid/party chat.
+
 **v3.1.2**
 * Fixed: Modules now can be disabled
 * Fixed: Lua error on detect talent
diff --git a/Ele_GUI.lua b/Ele_GUI.lua
index 0cd6b20..8a1227f 100755
--- a/Ele_GUI.lua
+++ b/Ele_GUI.lua
@@ -354,8 +354,11 @@ function Elementarist:CreateConfig()
 	local ThreatWarnBtn = Elementarist:CreateCheckButton(L.CONFIG_THREAT_WARNING, Elementarist.configPanel, ElementaristDB, "ThreatWarning", false)
 	ThreatWarnBtn:SetPoint('TOPLEFT', 10, -258)

+	local StormlashAnnounceBtn = Elementarist:CreateCheckButton(L.CONFIG_ANNOUNCE_STORMLASH, Elementarist.configPanel, ElementaristDB, "AnnounceStormlash", false)
+	StormlashAnnounceBtn:SetPoint('TOPLEFT', 10, -288)
+
 	local EleLayout = Elementarist:CreateDropDownMenu(L.CONFIG_LAYOUT, Elementarist.configPanel, ElementaristDB, "Layout", {{text = Elementarist.EleLayout["1"]}, {text = Elementarist.EleLayout["2"]}},200)
-	EleLayout:SetPoint('TOPLEFT', 10, -288)
+	EleLayout:SetPoint('TOPLEFT', 10, -318)

 	local ResetBtn = Elementarist:CreateButton(L.CONFIG_RESET_POSITIONS, Elementarist.configPanel)
 	ResetBtn:SetWidth(160)
@@ -363,7 +366,7 @@ function Elementarist:CreateConfig()
 	ResetBtn:SetScript('OnClick', function()
 		Elementarist:ResetPosition()
 	end)
-	ResetBtn:SetPoint("TOPLEFT",10,-318)
+	ResetBtn:SetPoint("TOPLEFT",10,-348)
 	ResetBtn:Show()

 	Elementarist.configPanel.okay = function()
diff --git a/Elementarist.lua b/Elementarist.lua
index d1639fc..efbf0b1 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Elementarist 3.1.2
+-- Elementarist 3.1.3
 --
 -- Shows the advised spell for an elemental shaman for optimal DPS output.
 -------------------------------------------------------------------------------
@@ -8,7 +8,7 @@ Elementarist = {Locals = {}}

 local L = Elementarist.Locals

-Elementarist.versionNumber = '3.1.2';
+Elementarist.versionNumber = '3.1.3';
 Elementarist.enabled = true;
 Elementarist.playerName = UnitName("player")
 Elementarist.playerGUID = UnitGUID("player")
@@ -43,6 +43,7 @@ Elementarist.SFHistory = {
 }
 Elementarist.talent = ""
 Elementarist.role = ""
+Elementarist.StormlashID = nil
 Elementarist.talentUnsure = true
 Elementarist.callbacks = {};
 Elementarist.tier6Talent = nil
@@ -70,6 +71,7 @@ Elementarist.SpellList = {
 	["Elemental Blast"] = GetSpellInfo(117014),
 	["Ascendance"] = GetSpellInfo(114049),
 	["Stormlash Totem"] = GetSpellInfo(120668),
+	["Stormlash Totem Buff"] = GetSpellInfo(120676),

 	-- racials
 	["Berserking"] = GetSpellInfo(26297),	-- Troll racial
@@ -435,6 +437,16 @@ end

 function Elementarist.events.COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideCaster, srcGUID, srcName, srcFlags, srcRaidFlags, dstGUID, dstName, dstFlags, dstRaidFlags, spellId, spellName, spellSchool, damage, ...)
 	if Elementarist.isEnabled() then
+		if (Elementarist.StormlashID~=nil) and (ElementaristDB.AnnounceStormlash) then
+			if (event == "SPELL_AURA_REMOVED") and (srcGUID == Elementarist.StormlashID) and (spellName == Elementarist.SpellList["Stormlash Totem Buff"]) then
+				if ( Elementarist:PlayerInParty() >0 ) then
+					SendChatMessage( spellName .. " expired!!!", "RAID_WARNING" )
+				else
+					SendChatMessage( spellName .. " expired!!!", "SAY" )
+				end
+				Elementarist.StormlashID=nil
+			end
+		end
 		if srcName == Elementarist.playerName then
 			if (srcGUID == Elementarist.playerGUID) and (spellName==Elementarist.trackAura) and (Elementarist.auraCooldowns[dstGUID]) then
 				Elementarist.auraCooldowns[dstGUID]["action"] = GetTime()
@@ -446,6 +458,14 @@ function Elementarist.events.COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideC
 			end
 			Elementarist:DecideSpells()
 			-- calculate DPS
+			if (event=="SPELL_SUMMON") and (ElementaristDB.AnnounceStormlash) and (spellName==Elementarist.SpellList["Stormlash Totem"]) then
+				Elementarist.StormlashID = dstGUID
+				if ( Elementarist:PlayerInParty() >0 ) then
+					SendChatMessage( spellName .. " activated!!!", "RAID_WARNING" )
+				else
+					SendChatMessage( spellName .. " activated!!!", "SAY" )
+				end
+			end
 			if (event=="SPELL_CAST_SUCCESS") then
 				Elementarist.lastSpell = spellName
 				-- aura track if needed
diff --git a/Elementarist.toc b/Elementarist.toc
index ff591b8..105feb1 100755
--- a/Elementarist.toc
+++ b/Elementarist.toc
@@ -2,7 +2,7 @@
 ## Title: Elementarist
 ## Notes: Elemental shaman spell rotation helper
 ## Author: Taracque, Felmosórongy of Arathor
-## Version: 3.1.2
+## Version: 3.1.3
 ## SavedVariables: ElementaristDB
 ## OptionalDeps: OmniCC, SpellFlash
 ## Dependencies:
diff --git a/Localization_enUS.lua b/Localization_enUS.lua
index 5975468..149c3ad 100755
--- a/Localization_enUS.lua
+++ b/Localization_enUS.lua
@@ -38,4 +38,5 @@ if GetLocale() then
 	L.LAYOUT_RIGHTTOLEFT = "Right to left"
 	L.CONFIG_ENABLE_HS_TOTEM = "Show Healing Stream Totem"
 	L.CONFIG_ENABLE_SEARING_TOTEM = "Show Searing Totem"
+	L.CONFIG_ANNOUNCE_STORMLASH = "Announce Stormlash Totem in Raid/Party chat"
 end
\ No newline at end of file