Skip to content

Commit fc53085

Browse files
committed
Up version and improve early return of keys commands
1 parent 3b75eb9 commit fc53085

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

AstralKeys.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local _, addon = ...
22
addon.Week = 0
3-
addon.EXPANSION_LEVEL = GetMaxLevelForLatestExpansion()
3+
addon.EXPANSION_LEVEL = GetMaxLevelForLatestExpansion() or 90
44
addon.NUM_AFFIXES = 5
55

66
if not AstralKeys then AstralKeys = {} end

AstralKeys.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Title: Astral |cffff8000Keys|r
33
## Notes: Keystone Manager for Guilds and Friends
44
## Author: Astral
5-
## Version: 4.50
5+
## Version: 4.51
66
## SavedVariables: AstralKeys, AstralCharacters, AstralKeysSettings, AstralMinimap, AstralAffixes, AstralLists, AstralUnits
77
## Category-enUS: |cffFF0000Astral|r Addons
88
## X-Wago-ID: baNDZoKo

Communications.lua

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ end
300300

301301
local function ParseGuildChatCommands(text)
302302
if UnitLevel('player') ~= addon.EXPANSION_LEVEL then return end -- Don't bother checking anything if the unit is unable to acquire a key
303-
if not canaccessvalue(text) then return end
304-
text = gsub(text, "^%[%a+%] ", "") -- Strip off [SomeName] from message from using Identity-2
303+
if canaccessvalue(text) then
304+
text = gsub(text, "^%[%a+%] ", "") -- Strip off [SomeName] from message from using Identity-2
305+
end
305306
if text:lower() == addon.KEYS_TEXT_COMMAND then
306307
local guild = GetGuildInfo('player')
307308
if AstralKeysSettings.general.report_on_message['guild'] or (guild == 'Astral' and addon.PlayerRealm() == 'Area52') then -- Guild leader for Astral desires this setting to be foreced on for members.
@@ -324,8 +325,9 @@ AstralEvents:Register('CHAT_MSG_GUILD', ParseGuildChatCommands, 'parseguildchat'
324325

325326
local function ParsePartyChatCommands(text)
326327
if UnitLevel('player') ~= addon.EXPANSION_LEVEL then return end -- Don't bother checking anything if the unit is unable to acquire a key
327-
if not canaccessvalue(text) then return end
328-
text = gsub(text, "^%[%a+%] ", "") -- Strip off [SomeName] from message from using Identity-2
328+
if canaccessvalue(text) then
329+
text = gsub(text, "^%[%a+%] ", "") -- Strip off [SomeName] from message from using Identity-2
330+
end
329331
if text:lower() == addon.KEYS_TEXT_COMMAND then
330332
if AstralKeysSettings.general.report_on_message['party'] then
331333
if AstralKeysSettings.general.report_on_message['all_characters'] then
@@ -366,8 +368,9 @@ end
366368

367369
local function ParseRaidChatCommands(text)
368370
if UnitLevel('player') ~= addon.EXPANSION_LEVEL then return end -- Don't bother checking anything if the unit is unable to acquire a key
369-
if not canaccessvalue(text) then return end
370-
text = gsub(text, "^%[%a+%] ", "") -- Strip off [SomeName] from message from using Identity-2
371+
if canaccessvalue(text) then
372+
text = gsub(text, "^%[%a+%] ", "") -- Strip off [SomeName] from message from using Identity-2
373+
end
371374
if text:lower() == addon.KEYS_TEXT_COMMAND then
372375
if AstralKeysSettings.general.report_on_message['raid'] then
373376
if AstralKeysSettings.general.report_on_message['all_characters'] then

0 commit comments

Comments
 (0)