api: merge api calls into environment

This commit is contained in:
shagu
2017-02-26 20:55:22 +01:00
parent 1766dd4ba0
commit 6f7a665ffe
30 changed files with 284 additions and 285 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ pfUI:RegisterModule("autoshift", function ()
pfUI.autoshift.lastError = ""
pfUI.autoshift.CastSpellByName = _G["CastSpellByName"]
pfUI.api.Hook("CastSpell", function(spellId, spellbookTabNum)
Hook("CastSpell", function(spellId, spellbookTabNum)
if pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleStance'] then
pfUI.autoshift.CastSpellByName(pfLocaleShift[pfUI.cache["locale"]]['BattleStance'])
elseif pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleDefStance'] then
@@ -20,7 +20,7 @@ pfUI:RegisterModule("autoshift", function ()
pfUI.autoshift.lastError = ""
end)
pfUI.api.Hook("CastSpellByName", function(spellName, onSelf)
Hook("CastSpellByName", function(spellName, onSelf)
if pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleStance'] then
pfUI.autoshift.CastSpellByName(pfLocaleShift[pfUI.cache["locale"]]['BattleStance'])
elseif pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleDefStance'] then
@@ -35,7 +35,7 @@ pfUI:RegisterModule("autoshift", function ()
pfUI.autoshift.lastError = ""
end)
pfUI.api.Hook("UseAction", function(slot, checkCursor, onSelf)
Hook("UseAction", function(slot, checkCursor, onSelf)
if pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleStance'] then
pfUI.autoshift.CastSpellByName(pfLocaleShift[pfUI.cache["locale"]]['BattleStance'])
elseif pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleDefStance'] then