What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Development - PB] Training Riding

Smarter

Member
Joined
Jan 15, 2010
Messages
763
Reaction score
9
I am making a PB Profile for training riding, and purchasing a default mount, because i'm so lazy I can't be bothered to manually do such a thing ;). However, I'd like to check if the character owns the "Default Mount" of my choosing before it goes buying it anyways .... but I cannot seem to find an LUA function for checking known mounts? :-\ Unless I enumerate GetCompanionInfo, which would be improbable in PB?

Code:
                var mountList = new List<string>(); 
                using (new FrameLock())
                {
                    var count = Lua.GetReturnVal<int>("GetNumCompanions(\"MOUNT\");", 0);
                    for (int i = 1; i <= count; i++)
                    {
                        var companionInfo = Lua.GetReturnValues("return GetCompanionInfo(\"MOUNT\", " + i + ");");
                        /*
                         * creatureID - Unique ID of the companion (usable with PlayerModel:SetCreature) (number)
                         * creatureName - Localized name of the companion (string)
                         * spellID - The "spell" for summoning the companion (usable with GetSpellLink et al) (number)
                         * icon - Path to an icon texture for the companion (string)
                         * active - 1 if the companion queried is currently summoned; otherwise nil (1nil)
                         * mountFlags - A bitfield that indicates mount capabilities. Only returned for mounts. (bitfield)                         * 
                         */
                        mountList.Add(companionInfo[1]);
                    }
                }
 
Last edited:
If you have VS do a search through references for Mounts
It should have a list containing all...
I saw it yesterday, but I can't remember what it is exactly.
 
Wouldn't it be possible just to check for the specific spellID?
 
If you have VS do a search through references for Mounts
It should have a list containing all...
I saw it yesterday, but I can't remember what it is exactly.

Styx.Logic.MountHelper.Mounts -- LoL ... Why didn't I just search the object browser .... i'm a NOOB! :-\
 
Back
Top