r79581 - trunk/ClosetGnome_Mount

0 views
Skip to first unread message

svnco...@wowace.com

unread,
Jul 31, 2008, 6:48:42 PM7/31/08
to wowace-gar...@googlegroups.com
Author: rabbit
Date: Thu Jul 31 18:48:41 2008
New Revision: 79581

Log:
ClosetGnome_Mount: If we are casting while dismounting, schedule a equip of the previous set for after the spell finishes. Does not work with channeled spells, and if you interrupt the spell before it would normally finish, CG will not reschedule the equipment change.

Modified:
trunk/ClosetGnome_Mount/ClosetGnome_Mount.lua

Modified: trunk/ClosetGnome_Mount/ClosetGnome_Mount.lua
==============================================================================
--- trunk/ClosetGnome_Mount/ClosetGnome_Mount.lua (original)
+++ trunk/ClosetGnome_Mount/ClosetGnome_Mount.lua Thu Jul 31 18:48:41 2008
@@ -357,6 +357,12 @@
end

local function dismount(set)
+ local spell, _, _, _, _, endTime = UnitCastingInfo("player")
+ if spell then
+ local dismountTime = (endTime / 1000 - GetTime()) + 0.3
+ ClosetGnomeMount:ScheduleEvent("CGM-Dismount", dismount, dismountTime, set)
+ return
+ end
if CG:HasSet(set) then
Wear(set)
elseif CG:HasSet(lastSetBeforeMounting) then
@@ -385,4 +391,4 @@
if buff ~= L["Flight Form"] and buff ~= L["Swift Flight Form"] then return end
if isMountSwappingDisabled() then return end
dismount(getDismountSet())
-end
\ No newline at end of file
+end

Reply all
Reply to author
Forward
0 new messages