예제 #1
0
        public static List <WoWMount> GetAllMounts()
        {
            if (CachedMounts.Count > 0)
            {
                return(CachedMounts);
            }

            var ret       = new List <WoWMount>();
            var numMounts = WoWScript.Execute <int>("GetNumCompanions(\"MOUNT\")", 0);

            for (int i = 1; i <= numMounts; i++)
            {
                var mountInfo = WoWScript.Execute("GetCompanionInfo(\"MOUNT\", " + i + ")");
                if (mountInfo.Count > 5) // GetCompanionInfo should return 6 items
                {
                    try
                    {
                        ret.Add(new WoWMount(i, mountInfo[1], int.Parse(mountInfo[2]), int.Parse(mountInfo[5])));
                    }
                    catch { }
                }
            }
            CachedMounts = ret;
            return(ret);
        }
예제 #2
0
        private static void ExecuteIngameListener()
        {
            const string command =
                "local frame = CreateFrame('Frame', 'evcFrame'); frame:RegisterAllEvents(); frame:SetScript('OnEvent', function(self, event, ...) GetBillingTimeRested(event, ...); end);";

            WoWScript.ExecuteNoResults(command);
        }
예제 #3
0
 public void StartAttack()
 {
     WoWScript.Execute("StartAttack()");
 }
예제 #4
0
 public void Dismount()
 {
     WoWScript.ExecuteNoResults("Dismount()");
 }
예제 #5
0
 public void StrafeRight()
 {
     WoWScript.ExecuteNoResults("StrafeRightStart()");
 }
예제 #6
0
 public void StopMoving()
 {
     WoWScript.ExecuteNoResults("AscendStop() DescendStop() MoveBackwardStop() MoveForwardStop() StrafeLeftStop() StrafeRightStop()");
 }
예제 #7
0
 public void MoveForward()
 {
     WoWScript.ExecuteNoResults("MoveForwardStart()");
 }
예제 #8
0
 public void Descend()
 {
     WoWScript.ExecuteNoResults("SitStandOrDescendStart()");
 }
예제 #9
0
 public void Jump()
 {
     WoWScript.ExecuteNoResults("JumpOrAscendStart()");
 }
예제 #10
0
파일: Helper.cs 프로젝트: wampirr/cleanCore
 public static void CastSpell(int spellId, WoWObject target)
 {
     target.Select();
     WoWScript.ExecuteNoResults("CastSpellByID(" + spellId + ")");
 }
예제 #11
0
 public void Mount()
 {
     WoWScript.ExecuteNoResults("CallCompanion(\"MOUNT\", " + CompanionId + ")");
 }