Skip to content

Commit 1bb294f

Browse files
committed
Added TBC spells
1 parent d61b7b9 commit 1bb294f

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

ShardSource.lua

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Shard_Channel = "ShardSrc"
44
local HSAction = "HStone"
55
local SMAction = "Smmn"
66
local SSAction = "SStone"
7+
local tullaBagAddon = Bagnon
78

89
local SoulShardItemID = 6265
910
local shardCount = 0
@@ -64,7 +65,10 @@ f:SetScript("OnEvent", function(self, event, ...)
6465
ShowBagColors()
6566
elseif event == "COMBAT_LOG_EVENT_UNFILTERED" then
6667
local timestamp, subevent, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = CombatLogGetCurrentEventInfo()
67-
local fname = strsplit("-", destName)
68+
local fname = ""
69+
if destName then
70+
fname = strsplit("-", destName)
71+
end
6872
if(subevent == "UNIT_SPELLCAST_SUCCEEDED") then
6973
DebugLog("Cast Occurred: "..sourceName.." - "..UnitName("player"))
7074
end
@@ -104,6 +108,12 @@ f:SetScript("OnEvent", function(self, event, ...)
104108
elseif string.find(spellName, "Create Soulstone") then
105109
lastAction = "SStone"
106110
UpdateShardList()
111+
elseif string.find(spellName, "Ritual of Souls") then
112+
lastAction = "Ritual"
113+
UpdateShardList()
114+
elseif string.find(spellName, "Soulshatter") then
115+
lastAction = "Shatter"
116+
UpdateShardList()
107117
elseif string.find(spellName, "Soulstone Resurrection") then
108118
local msg = ""
109119
if UnitName("target") then
@@ -170,7 +180,7 @@ SlashCmdList["SHARDSOURCE"] = function(msg)
170180
Shard_COM_SendSource(SSAction, Shards.soulStoneSrc, UnitName("player"))
171181
elseif msg == "debug" then
172182
Shards.debug = not Shards.debug
173-
print("Debug Mode: "..tostring(Shards.UseEmotes))
183+
print("Debug Mode: "..tostring(Shards.debug))
174184
end
175185
end
176186

@@ -366,30 +376,37 @@ function ShardProcess()
366376
if lastAction == "HStone" then
367377
DebugLog("Healthstone created from " .. shardSrc)
368378
Shards.healthStoneSrc = shardSrc
369-
lastAction = ""
370379

371380
-- Created a Soulstone
372381
elseif lastAction == "SStone" then
373382
DebugLog("Soulstone created from " .. shardSrc)
374383
Shards.soulStoneSrc = shardSrc
375-
lastAction = ""
376384

377385
-- Summoned a Demon
378386
elseif lastAction == "Demon" then
379387
local msg = "summoned a " .. demonSummoned .. " using the soul of " .. GetNameFromID(shardSrc).."."
380388
SendChatMessage(msg, "EMOTE", nil, nil)
381389
demonSummoned = ""
382-
lastAction = ""
383390

384391
-- Summoned a Player
385392
elseif lastAction == "SummonPlayer" then
386393
local msg = "summoned " .. summonPlrSrc .. " using the soul of " .. GetNameFromID(shardSrc).."."
387394
SendChatMessage(msg, "EMOTE", nil, nil)
388395
Shard_COM_SendSource(SMAction, shardSrc, UnitName("target"))
389396
summonPlrSrc = ""
390-
lastAction = ""
397+
398+
-- Soulshatter
399+
elseif lastAction == "Shatter" then
400+
local msg = "shattered the soul of " .. GetNameFromID(shardSrc) .. ", fading into the background."
401+
SendChatMessage(msg, "EMOTE", nil, nil)
402+
403+
elseif lastAction == "Ritual" then
404+
local msg = "brought forth a Soulwell, filled with the essence of " .. GetNameFromID(shardSrc) .. "."
405+
SendChatMessage(msg, "EMOTE", nil, nil)
391406

392407
end
408+
409+
lastAction = ""
393410
Shards[hadShardAt] = nil
394411
end
395412

@@ -488,7 +505,9 @@ function SetBagItemGlow(bagId, slot, bank)
488505
local locationid = getLocationID(bagId, slot, bank)
489506

490507
if IsAddOnLoaded("OneBag3") then
491-
item = _G["OneBagFrameBag"..bagId.."Item"..slot]
508+
item = _G["OneBagFrameBag"..bagId.."Item"..slot]
509+
--elseif tullaBagAddon then
510+
--item = tullaBagAddon.ItemSlot[slot]
492511
else
493512
for i = 1, NUM_CONTAINER_FRAMES, 1 do
494513
local frame = _G["ContainerFrame"..i]

0 commit comments

Comments
 (0)