Jump to content

Warrior Stances and Weapon Enhancements


Recommended Posts

these are mostly for my own reference but also for anyone who is looking to do the same things that I was trying to do.

these properties and methods assist in swapping warrior stances and checking for weapon enhancements such as poisons/oils/shaman enhancements etcetcetc

        public static Task<bool> HasBattleStance =>
            Task.FromResult(Lua.LuaDoString<int>("_,_,isActive,_ = GetShapeshiftFormInfo(1);", "isActive") == 1);

        public static Task CastBattleStanceAsync()
        {
            Lua.LuaDoString("CastSpellByName('Battle Stance')");
            return Task.CompletedTask;
        }

        public static Task<bool> HasDefensiveStance =>
            Task.FromResult(Lua.LuaDoString<int>("_,_,isActive,_ = GetShapeshiftFormInfo(2);", "isActive") == 1);

        public static Task CastDefensiveStanceAsync()
        {
            Lua.LuaDoString("CastSpellByName('Defensive Stance')");
            return Task.CompletedTask;
        }

        public static Task<bool> HasBerserkerStance =>
            Task.FromResult(Lua.LuaDoString<int>("_,_,isActive,_ = GetShapeshiftFormInfo(3);", "isActive") == 1);

        public static Task CastBerserkerStanceAsync()
        {
            Lua.LuaDoString("CastSpellByName('Berserker Stance')");
            return Task.CompletedTask;
        }

        public static Task<bool> HasMainHandEnhancement =>
            Task.FromResult(Lua.LuaDoString<int>("result = GetWeaponEnchantInfo()", "result") == 1);

        public static Task<bool> HasOffHandEnhancement =>
            Task.FromResult(Lua.LuaDoString<int>("_, _, _, result = GetWeaponEnchantInfo()", "result") == 1);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...