Skip to content

Instantly share code, notes, and snippets.

@sklivvz
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sklivvz/b2dc51c4547818e88672 to your computer and use it in GitHub Desktop.
Save sklivvz/b2dc51c4547818e88672 to your computer and use it in GitHub Desktop.
Ask Mr. Robot patch to fix the broken GetCurrentRegion() behavior

#Ask Mr. Robot patch

  1. add a package dependency to https://github.com/Phanx/LibRealmInfo/blob/master/LibRealmInfo.lua

  2. apply this diff

     --- C:\Program Files (x86)\World of Warcraft\Interface\AddOns\AskMrRobot\AskMrRobot.lua
     +++ untitled 2
     @@ -184,7 +184,7 @@
      function AskMrRobot.RecordLogin()
      
      	-- only need to record the region now (only thing we can't get from the log file still)
     -	AmrSettings.Region = AskMrRobot.regionNames[GetCurrentRegion()]
     +	AmrSettings.Region = LibStub("LibRealmInfo"):GetCurrentRegion()
      
      	-- remove the old Logins data, don't need it anymore
      	AmrSettings.Logins = nil
     @@ -249,7 +249,7 @@
      
      -- gets all basic character properties
      function AskMrRobot.ScanCharacter()
     -	AmrDb.Region = AskMrRobot.regionNames[GetCurrentRegion()]
     +	AmrDb.Region = LibStub("LibRealmInfo"):GetCurrentRegion()
          AmrDb.RealmName = GetRealmName()
          AmrDb.CharacterName = UnitName("player")
      	AmrDb.Guild = GetGuildInfo("player")
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment