Skip to content

Commit

Permalink
Merge pull request Softrix#52 from ynazar1/sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
Softrix authored Oct 31, 2024
2 parents 8b4b72e + 9387f4c commit fabbf1a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions SmartBuff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
-- Cast the most important buffs on you, tanks or party/raid members/pets.
-------------------------------------------------------------------------------

SMARTBUFF_DATE = "011124"; -- EU Date
-- Version/Release info, bump these as needed:
-- Bump .toc file and optionally update notes in localization.en.lua

SMARTBUFF_DATE = "011124"; -- EU Date
SMARTBUFF_VERSION = "r31." .. SMARTBUFF_DATE;
-- Update the NR below to force full reload of SB_Data on first login
-- Bump on major logic or buff changes only
SMARTBUFF_VERSIONNR = 110005;
-- End of version info

SMARTBUFF_TITLE = "SmartBuff";
SMARTBUFF_SUBTITLE = "Supports you in casting buffs";
SMARTBUFF_DESC = "Cast the most important buffs on you, your tanks, party/raid members/pets";
Expand All @@ -23,7 +28,6 @@ local SmartbuffPrefix = "Smartbuff";
local SmartbuffSession = true;
local SmartbuffVerCheck = false; -- for my use when checking guild users/testers versions :)
local buildInfo = select(4, GetBuildInfo())
local SmartbuffRevision = 30;
local SmartbuffVerNotifyList = {}

local SG = SMARTBUFF_GLOBALS;
Expand All @@ -32,9 +36,6 @@ local O = nil; -- Options local
local B = nil; -- Buff settings local
local _;

BINDING_HEADER_SMARTBUFF = "SmartBuff";
SMARTBUFF_BOOK_TYPE_SPELL = "spell";

local GlobalCd = 1.5;
local maxSkipCoolDown = 3;
local maxRaid = 40;
Expand Down Expand Up @@ -430,7 +431,7 @@ local function SendSmartbuffVersion(player, unit)
end
-- not announced, add the player and announce.
tinsert(SmartbuffVerNotifyList, { player, unit, GetTime() })
C_ChatInfo.SendAddonMessage(SmartbuffPrefix, SmartbuffRevision, "WHISPER", player)
C_ChatInfo.SendAddonMessage(SmartbuffPrefix, SMARTBUFF_VERSION, "WHISPER", player)
SMARTBUFF_AddMsgD(string.format("%s was sent version information.", player))
end

Expand Down Expand Up @@ -507,7 +508,7 @@ function SMARTBUFF_OnEvent(self, event, ...)

if ((event == "UNIT_NAME_UPDATE" and arg1 == "player") or event == "PLAYER_ENTERING_WORLD") then
if IsPlayerInGuild() and event == "PLAYER_ENTERING_WORLD" then
C_ChatInfo.SendAddonMessage(SmartbuffPrefix, SmartbuffRevision, "GUILD")
C_ChatInfo.SendAddonMessage(SmartbuffPrefix, SMARTBUFF_VERSION, "GUILD")
end
isPlayer = true;
if (event == "PLAYER_ENTERING_WORLD" and isInit and O.Toggle) then
Expand All @@ -531,8 +532,7 @@ function SMARTBUFF_OnEvent(self, event, ...)
if arg1 == SmartbuffPrefix then
-- its us.
if arg2 then
arg2 = tonumber(arg2)
if arg2 > SmartbuffRevision and SmartbuffSession then
if arg2 > SMARTBUFF_VERSION and SmartbuffSession then
DEFAULT_CHAT_FRAME:AddMessage(SMARTBUFF_MSG_NEWVER1 ..
SMARTBUFF_VERSION .. SMARTBUFF_MSG_NEWVER2 .. arg2 .. SMARTBUFF_MSG_NEWVER3)
SmartbuffSession = false
Expand Down

0 comments on commit fabbf1a

Please sign in to comment.