Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Check If Target Has a Weapon

Featured Replies

Well, you can use these methods to check your unit:

    /// <summary>
    /// Used to get the main hand weapon of an unit.
    /// </summary>
    /// <remarks>Using 3.3.5a(12340) offsets.</remarks>
    /// <param name="unit">The unit.</param>
    public int MainHandId(WoWUnit unit)
    {
        if (unit.PlayerControlled)
            return wManager.Wow.Memory.WowMemory.Memory.ReadInt32(unit.GetDescriptorAddress(0x4E4));
        return wManager.Wow.Memory.WowMemory.Memory.ReadInt32(unit.GetDescriptorAddress(0xE0));
    }
    
    public bool IsDisarmed(WoWUnit unit)
    {
        return unit.UnitFlags.HasFlag(UnitFlags.Disarmed);
    }

    public bool IsHumanoid(WoWUnit unit)
    {
        return unit.CreatureTypeTarget == "Humanoid";
    }

As you can see you need for the main hand id different offsets, which are for wotlk(maybe it works for other expansions).

Please note that the id will still be returned for player characters even when shapeshifted or disarmed. If a npc / player doesn't carry a weapon, it will be zero.

I think it should suffice to build a properly check for disarm.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.