Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
10.2.2 Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Kkthnx committed Jun 7, 2021
1 parent 3c1d64b commit 5b4b838
Show file tree
Hide file tree
Showing 31 changed files with 335 additions and 205 deletions.
10 changes: 8 additions & 2 deletions KkthnxUI/Core/API.lua
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,15 @@ function K.SetupArrow(self, direction)
self:SetRotation(rad(arrowDegree[direction]))
end

function K.ReskinArrow(self, direction)
function K.ReskinArrow(self, direction, skin)
if skin == nil then
skin = true
end

self:SetSize(16, 16)
self:SkinButton()
if skin == true then
self:SkinButton()
end

self:SetDisabledTexture("Interface\\ChatFrame\\ChatFrameBackground")
local dis = self:GetDisabledTexture()
Expand Down
23 changes: 13 additions & 10 deletions KkthnxUI/Core/Changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ local CLOSE = _G.CLOSE
-- Updated, Fixed, Added, Removed, Various.

local changelogData = {
"Added fix for blizzard chatframe offset bug",
"Added merchant item quality color for name",
"Added option to scale bags",
"Added pet buffs for feeding and mend",
"Added |CFFFF7C0ADruid|r mana when in cat form and such",
"Fixed party pets showing without being in party",
"Updated TopCenterContainerHolder position",
"Updated character stat panel button to not conflict with other addons",
"Updated sortbags code",
"Various monk/dk code cleaned up",
"Added icon and movers to fps/ms datatext",
"Added more gossips for auto-questing",
"Added new icons for datatext",
"Added quest frame fixer code",
"Added quest icon desaturation code",
"Fixed combat section in interface being wonky",
"Fixed killing blow emoting",
"Fixed mousetrail module showing when hiding",
"Fixed sapped module to announce when sapped",
"Updated character stat panel with itemlevel",
"Updated how AFK/DND is shown on unitframes",
"Updated vendor price string",
"Various code cleanups",
}

local changelogFrame
Expand Down
3 changes: 0 additions & 3 deletions KkthnxUI/Core/Functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ local UnitIsTapDenied = _G.UnitIsTapDenied
local UnitReaction = _G.UnitReaction

local iLvlDB = {}
local enchantString = string_gsub(ENCHANTED_TOOLTIP_LINE, "%%s", "(.+)")
local essenceDescription = _G.GetSpellDescription(277253)
local essenceTextureID = 2975691
local itemLevelString = string_gsub(ITEM_LEVEL, "%%d", "")

local mapRects = {}
Expand Down
28 changes: 11 additions & 17 deletions KkthnxUI/Developer/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,17 @@ do
end
end

local spitFactResponses = {
"Did you know a lack of spit was once used as an admission of guilt.",
"Did you know saliva production has a circadian rhythm.",
"Did you know spit can battle bacteria.",
"Did you know spit is mostly water.",
"Did you know spit keeps you from getting cavities.",
"Did you know stress can leave you spit-less.",
"Did you know there are five different kinds of spit.",
"Did you know there's a medical standard for how much spit you should have.",
"Did you know you need spit if you want to taste anything.",
}
do
local SpitterEmotes = {
"VIOLIN", "CHUCKLE", "FLEX", "PITY", "SLAP", "BONK"
}

