it multiplies the value of field by 4
it multiplies the value of field by 4
Because the descriptors that I dump (in the dump threads) are indexes of an array.
You need to multiply the field value by 4, to get the index address.
I'm assuming you're asking because you can't search, or you just can't be bothered to do any form of research.
In both cases; read the section rules.
It's not against the rules to ask a question. It's against the rules to ask a question that's been answered here hundreds of times. (Which your question has)
=( I am sorry apoc.
Btw, this isn't adding players or items. :O
Java is being gay and doesn't have an unsigned 64-bit primitive type..
Gay
Last edited by l1nk3; 04-17-2010 at 07:59 PM.
Download for the lib?
Correct:
There are currently two types of objects that BlackRain does not support: AiGroup and AreaTrigger. However, for a simple Object Manager, these are of no significance, as you can get something basic going without them. (And even for something advanced, you don't need Area Triggers or AI Groups perse)Code:public enum WoWObjectType : uint { Object = 0, Item = 1, Container = 2, Unit = 3, Player = 4, GameObject = 5, DynamicObject = 6, Corpse = 7, AiGroup = 8, AreaTrigger = 9 }
If you were saying that it doesn't read all possible aspects of an object (descriptors), that's correct too. But those are easily added yourself, you can learn how descriptors work first, or just copy/pasta your way through and extend its functionality.
Bear in mind I made this to give people an (arguable) quality structure to start off from, much like the release Apoc made a while ago. Extending it may be done by myself in the future, or you could do it manually yourself, and learn something on-the-go.
Last edited by Seifer; 04-18-2010 at 11:17 AM.
My problem is, that the program isn't grabbing all objects in my area. It doesn't get players, which is what I mainly want. It only grabs corpses and units.
I would like to know if there is a way to fix this =O
"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
Good point. :P
I don't know if you have taken a look at the code, but I'll give you a pointer:
And in ObjectManager.cs:Code:foreach (WowObject obj in ObjectManager.Objects) { lst_Objects.Items.Add(string.Format("GUID: {0} | Entry: {1}", obj.GUID, obj.Entry)); }
TryCode:if (currentObject.Type == (int)Offsets.WowObjectType.Player) Objects.Add(new WowPlayer(currentObject.BaseAddress));
If that doesn't work, I'll take a closer look, but I am pretty positive it does.Code:foreach (WowPlayer obj in ObjectManager.Objects) { // Do something. }
// Edit
public class WowPlayer : WowUnit
Last edited by Seifer; 04-18-2010 at 02:46 PM.
Code:if (Objects.Count != int.MinValue) Objects.Clear(); // Clean up any previous objects in the list, if we have them.
First wat
Second watCode:field *= field; // He's anal.
In conjuction withCode:get { return GetStorageField<int>((uint)Offsets.WowObjectFields.OBJECT_FIELD_TYPE); }
Is not going to work.Code:switch (currentObject.Type) { case (int)Offsets.WowObjectType.Unit: Objects.Add(new WowUnit(currentObject.BaseAddress)); break; case (int)Offsets.WowObjectType.Item: Objects.Add(new WowItem(currentObject.BaseAddress)); break; case (int)Offsets.WowObjectType.Container: Objects.Add(new WowContainer(currentObject.BaseAddress)); break; case (int)Offsets.WowObjectType.Corpse: Objects.Add(new WowCorpseObject(currentObject.BaseAddress)); break; case (int)Offsets.WowObjectType.GameObject: Objects.Add(new WowGameObject(currentObject.BaseAddress)); break; case (int)Offsets.WowObjectType.DynamicObject: Objects.Add(new WowDynamicObject(currentObject.BaseAddress)); break; case (int)Offsets.WowObjectType.Player: Objects.Add(new WowPlayer(currentObject.BaseAddress)); break; }
Reason being that the OBJECT_FIELD_TYPE descriptor is a flag. A player object for instance will have the flags "Object", "Unit" and "Player". You cannot compare it the way you do in your switch statement.
What you want to use is the member at this+0x14 if you wish to keep using that enum.
"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