Wrong name for Battleground chat in Classic 1.13.2 #47


  • Fixed
Closed
Assigned to allinonemighty
  • MoonClaw1173 created this issue Aug 11, 2019

    Elephant caused an error when loading:

     

    1x Elephant\Initialize.lua:49: bad argument #1 to 'sub' (string expected, got nil)
    [C]: in function `sub'
    Elephant\Initialize.lua:49: in function <Elephant\Initialize.lua:45>
    Elephant\Initialize.lua:90: in function <Elephant\Initialize.lua:65>
    (tail call): ?
    [C]: ?
    [string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
    (tail call): ?
    ...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:558: in function `EnableAddon'
    ...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:651: in function <...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0.lua:636>
    [C]: in function `LoadAddOn'
    FrameXML\UIParent.lua:353: in function `UIParentLoadAddOn'
    FrameXML\UIParent.lua:424: in function `TimeManager_LoadUI'
    FrameXML\UIParent.lua:693: in function <FrameXML\UIParent.lua:658>

     

     

    I am not sure how shall I submit an PR to fix the issue, thus I put the patch here:

    diff --git a/Core.lua b/Core.lua
    index e07a842..e3151cf 100644
    --- a/Core.lua
    +++ b/Core.lua
    @@ -1,6 +1,7 @@
     --[[ Creating AddOn ]]
     Elephant = LibStub("AceAddon-3.0"):NewAddon("Elephant", "AceConsole-3.0", "AceEvent-3.0")
     Elephant.L = LibStub("AceLocale-3.0"):GetLocale("Elephant")
    +Elephant.IsClassic = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC)
     
     --[[ Bindings ]]
     BINDING_HEADER_ELEPHANT = "Elephant"
    diff --git a/Initialize.lua b/Initialize.lua
    index d763cc8..f413d69 100644
    --- a/Initialize.lua
    +++ b/Initialize.lua
    @@ -86,10 +86,12 @@ function Elephant:OnEnable()
         ElephantFrameRaidTabButton,
         Elephant.L['chatnames']['raid'],
         'RAID')
    +  if not Elephant.IsClassic then
       SetTabButtonProperties(
         ElephantFrameInstanceTabButton,
         Elephant.L['chatnames']['instance'],
         'INSTANCE_CHAT')
    +  end
       SetTabButtonProperties(
         ElephantFrameSayTabButton,
         Elephant.L['chatnames']['say'],

     

  • MoonClaw1173 added a tag Patch Aug 11, 2019
  • MoonClaw1173 edited title and description Aug 11, 2019
  • Forge_User_13125652 posted a comment Jan 3, 2020

    Tried it in WoW Classic and works pretty well, thank you.

     

    PS: If you dislike the name "INSTANCE" in the tooltip of the chat bubble in Elephant, just edit the ["instance"] value in the

    corresponding Locale-LUA of your language.

     

    L['chatnames'] = {
    ...
    ['instance'] = INSTANCE
    }


    Edited Jan 3, 2020
  • AllInOneMighty posted a comment Feb 1, 2020

    Will update in version 1.13.3d-classic+

  • AllInOneMighty self-assigned this issue Feb 1, 2020
  • AllInOneMighty edited title Feb 1, 2020
  • AllInOneMighty added a tag Accepted Feb 1, 2020
  • AllInOneMighty removed a tag Patch Feb 1, 2020
  • AllInOneMighty closed issue Feb 1, 2020
  • AllInOneMighty removed a tag Accepted Feb 1, 2020
  • AllInOneMighty added a tag Fixed Feb 1, 2020

To post a comment, please login or register a new account.