Lixion 1 Posted February 18, 2019 Share Posted February 18, 2019 I've been looking through the fight class maker. I didn't see anything to make sure shaman has buff on offhand weapon. Anyone have a fix for this or am i not looking hard enough? Link to comment https://wrobot.eu/forums/topic/10832-shaman-offhand-weapon-buff/ Share on other sites More sharing options...
Marsbar 228 Posted February 18, 2019 Share Posted February 18, 2019 I don't think it's a built in condition. You would have to use a lua condition. Droidz posted an example here:https://wrobot.eu/forums/topic/291-enhancement-shaman-weapon-buff-condition/?tab=comments#comment-1891 Link to comment https://wrobot.eu/forums/topic/10832-shaman-offhand-weapon-buff/#findComment-51645 Share on other sites More sharing options...
krycess 8 Posted January 30, 2020 Share Posted January 30, 2020 I use these to detect shaman buffs and they work well internal static class EnhancementHelper { public static bool HasTwoHandEquipped => Lua.LuaDoString<int>("result = IsEquippedItemType('Two-Hand')", "result") == 1; public static bool HasShieldEquipped => Lua.LuaDoString<int>("result = IsEquippedItemType('Shields')", "result") == 1; public static bool HasMainHandEnhancement => Lua.LuaDoString<int>("result = GetWeaponEnchantInfo()", "result") == 1; public static bool HasOffHandEnhancement => Lua.LuaDoString<int>("_, _, _, result = GetWeaponEnchantInfo()", "result") == 1; } my implementation looks like this internal class Imbue : TTask { readonly ISpellService spellService; public Imbue( ISpellService spellService) { this.spellService = spellService; } public override int Priority => 999; public override bool Activate() { return (spellService.RockbiterWeapon.KnownSpell || spellService.WindfuryWeapon.KnownSpell || spellService.FlametongueWeapon.KnownSpell) && (spellService.RockbiterWeapon.IsSpellUsable || spellService.WindfuryWeapon.IsSpellUsable || spellService.FlametongueWeapon.IsSpellUsable) && (!EnhancementHelper.HasMainHandEnhancement || (!EnhancementHelper.HasShieldEquipped && !EnhancementHelper.HasTwoHandEquipped && !EnhancementHelper.HasOffHandEnhancement)); } public override void Execute() { if (spellService.WindfuryWeapon.KnownSpell && !EnhancementHelper.HasMainHandEnhancement) spellService.WindfuryWeapon.Launch(); else if (spellService.FlametongueWeapon.KnownSpell && EnhancementHelper.HasMainHandEnhancement && !EnhancementHelper.HasOffHandEnhancement) spellService.FlametongueWeapon.Launch(); else spellService.RockbiterWeapon.Launch(); } } Link to comment https://wrobot.eu/forums/topic/10832-shaman-offhand-weapon-buff/#findComment-56731 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now