View Single Post
12-27-18, 03:46 PM   #1
Uggers
A Fallenroot Satyr
 
Uggers's Avatar
Join Date: May 2008
Posts: 26
IsMounted API Help

I'm trying to fix a portion of an addon but i'm a bit stuck.

The portion of the addon which causes a new random mount macro to be generate (I want this because it includes the tooltip and icon etc, is currently like this;

Code:
function MountManager:UNIT_SPELLCAST_SUCCEEDED(event, unit, spellName)
    if self.db.profile.autoNextMount and unit == "player" and spellName == GetSpellInfo(state.mount) then
        self:GenerateMacro()
    end
end
I believe that UNIT_SPELLCAST_SUCCEEDED no longer gives spell details so I dropped the (event, unit, spellName) and changed it to IsMounted, eventually trying a few things but currently I have


Code:
function MountManager:UNIT_SPELLCAST_SUCCEEDED()
    if self.db.profile.autoNextMount and unit == "player" and IsMounted() then
        self:GenerateMacro()
    end
end
any help would be appreciate as i'm a bit stuck now
  Reply With Quote