Jump to content

wUnit API


MrFade
 Share

Recommended Posts

  • Vault Administrator
public abstract class wUnit
{
    public IntPtr BaseAddress;
    public abstract GUID Guid;
    public abstract GUID Target;
    public abstract string Name;

    public abstract GUID Summoner;
    public abstract GUID Creator;
    public abstract GUID Owner;

    #region Flags
    public abstract bool Track;
    public abstract bool IsDead;
    public abstract bool IsGhost;
    public abstract bool Invisible;
    public abstract bool IsLootable;
    public abstract bool IsTapped;
    public abstract bool TappedByMe;
    public abstract bool TappedByAll;
    public abstract bool ReferAFriend;
    public abstract bool NotClientControlled;
    public abstract bool Spawning;
    public abstract bool PlayerControlled;
    public abstract bool InPreparation;
    public abstract bool NoAttack1;
    public abstract bool NoAttack2;
    public abstract bool IsImmune;
    public abstract bool IsImmunePC;
    public abstract bool IsImmuneNPC;
    public abstract bool IsLooting;
    public abstract bool PetInCombat;
    public abstract bool PvpFlagged;
    public abstract bool IsSilenced;
    public abstract bool CantSwim;
    public abstract bool CanSwim;
    public abstract bool IsPacified;
    public abstract bool IsStunned;
    public abstract bool IsInCombat;
    public abstract bool IsOnTaxi;
    public abstract bool IsDisarmed;
    public abstract bool IsConfused;
    public abstract bool IsFeared;
    public abstract bool IsPossessed;
    public abstract bool NoInteract;
    public abstract bool Skinnable;
    public abstract bool IsMounted;
    public abstract bool AppearDead;
    public abstract bool HideBody;
    public abstract bool IgnoreRep;
    public abstract bool CanListen;
    public abstract bool OffhandDisarmed;
    public abstract bool RangeDisarmed;
    public abstract bool RegeneratePower;
    public abstract bool PreventSpellClick;
    public abstract bool PreventSwimming;
    public abstract bool CantSwitchTarget;

    public abstract NpcFlag Flag4;
    public abstract bool HasGossipWindow;
    public abstract bool IsQuestGiver;
    public abstract bool CanTrainPlayer;
    public abstract bool HasDailyQuests;
    public abstract bool IsVendor;
    public abstract bool SellsFood;
    public abstract bool SellsReagents;
    public abstract bool CanRepairArmor;
    public abstract bool IsTaxi;
    public abstract bool IsSpiritHealer;
    public abstract bool IsSpiritGuide;
    public abstract bool IsInnkeeper;
    public abstract bool IsBanker;
    public abstract bool IsBattleMaster;
    public abstract bool IsAuctioneer;
    public abstract bool IsStableMaster;
    public abstract bool IsGuildBanker;
    public abstract bool IsMailInfo;
    public abstract bool IsTransmogrifier;
    public abstract bool IsVoidBanker;
    #endregion

    #region Stats
    public abstract uint Level;
    public abstract byte Gender;
    public abstract Class Class;
    public abstract Race Race;

    public abstract uint FactionID;
    public abstract UnitType uType;
    public abstract Family Family;
    public abstract Rank Rank;

    public abstract GatherType gType;
    public abstract bool NeedHerbalist;
    public abstract bool NeedMiner;
    public abstract bool NeedEngineer;

    public abstract uint Health;
    public abstract uint MaxHealth;
    public abstract double HealthPercent;

    public abstract uint Power;
    public abstract uint Mana;
    public abstract uint Rage;
    public abstract uint Focus;
    public abstract uint Energy;
    public abstract uint ComboPoints;

    public abstract uint MaxPower;
    public abstract uint MaxMana;
    public abstract uint MaxRage;
    public abstract uint MaxFocus;
    public abstract uint MaxEnergy;
    public abstract uint MaxComboPoints;

    public abstract double PowerPercent;
    public abstract double ManaPercent;
    public abstract double FocusPercent;
    public abstract double RagePercent;
    public abstract double EnergyPercent;
    #endregion

    #region Casting

    public abstract uint CastID;
    public abstract uint CastStart;
    public abstract uint CastEnd;
    public abstract uint CastRemaining;
    public abstract uint CastCompleted;
    public abstract bool IsCasting;

    public abstract uint ChannelID;
    public abstract uint ChannelStart;
    public abstract uint ChannelEnd;
    public abstract uint ChannelRemaining;
    public abstract uint ChannelCompleted;
    public abstract bool IsChanneling;

    #endregion

    #region Position
    public abstract double RotationD;
    public abstract float RotationF;
    public abstract Vector Position;
    public abstract float Pitch;

    public abstract bool IsBehind(wUnit Unit);
    public abstract bool IsTurning;
    public abstract bool IsMoving;
    public abstract bool IsSwimming;
    public abstract bool IsFlying;
    #endregion

    #region Local Player
    public abstract uint Money;
    public abstract uint Experience;
    public abstract uint MaxExperience;

    public abstract IntPtr InventoryPTR;
    public abstract List<GUID> Bags;
    public abstract List<GUID> Bank;
    public abstract List<GUID> Backpack;
    public abstract List<GUID> Equipment;
    #endregion
}

public static class wUnit_Extensions
{
    #region Auras
    private static bool GetAuras(wUnit u, out List<uAura> Auras);

    public static bool HasAura(this wUnit u, uint SpellID);
    public static bool HasAura(this wUnit u, string SpellName);

    public static long AuraRemaining(this wUnit u, uint SpellID);
    public static long AuraRemaining(this wUnit u, string SpellName);

    public static int AuraStack(this wUnit u, uint SpellID);
    public static int AuraStack(this wUnit u, string SpellName);

    public static string AuraDispel(this wUnit u, uint SpellID);
    public static string AuraDispel(this wUnit u, string SpellName);
    #endregion

    public static string FactionName(this wUnit u);
    public static Reaction Reaction(this wUnit u1, wUnit u2);
}

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share