Can someone give me the right offset or give an example of how to find it?
// IsCasting = ?
public int IsCasting {
get
{
uint pointer = ObjectPointer + (uint)Descriptors.eUnitFields.IsCasting;
return Memory.ReadInt(pointer);
}
}
Can someone give me the right offset or give an example of how to find it?
// IsCasting = ?
public int IsCasting {
get
{
uint pointer = ObjectPointer + (uint)Descriptors.eUnitFields.IsCasting;
return Memory.ReadInt(pointer);
}
}
Now I have no idea about offset, but I'm 99% sure there was a 3.3.5 info dump thread. This is however how I read whether a unit is casting or not:
Code:public int ChanneledCastingId { get { return Helper.Magic.Read<int>(Pointer + 0xB58); } } public int CastingId { get { return Helper.Magic.Read<int>(Pointer + 0xB44); } } public bool IsCasting { get { return (ChanneledCastingId != 0 || CastingId != 0); } }
Have a look at UnitCastingInfo
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
UnitCastingInfo works 50% of the time, and also lua is slow
Last edited by haku43; 03-23-2011 at 11:18 AM.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
If you use both UnitCastingInfo and UnitChannelInfo they will work every time.
Plus they are really simple to reverse and get the offsets from.
Edit: Found some really old code for 3.3.5a i had on my SVN.
Code:public enum OtherField : uint { IsCasting = 0xA6C, ChanneledCasting = 0xA80, } /// <summary> /// Returns the spellID being cast /// </summary> public int CastingId { get { uint pointer = BaseAddress + (uint)Offsets.OtherField.IsCasting; return ObjectManager.Memory.ReadInt(pointer); } } /// <summary> /// Gets a value indicating whether this unit is casting. /// </summary> /// <value> /// <c>true</c> if this unit is casting; otherwise, <c>false</c>. /// </value> public bool IsCasting { get { if (CastingId == 0 && ChanneledCastingId == 0) return false; return true; } } /// <summary> /// Returns the spellID being channeled /// </summary> /// <value>The channeled casting id.</value> public int ChanneledCastingId { get { uint pointer = BaseAddress + (uint)Offsets.OtherField.ChanneledCasting; return ObjectManager.Memory.ReadInt(pointer); } }
Last edited by Arutha532; 03-23-2011 at 12:48 PM.