local function SpitFacts(_, _, msg, author)
if string.find(msg, "spits on you") then
SendChatMessage(spitFactResponses[math.random(1, #spitFactResponses)], "WHISPER", nil, author)
local function EmoteOnSpitters(_, _, msg, spitter)
if string.find(msg, "spits on you") then
DoEmote(SpitterEmotes[math.random(1, #SpitterEmotes)], spitter)
end
end
end

ChatFrame_AddMessageEventFilter("CHAT_MSG_EMOTE", SpitFacts)
ChatFrame_AddMessageEventFilter("CHAT_MSG_TEXT_EMOTE", SpitFacts)
ChatFrame_AddMessageEventFilter("CHAT_MSG_EMOTE", EmoteOnSpitters)
ChatFrame_AddMessageEventFilter("CHAT_MSG_TEXT_EMOTE", EmoteOnSpitters)
end
Binary file added KkthnxUI/Media/DataText/LFG.blp
Binary file not shown.
Binary file added KkthnxUI/Media/DataText/bags.blp
Binary file not shown.
Binary file added KkthnxUI/Media/DataText/guild.blp
Binary file not shown.
Binary file added KkthnxUI/Media/DataText/help.blp
Binary file not shown.
Binary file added KkthnxUI/Media/DataText/player.blp
Binary file not shown.
47 changes: 10 additions & 37 deletions KkthnxUI/Modules/Announcements/Elements/KillingBlow.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
local K, C = unpack(select(2, ...))
local Module = K:GetModule("Announcements")

-- Sourced: ElvUI Shadow & Light (Darth_Predator, Repooc)

local _G = _G
local bit_band = _G.bit.band
local math_random = _G.math.random
local table_wipe = _G.table.wipe

local COMBATLOG_OBJECT_TYPE_PLAYER = _G.COMBATLOG_OBJECT_TYPE_PLAYER
local CombatLogGetCurrentEventInfo = _G.CombatLogGetCurrentEventInfo
local DoEmote = _G.DoEmote
local GetBattlefieldScore = _G.GetBattlefieldScore
local GetNumBattlefieldScores = _G.GetNumBattlefieldScores
local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS
local UnitGUID = _G.UnitGUID

local pvpEmoteList = {
"ANGRY", "BARK", "BECKON", "BITE", "BONK", "BURP", "BYE", "CACKLE",
"ANGRY", "BARK", "BITE", "BONK", "BURP", "BYE", "CACKLE",
"CALM", "CHUCKLE", "COMFORT", "CRACK", "CUDDLE", "CURTSEY", "FLEX",
"GIGGLE", "GLOAT", "GRIN", "GROWL", "GUFFAW", "INSULT",
"LAUGH", "LICK", "MOCK", "MOO", "MOON", "MOURN",
Expand All @@ -27,39 +19,20 @@ local pvpEmoteList = {
"TEASE", "THANK", "THREATEN", "TICKLE", "VETO", "VIOLIN", "YAWN"
}

local BG_Opponents = {}
function Module:OpponentsTable()
table_wipe(BG_Opponents)
for index = 1, GetNumBattlefieldScores() do
local name, _, _, _, _, faction, _, _, classToken = GetBattlefieldScore(index)
if (K.Faction == "Horde" and faction == 1) or (K.Faction == "Alliance" and faction == 0) then
BG_Opponents[name] = classToken
end
end
end

function Module:SetupKillingBlow()
local _, subevent, sourceGUID, _, Caster, _, _, _, TargetName, TargetFlags = CombatLogGetCurrentEventInfo()
if subevent == "PARTY_KILL" and sourceGUID == UnitGUID("player") then
print(subevent)
print(sourceGUID)
local mask = bit_band(TargetFlags, COMBATLOG_OBJECT_TYPE_PLAYER)
if Caster == K.Name and (BG_Opponents[TargetName] or mask > 0) then
if mask > 0 and BG_Opponents[TargetName] then
TargetName = "|c"..RAID_CLASS_COLORS[BG_Opponents[TargetName]].colorStr..TargetName.."|r" or TargetName
TargetName = TargetName
end

print("Dwdwdw")

--if C["Announcements"].PvPEmote then
DoEmote(pvpEmoteList[math_random(1, #pvpEmoteList)], TargetName)
--end
local _, subevent, _, _, Caster, _, _, _, TargetName, TargetFlags = CombatLogGetCurrentEventInfo()
if subevent == "PARTY_KILL" then
local mask = bit_band(TargetFlags, COMBATLOG_OBJECT_TYPE_PLAYER) -- Don't ask me, it's some dark magic. If bit mask for this is positive, it means a player was killed
if Caster == K.Name and (mask > 0) then -- If this is my kill and target is a player (world)
DoEmote(pvpEmoteList[math_random(1, #pvpEmoteList)], TargetName)
end
end
end

function Module:CreateKillingBlow()
K:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", self.OpponentsTable)
if not C["Announcements"].PvPEmote then
return
end

K:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", self.SetupKillingBlow)
end
2 changes: 1 addition & 1 deletion KkthnxUI/Modules/Announcements/Elements/Sapped.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local UNKNOWN = _G.UNKNOWN
function Module:SetupSaySapped()
local _, event, _, _, sourceName, _, _, _, destName, _, _, spellID = CombatLogGetCurrentEventInfo()

if ((spellID == 6770) and (destName == K.Name) and (event == "SPELL_AURA_APPLIED" or event == "SPELL_AURA_REFRESH")) then
if ((spellID == 6770 or spellID == 2070 or spellID == 11297) and (destName == K.Name) and (event == "SPELL_AURA_APPLIED" or event == "SPELL_AURA_REFRESH")) then
SendChatMessage(L["Sapped"], "SAY")
K.Print(L["SappedBy"]..(sourceName or UNKNOWN))
end
Expand Down
9 changes: 8 additions & 1 deletion KkthnxUI/Modules/Automation/Elements/Quest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ local followerAssignees = {
[135614] = true, -- 马迪亚斯·肖尔大师
}

local autoGossipTypes = {
["gossip"] = true,
["banker"] = true,
["vendor"] = true,
["trainer"] = true,
}

QuickQuest:Register("GOSSIP_SHOW", function()
local npcID = GetNPCID()
if(ignoreQuestNPC[npcID]) then
Expand Down Expand Up @@ -321,7 +328,7 @@ QuickQuest:Register("GOSSIP_SHOW", function()
local _, instance, _, _, _, _, _, mapID = GetInstanceInfo()
if(instance ~= "raid" and not ignoreGossipNPC[npcID] and not (instance == "scenario" and mapID == 1626)) then
local _, type = GetGossipOptions()
if(type == "gossip") then
if autoGossipTypes[type] then
SelectGossipOption(1)
return
end
Expand Down
3 changes: 2 additions & 1 deletion KkthnxUI/Modules/DataText/Elements/Friends.lua
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,9 @@ function Module:CreateSocialDataText()

Module.FriendsDataTextFrame.Texture = Module.FriendsDataTextFrame:CreateTexture(nil, "BACKGROUND")
Module.FriendsDataTextFrame.Texture:SetPoint("LEFT", Module.FriendsDataTextFrame, "LEFT", 0, 0)
Module.FriendsDataTextFrame.Texture:SetTexture("Interface\\HELPFRAME\\ReportLagIcon-Chat")
Module.FriendsDataTextFrame.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\player.blp")
Module.FriendsDataTextFrame.Texture:SetSize(24, 24)
Module.FriendsDataTextFrame.Texture:SetVertexColor(102/255, 157/255, 255/255)

Module.FriendsDataTextFrame.Text = Module.FriendsDataTextFrame:CreateFontString(nil, "ARTWORK")
Module.FriendsDataTextFrame.Text:SetFontObject(K.GetFont(C["UIFonts"].DataTextFonts))
Expand Down
3 changes: 2 additions & 1 deletion KkthnxUI/Modules/DataText/Elements/Gold.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ function Module:CreateGoldDataText()

Module.GoldDataTextFrame.Texture = Module.GoldDataTextFrame:CreateTexture(nil, "BACKGROUND")
Module.GoldDataTextFrame.Texture:SetPoint("LEFT", Module.GoldDataTextFrame, "LEFT", 0, 0)
Module.GoldDataTextFrame.Texture:SetTexture([[Interface\HELPFRAME\ReportLagIcon-Loot]])
Module.GoldDataTextFrame.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\bags.blp")
Module.GoldDataTextFrame.Texture:SetSize(24, 24)
Module.GoldDataTextFrame.Texture:SetVertexColor(102/255, 157/255, 255/255)

Module.GoldDataTextFrame.Text = Module.GoldDataTextFrame:CreateFontString(nil, "ARTWORK")
Module.GoldDataTextFrame.Text:SetFontObject(K.GetFont(C["UIFonts"].DataTextFonts))
Expand Down
3 changes: 2 additions & 1 deletion KkthnxUI/Modules/DataText/Elements/Guild.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,9 @@ function Module:CreateGuildDataText()

Module.GuildDataTextFrame.Texture = Module.GuildDataTextFrame:CreateTexture(nil, "BACKGROUND")
Module.GuildDataTextFrame.Texture:SetPoint("LEFT", Module.GuildDataTextFrame, "LEFT", 0, 0)
Module.GuildDataTextFrame.Texture:SetTexture("Interface\\HELPFRAME\\HelpIcon-AccountSecurity")
Module.GuildDataTextFrame.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\guild.blp")
Module.GuildDataTextFrame.Texture:SetSize(24, 24)
Module.GuildDataTextFrame.Texture:SetVertexColor(102/255, 157/255, 255/255)

Module.GuildDataTextFrame.Text = Module.GuildDataTextFrame:CreateFontString(nil, "ARTWORK")
Module.GuildDataTextFrame.Text:SetFontObject(K.GetFont(C["UIFonts"].DataTextFonts))
Expand Down
3 changes: 2 additions & 1 deletion KkthnxUI/Modules/DataText/Elements/Latency.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ function Module:CreateLatencyDataText()

Module.LatencyDataTextFrame.Texture = Module.LatencyDataTextFrame:CreateTexture(nil, "BACKGROUND")
Module.LatencyDataTextFrame.Texture:SetPoint("LEFT", Module.LatencyDataTextFrame, "LEFT", 0, 0)
Module.LatencyDataTextFrame.Texture:SetTexture([[Interface\HELPFRAME\HelpIcon-Bug]])
Module.LatencyDataTextFrame.Texture:SetTexture(("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\LFG.blp"))
Module.LatencyDataTextFrame.Texture:SetSize(24, 24)
Module.LatencyDataTextFrame.Texture:SetVertexColor(102/255, 157/255, 255/255)

Module.LatencyDataTextFrame.Text = Module.LatencyDataTextFrame:CreateFontString("OVERLAY")
Module.LatencyDataTextFrame.Text:SetFontObject(K.GetFont(C["UIFonts"].DataTextFonts))
Expand Down
3 changes: 2 additions & 1 deletion KkthnxUI/Modules/DataText/Elements/System.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ function Module:CreateSystemDataText()

Module.SystemDataTextFrame.Texture = Module.SystemDataTextFrame:CreateTexture(nil, "BACKGROUND")
Module.SystemDataTextFrame.Texture:SetPoint("LEFT", Module.SystemDataTextFrame, "LEFT", 0, 0)
Module.SystemDataTextFrame.Texture:SetTexture([[Interface\HELPFRAME\HelpIcon-ReportLag]])
Module.SystemDataTextFrame.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\help.blp")
Module.SystemDataTextFrame.Texture:SetSize(24, 24)
Module.SystemDataTextFrame.Texture:SetVertexColor(102/255, 157/255, 255/255)

Module.SystemDataTextFrame.Text = Module.SystemDataTextFrame:CreateFontString("OVERLAY")
Module.SystemDataTextFrame.Text:SetFontObject(K.GetFont(C["UIFonts"].DataTextFonts))
Expand Down
Loading

0 comments on commit 5b4b838

Please sign in to comment.