Skip to content

Commit

Permalink
Merge pull request #22 from prowley/dev
Browse files Browse the repository at this point in the history
I18N, minor visual adj
  • Loading branch information
prowley authored Sep 30, 2020
2 parents 8e1cd08 + bc3929c commit f9a067b
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 88 deletions.
2 changes: 1 addition & 1 deletion SteaSummon.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: SteaSummon
## Notes: Warlock Summoning
## Author: Stea
## Version: 0.48
## Version: 0.49
## SavedVariablesPerCharacter: SteaSummonSave, SteaDEBUG


Expand Down
55 changes: 17 additions & 38 deletions buffs.lua
Original file line number Diff line number Diff line change
@@ -1,51 +1,30 @@
local addonName, addonData = ...

City = {
"WarChief's Blessing",
"Rallying Cry of the Dragonslayer",
"Spirit of Zandalar",
16609, --"WarChief's Blessing",
22888, --"Rallying Cry of the Dragonslayer",
24425, --"Spirit of Zandalar",
}

DarkMoon = {
"Sayge's Dark Fortune of Damage",
"Sayge's Dark Fortune of Resistance",
"Sayge's Dark Fortune of Armor",
"Sayge's Dark Fortune of Intelligence",
"Sayge's Dark Fortune of Spirit",
"Sayge's Dark Fortune of Stamina",
"Sayge's Dark Fortune of Strength",
"Sayge's Dark Fortune of Agility",
23768, --"Sayge's Dark Fortune of Damage",
23769, --"Sayge's Dark Fortune of Resistance",
23767, --"Sayge's Dark Fortune of Armor",
23766, --"Sayge's Dark Fortune of Intelligence",
23738, --"Sayge's Dark Fortune of Spirit",
23737, --"Sayge's Dark Fortune of Stamina",
23735, --"Sayge's Dark Fortune of Strength",
23737, --"Sayge's Dark Fortune of Agility",
}

DireMaul = {
"Mol'dar's Moxie",
"Fengus' Ferocity",
"Slip'kik's Savvy",
22818, --"Mol'dar's Moxie",
22817, --"Fengus' Ferocity",
22820, --"Slip'kik's Savvy",
}

Felwood = {
"Songflower Serenade",
"Windblossom Berries",
"Whipper Root Tuber",
"Night Dragon's Breath",
}

BlastedLands = {
"R.O.I.D.S.",
"Ground Scorpak Assay",
"Lung Juice Cocktail",
"Cerebral Cortex Compound",
"Gizzard Gum",
}

Winterspring = {
"Juju Might",
"Juju Power",
"Juju Flurry",
"Juju Gulie",
"Juju Escape",
"Juju Chill",
"Juju Ember"
15366, --"Songflower Serenade",
}

