-
Notifications
You must be signed in to change notification settings - Fork 25
/
Console.lua
63 lines (42 loc) · 1.44 KB
/
Console.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--[[
Author: Dennis Werner Garske (DWG)
License: MIT License
]]
local _G = _G or getfenv(0)
local Roids = _G.Roids or {}
SLASH_PETATTACK1 = "/petattack";
SlashCmdList.PETATTACK = function(msg) Roids.DoPetAttack(msg); end
SLASH_RELOAD1 = "/rl";
SlashCmdList.RELOAD = function() ReloadUI(); end
SLASH_USE1 = "/use";
SlashCmdList.USE = Roids.DoUse;
SLASH_EQUIP1 = "/equip";
SlashCmdList.EQUIP = Roids.DoUse;
SLASH_EQUIPOH1 = "/equipoh";
SlashCmdList.EQUIPOH = Roids.DoEquipOffhand;
SLASH_UNSHIFT1 = "/unshift";
SlashCmdList.UNSHIFT = Roids.DoUnshift;
SLASH_STARTATTACK1 = "/startattack";
SlashCmdList.STARTATTACK = function(msg) Roids.DoCast(msg.." !Attack"); end
SLASH_STOPATTACK1 = "/stopattack";
SlashCmdList.STOPATTACK = function(msg) if Roids.CurrentSpell.autoAttack then Roids.DoCast(msg.." Attack"); end end
SLASH_STOPCASTING1 = "/stopcasting";
SlashCmdList.STOPCASTING = SpellStopCasting;
Roids.Hooks.CAST_SlashCmd = SlashCmdList.CAST;
Roids.CAST_SlashCmd = function(msg)
-- get in there first, i.e do a PreHook
if Roids.DoCast(msg) then
return;
end
-- if there was nothing for us to handle pass it to the original
Roids.Hooks.CAST_SlashCmd(msg);
end
SlashCmdList.CAST = Roids.CAST_SlashCmd;
Roids.Hooks.TARGET_SlashCmd = SlashCmdList.TARGET;
Roids.TARGET_SlashCmd = function(msg)
if Roids.DoTarget(msg) then
return;
end
Roids.Hooks.TARGET_SlashCmd(msg);
end
SlashCmdList.TARGET = Roids.TARGET_SlashCmd;