TimeSensitive = {
Expand Down Expand Up @@ -85,9 +64,9 @@ buffs = {
end

db("buffs", player, "has buff", name)
if self.buffs[name] then
if self.buffs[spellId] then
db("buffs", name, "is of interest")
out[i] = {name, icon}
out[i] = {spellId, name, icon}
i = i + 1
end
end
Expand Down
12 changes: 2 additions & 10 deletions main.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
-- set things going

-- TODO: add raid/party join wait list propogation (partial, needs work to reduce traffic)
-- TODO: silent summon request
-- TODO: add click nag button
-- TODO: be aware of where the raid is summoning to
-- TODO: notice people who log out while on summon list
-- TODO: detect AFKs and kick them - fast
-- TODO: fix the networking code
-- TODO: prioritize people with world buffs
-- TODO: add raid instructions
-- TODO: add more clickers nag
-- TODO: there appear to be race conditions, seems like events may be executed on another thread
-- also, doesnt appear blizz compiled in a mutex... which is nice.
-- TODO: add ability to remove yourself from the summon list
-- TODO: add type down search of list
-- TODO: add shard count, and maybe collective count?
-- TODO: add fancy spell casting next button
-- TODO: send some messages over whisper channel, not broadcast
-- TODO: add sound when next button pops
-- TODO: L10N **** Prio

-- notes:
--
Expand Down
3 changes: 0 additions & 3 deletions optionsgui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,6 @@ optionsgui = {
},

init = function(self)
tmpchanges = {
show = SteaSummonSave.show
}
LibStub("AceConfig-3.0"):RegisterOptionsTable("SteaSummon", self.options)
LibStub("AceConfigDialog-3.0"):AddToBlizOptions("SteaSummon")
end,
Expand Down
101 changes: 65 additions & 36 deletions summon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ local summon = {
---------------------------------
addWaiting = function(self, player, fromPlayer)
player = strsplit("-", player)
if not IsInGroup(player) then
return
end

if (fromPlayer) then
local isWaiting = self:findWaitingPlayer(player)
if isWaiting then
Expand Down Expand Up @@ -454,15 +458,23 @@ local summon = {
end

--- Text items

f.location = f:CreateFontString(nil,"ARTWORK")
f.location:SetFont("Fonts\\ARIALN.ttf", 8, "OUTLINE")
f.location:SetPoint("TOPLEFT","SummonFrame", "TOPLEFT", 70, -16)
f.location:SetPoint("TOPLEFT","SummonFrame", "TOPLEFT", 70, -8)
f.location:SetPoint("RIGHT", -20, 0)
f.location:SetJustifyH("RIGHT")
f.location:SetJustifyV("TOP")
f.location:SetAlpha(.5)
f.location:SetText("")

f.destination = f:CreateFontString(nil,"ARTWORK")
f.destination:SetFont("Fonts\\ARIALN.ttf", 8, "OUTLINE")
f.destination:SetPoint("TOPLEFT","SummonFrame", "TOPLEFT", 70, -8)
f.destination:SetPoint("TOP", f.location, "BOTTOM", 0, 0)
f.destination:SetPoint("LEFT", f.location)
f.destination:SetPoint("RIGHT", -20, 0)
f.destination:SetJustifyH("RIGHT")
f.destination:SetJustifyV("TOP")
f.destination:SetAlpha(.5)
f.destination:SetText("")

Expand Down Expand Up @@ -499,7 +511,8 @@ local summon = {
end

if (addonData.util:playerCanSummon()) then
addonData.buttons[i].Button:SetAttribute("macrotext", "/target " .. player .. "\n/cast Ritual of Summoning")
local spell = GetSpellInfo(698) -- Ritual of Summoning
addonData.buttons[i].Button:SetAttribute("macrotext", "/target " .. player .. "\n/cast " .. spell)
end
else
self:enableButton(i, false)
Expand Down Expand Up @@ -545,7 +558,8 @@ local summon = {
--- Next Button
if not next and self:recStatus(self.waiting[i]) == "requested" and addonData.util:playerCanSummon() then
next = true
addonData.buttons[36].Button:SetAttribute("macrotext", "/target " .. player .. "\n/cast Ritual of Summoning")
local spell = GetSpellInfo(698) -- Ritual of Summoning
addonData.buttons[36].Button:SetAttribute("macrotext", "/target " .. player .. "\n/cast " .. spell)
addonData.buttons[36].Button:SetScript("OnMouseUp", summonClick)
addonData.buttons[36].Button:Show()
end
Expand Down Expand Up @@ -638,10 +652,10 @@ local summon = {
tex:SetTexture("Interface/Buttons/UI-QuickSlot")
texHighlight:SetTexture("Interface/Buttons/UI-QuickSlot-Depress")
texHighlight:SetTexCoord(0, 1, 0, 1)
texPushed:SetTexture("Interface/Buttons/UI-QuickSlot2")
texPushed:SetTexCoord(0, 1, 0, 1)
texDisabled:SetTexture("Interface/Buttons/UI-QuickSlotRed")
texDisabled:SetTexCoord(0, 1, 0, 1)
--texPushed:SetTexture("Interface/Buttons/UI-QuickSlot2")
--texPushed:SetTexCoord(0, 1, 0, 1)
--texDisabled:SetTexture("Interface/Buttons/UI-QuickSlotRed")
--texDisabled:SetTexCoord(0, 1, 0, 1)
-- icon
icon = addonData.buttons[i].Button:CreateTexture()
icon:SetTexture("Interface/ICONS/Spell_Shadow_Twilight")
Expand Down Expand Up @@ -753,7 +767,7 @@ local summon = {
shardCount = function(self)
local count = 0
if ShardIcon then
local _, itemLink = GetItemInfo("Soul Shard")
local _, itemLink = GetItemInfo(6265) -- "Soul Shard"
for bag = 0, NUM_BAG_SLOTS do
for slot = 1, GetContainerNumSlots(bag) do
if(GetContainerItemLink(bag, slot) == itemLink) then
Expand All @@ -778,7 +792,7 @@ local summon = {
---------------------------------
bagPushShardCheck = function(_, event, bag, iconFileID)
db("summon.display", event, bag, iconFileID)
if iconFileID == 134075 then
if iconFileID == 134075 then -- "Soul Shard"
g_self:shardIncrementBy(1)
end
end,
Expand Down Expand Up @@ -951,7 +965,7 @@ local summon = {
end
else
SummonFrame.destination:SetTextColor(1,1,1,.5)
SummonFrame.location:SetTextColor(1,0,0,.5)
SummonFrame.location:SetTextColor(0,1,0,.5)
if SummonToButton then
SummonToButton:SetNormalTexture("Interface\\Buttons\\UI-GuildButton-MOTD-Disabled")
end
Expand All @@ -967,35 +981,50 @@ local summon = {

db("summon.misc", "setting destination: ", location, " in ", zone)
if location and location ~= "" and zone and zone ~= "" then
SummonFrame.destination:SetText("Destination: " .. self.location .. ", " .. self.zone)
SummonFrame.destination:SetText("Destination: " .. self.zone .. ", " .. self.location)
else
SummonFrame.destination:SetText("")
end
end,

usesSoulShard = {
["Shadowburn"] = 1,
["Create Soulstone"] = 1,
["Create Soulstone (Lesser)"] = 1,
["Create Soulstone (Minor)"] = 1,
["Create Soulstone (Greater)"] = 1,
["Create Soulstone (Major)"] = 1,
["Create Spellstone"] = 1,
["Create Spellstone (Greater)"] = 1,
["Create Spellstone (Major)"] = 1,
["Summon Felhunter"] = 1,
["Summon Succubus"] = 1,
["Summon Voidwalker"] = 1,
["Soul Fire"] = 1,
["Create Firestone (Lesser)"] = 1,
["Create Firestone (Greater)"] = 1,
["Create Firestone (Major)"] = 1,
["Create Firestone"] = 1,
["Create Healthstone"] = 1,
["Create Healthstone (Lesser)"] = 1,
["Create Healthstone (Minor)"] = 1,
["Create Healthstone (Greater)"] = 1,
["Create Healthstone (Major)"] = 1,
[27565] = 1, -- Banish
[8994] = 1, -- banish (again)
[12890] = 1, -- deep slumber, probably not in game
[1098] = 1, -- enslave demon rank 1
[11725] = 1, -- enslave demon rank 2
[11726] = 1, -- enslave demon rank 3
[17877] = 1, -- ["Shadowburn"] = 1, -- Rank 1
[18867] = 1, -- shadowburn rank 2
[18868] = 1, -- shadowburn rank 3
[18869] = 1, -- shadowburn rank 4
[18870] = 1, -- shadowburn rank 5
[18871] = 1, -- shadowburn rank 6
[20755] = 1, -- ["Create Soulstone"] = 1,
[20752] = 1, -- ["Create Soulstone (Lesser)"] = 1,
[693] = 1, -- ["Create Soulstone (Minor)"] = 1,
[20756] = 1, -- ["Create Soulstone (Greater)"] = 1,
[20757] = 1, -- ["Create Soulstone (Major)"] = 1,
[2362] = 1, -- ["Create Spellstone"] = 1,
[17727] = 1, -- ["Create Spellstone (Greater)"] = 1,
[17728] = 1, -- ["Create Spellstone (Major)"] = 1,
[691] = 1, -- ["Summon Felhunter"] = 1,
[712] = 1, -- ["Summon Succubus"] = 1, 8722 used by npcs
[8722] = 1, -- just in case
[697] = 1, -- ["Summon Voidwalker"] = 1, 12746 used by npcs
[12746] = 1, -- just in case
[6353] = 1, -- ["Soul Fire"] = 1, rank 1
[17924] = 1, -- soul fire rank 2
[6366] = 1, -- ["Create Firestone (Lesser)"] = 1,
[17952] = 1, -- ["Create Firestone (Greater)"] = 1,
[17953] = 1, -- ["Create Firestone (Major)"] = 1,
[17951] = 1, -- ["Create Firestone"] = 1,
[5699] = 1, --["Create Healthstone"] = 1, level 34
[6202] = 1, -- ["Create Healthstone (Lesser)"] = 1,
[6201] = 1, -- ["Create Healthstone (Minor)"] = 1,
[11729] = 1, -- ["Create Healthstone (Greater)"] = 1,
[208023] = 1, -- ["Create Healthstone"] = 1, level 10
[11730] = 1, -- ["Create Healthstone (Major)"] = 1,
},

---------------------------------
Expand Down Expand Up @@ -1040,14 +1069,14 @@ local summon = {
-- this is a normal end of cast, might go into channel next
elseif event == "UNIT_SPELLCAST_SUCCEEDED" then
-- this is the place to find out if a non-channelled spell used a soul shard
if g_self.isWarlock and g_self.usesSoulShard[name] then
if g_self.isWarlock and g_self.usesSoulShard[spellId] then
g_self:shardIncrementBy(-1)
end
elseif event == "UNIT_SPELLCAST_CHANNEL_STOP" then
if g_self.isWarlock then
local oldCount = g_self.shards
g_self.shards = addonData.summon.shardCount(g_self)
if name == "Ritual of Summoning" then
if spellId == 698 then -- "Ritual of Summoning"
--- update shards (if shard count decreased then the summon went through!)
if oldCount > g_self.shards then
addonData.summon.summonSuccess(g_self)
Expand Down

0 comments on commit f9a067b

Please sign in to comment.