# Forum > World of Warcraft > World of Warcraft Bots and Programs > WoW Memory Editing >  [C#][Source] BlackRain - Simple Object Manager Library

## Seifer

*BlackRain has moved to GitHub!*

So, I have been reading up on the forums again after a while of being away, and as of late I've seen a lot of threads come up regarding the Object Manager, and how to get it working properly.
Therefore I've created this little project, which demonstrates how to implement an Object Manager in your project. And yes, I suck at making up proper names.

*This project is meant to give people who are new to WoW related C# coding, or want to get a general idea on how WoW handles its objects a place to start off. It's by no means perfect.*

BlackRain currently supports:
• Items• Players• NPCs• Containers• Corpses• Game Objects• Dynamic Objects• _HTML Logging_

And implements the majority of (useful) properties these objects have through reading their descriptors. It contains no logic whatsoever, that's your joy to implement.

Also included is *BlackWeather* (original naming again) which implements BlackRain and demonstrates its methods by allowing you to attach to a WoW process and dumping the objects into a listbox. You can either take a look into its source, or use the following to get going:

Namespaces required:


```
using BlackRain.Common.Objects;
using BlackRain.Common;
```

Obtain the process of World of Wacraft:


```
readonly Process[] _wowProc = Process.GetProcessesByName("Wow");
var proc = _wowProc[0]; // Will grab the first WoW process found. (0th element)
```

Tell the ObjectManager to initialize, and fire up BlackMagic:


```
ObjectManager.Initialize(proc);
ObjectManager.Pulse(); // And pulse directly after; so we populate the lists.
```

Once initialized, you can use the ObjectManager to access any object's properties; for example to display our own health:


```
int playerHealth = ObjectManager.Me.Health;
```

But also access the memory of the WoW process the ObjectManager is attached to:


```
ObjectManager.Read<T>(uint address);
```

I'll keep this project updated whenever a patch changes, and I know my code is far from perfect or complete, but I think it's pretty clean, and it works.

Finally, credits:
Shynd, Apoc, Nesox

*Source:*
https://github.com/Aevitas/blackrainwow

Enjoy.

----------


## Danne206

I will take a look - thanks for sharing this!

----------


## Seifer

> I will take a look - thanks for sharing this!


You're welcome. Let me know what you find, I haven't tested this extensively yet. I'll update it if you come across anything broken of course.

----------


## Apoc

I see bins, no src!

I shall wait to criticize you perhaps...

Edit: Didn't see the link. Silly ninja colors...

----------


## Seifer

> I see bins, no src!
> 
> I shall wait to criticize you perhaps...
> 
> Edit: Didn't see the link. Silly ninja colors...


Haha, my bad. Put the link to the SVN at the bottom now, just under download.

And please, criticize it if you find anything off.  :Smile:

----------


## Apoc

Few things  :Smile: 



```
            while (currentObject.BaseAddress != uint.MinValue && currentObject.BaseAddress % 2 == uint.MinValue)
            {
                if (currentObject.Type == (int) Offsets.WowObjectType.Unit)
                    Objects.Add(new WowUnit(currentObject.BaseAddress));
                if (currentObject.Type == (int) Offsets.WowObjectType.Item)
                    Objects.Add(new WowItem(currentObject.BaseAddress));
                if (currentObject.Type == (int) Offsets.WowObjectType.Container)
                    Objects.Add(new WowContainer(currentObject.BaseAddress));
                if (currentObject.Type == (int) Offsets.WowObjectType.Corpse)
                    Objects.Add(new WowCorpseObject(currentObject.BaseAddress));
                if (currentObject.Type == (int) Offsets.WowObjectType.GameObject)
                    Objects.Add(new WowGameObject(currentObject.BaseAddress));
                if (currentObject.Type == (int)Offsets.WowObjectType.DynamicObject)
                    Objects.Add(new WowDynamicObject(currentObject.BaseAddress));
                if (currentObject.Type == (int)Offsets.WowObjectType.Player)
                    Objects.Add(new WowPlayer(currentObject.BaseAddress));

                if (currentObject.GUID == LocalGUID)
                    Me = new WowPlayer(currentObject.BaseAddress);

                currentObject.BaseAddress = Memory.ReadUInt(currentObject.BaseAddress + (uint)Offsets.ObjectManager.NextObject);
            }
```

Use a switch here. Otherwise you're going to be going through a bunch of pointless if statements for no reason.

DisplayID is valid for players FYI. (Hence the reason why you can 'morph' yourself into other things.)

You're not removing any entries from your object list, so you'll definitely run into situations where you have stale data, and end up crashing the client/application due to bad base addresses. 



```
        protected T GetStorageField<T>(uint field) where T : struct
        {
            field = field * 4;
            var m_pStorage = ObjectManager.Memory.ReadUInt(BaseAddress + 0x08);
            return (T)ObjectManager.Memory.ReadObject(m_pStorage + field, typeof(T));
        }
```

BAD BAD BAD BAD!

I suggest you read up on the size of different things. (bools in specific)

You use a GetStorageField<bool>(x) in a few places, where the values are 32/64 bit values. Some of which don't return a 1 or 0.



```
 if (typeof(T) == typeof(bool)) return ObjectManager.Memory.ReadUInt32(addr) != 0;
```

Will fix most issues. (You'll want to actually do the boolean check in your properties though, to avoid any possible issues)



```
field = field * 4;
```



```
field *= 4;
```

Yes, I'm anal.



```
        protected T GetStorageField<T>(Offsets.WowObjectFields field) where T : struct
        {
            return GetStorageField<T>((uint)field);
        }
```

Never used. (You're using the uint casted version.)

I can go on, but I think you get the idea.

Decent start, but there's DEFINITELY room for improvement. (You're totally missing all the unit flags, among other vitally important information)

----------


## Seifer

Thanks Apoc, I'll be looking through the code again, and I'll dig into Wrox C# Pro again to read up on the things you suggested.

And if there was more off, I'd gladly hear it honestly, making this stuff to learn from it myself and improve in the end.

Edit:
Updated to version 04172010, update pushed to SVN as well as to binaries download.



```
04172010 - Revision 3

- Introduced switch to ObjectManager to determine object type.
- Fixed (possible) stability risk in WowUnit.IsCritter (not tested!)
- Minor tweak to Descriptor reading, because Apoc's anal.
- ObjectManager.Pulse(); now handles exceptions and logs them.
```

----------


## MaiN

> ```
> field = field * 4;
> ```
> 
> 
> 
> ```
> field *= field;
> ```
> ...


Fail .

----------


## namreeb

> ```
> field = field * 4;
> ```
> 
> 
> 
> ```
> field *= 4;
> ```
> ...


Welcome to my world. +rep to you, sir, for the contribution (the op not apoc you tool)

----------


## l1nk3

Please don't call me a newb, I am very new to this.

What is the purpose for field *= field?

----------


## miceiken

> Please don't call me a newb, I am very new to this.


Self pwnage

----------


## l1nk3

> Self pwnage


Your immaturity is showing.

----------


## miceiken

> Your immaturity is showing.


newb = newbie = newbeginner
When you, in the same sentence say you are not a newbAND that you are new to this - how is it immature of me to state it?

----------


## SKU

> Please don't call me a *newb*, I am *very new* to this.
> 
> What is the purpose for field *= field?


_Newbie is a slang term for a newcomer or somebody inexperienced [...]_

Newbie - Wikipedia, the free encyclopedia

field *= 4 <=> field = field * 4

good job, seifer.

----------


## l1nk3

> newb = newbie = newbeginner
> When you, in the same sentence say you are not a newbAND that you are new to this - how is it immature of me to state it?



I never said I was not a newb, I asked nicely if you guys wouldn't call me a newb. And even if what you were saying was true, you said it in a very immature way.


[QUOTE=SKU;1855706]_Newbie is a slang term for a newcomer or somebody inexperienced [...]_

Newbie - Wikipedia, the free encyclopedia

field *= 4 <=> field = field * 4

good job, seifer.[/QUOTE

Newb is generally has a more negative connotation then newcomer.

And, I am well aware that field *= 4 is the equivalent to field = field * 4.

My actual question is:

What is the significance of field *= 4?

----------


## mnbvc

it multiplies the value of field by 4

----------


## l1nk3

> it multiplies the value of field by 4


Why?

(filler)

----------


## Apoc

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.

----------


## l1nk3

> 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.


Actually I have been searching quite a bit about the information that you dump and post.

I know it is against the rules to ask, but I couldn't find the answer, and nobody ever answers my posts in the questions sub-section. Thank you for answering though. +Rep

----------


## Apoc

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)

----------


## Cypher

> 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)


Pfft. You and your silly logic.

----------


## l1nk3

=( 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

----------


## WannaBeProgrammer

Download for the lib?

----------


## Seifer

> Download for the lib?


The download for the library is at the bottom of the OP. It's in ninja colors (white), so you have to put some effort into finding it!

(src compiles out of the box too, so if you want to go for that and have a look thorugh it, be my guest)

----------


## l1nk3

> The download for the library is at the bottom of the OP. It's in ninja colors (white), so you have to put some effort into finding it!
> 
> (src compiles out of the box too, so if you want to go for that and have a look thorugh it, be my guest)


Hey, is it me, or is it not grabbing all the objects in either revisions?

Not sure if I am right or wrong, would love some guidance.

----------


## Seifer

> Hey, is it me, or is it not grabbing all the objects in either revisions?
> 
> Not sure if I am right or wrong, would love some guidance.


Correct:



```
    public enum WoWObjectType : uint
    {
        Object = 0,
        Item = 1,
        Container = 2,
        Unit = 3,
        Player = 4,
        GameObject = 5,
        DynamicObject = 6,
        Corpse = 7,
        AiGroup = 8,
        AreaTrigger = 9
    }
```

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)

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.

----------


## l1nk3

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

----------


## Robske

> 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)


And I doubt you'll ever see either one in the objectmanager  :Smile:

----------


## Seifer

> And I doubt you'll ever see either one in the objectmanager


Good point. :P




> 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


I don't know if you have taken a look at the code, but I'll give you a pointer:


```
foreach (WowObject obj in ObjectManager.Objects)
            {
                lst_Objects.Items.Add(string.Format("GUID: {0} | Entry: {1}", obj.GUID, obj.Entry));
            }
```

And in ObjectManager.cs:


```
if (currentObject.Type == (int)Offsets.WowObjectType.Player)
                    Objects.Add(new WowPlayer(currentObject.BaseAddress));
```

Try


```
foreach (WowPlayer obj in ObjectManager.Objects)
{ // Do something.
}
```

If that doesn't work, I'll take a closer look, but I am pretty positive it does.

// Edit
public class WowPlayer : WowUnit

----------


## Robske

```
            if (Objects.Count != int.MinValue)
                Objects.Clear(); // Clean up any previous objects in the list, if we have them.
```


First wat



```
field *= field; // He's anal.
```

Second wat



```
get { return GetStorageField<int>((uint)Offsets.WowObjectFields.OBJECT_FIELD_TYPE); }
```

In conjuction with


```
                    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;
                    }
```

Is not going to work.

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.

----------


## MaiN

> ```
> field *= field; // He's anal.
> ```
> 
> Second wat


This was because of Apoc's fail (he ninja-edited it away, but I quoted it like 4 posts ago!).

----------


## Seifer

Thanks for pointing that silly mistake out Robske, I'll fix it in the upcoming revision.

I used to read the Type that way, but in the habit of using the descriptors I blatantly wrote that out, without double checking it (or even thinking about it) at all.

Same stuff with the int.MinValue, for some reason I assumed the min value of an int is 0, but I think I mixed it up with uint.MinValue (which actually is 0, int.MinValue is something like -2 million?). Thanks for pointing out the sloppy (and often noobish) mistakes.  :Smile:

----------


## l1nk3

Yay!

(filler)

----------


## Seifer

BlackRain updated to 04192010. The objects are now properly loaded and handled, so you should be able to find all objects and their respective types. 

I noticed only now that I haven't added X,Y,Z to units yet, so that's on the to-do list for the next revision. I should manage my shit a bit more properly, honestly.

----------


## l1nk3

I am not sure why, but I love your naming conventions.

:O

Except for WowDynamicObject.

lol.

----------


## Seifer

> I am not sure why, but I love your naming conventions.
> 
> :O
> 
> Except for WowDynamicObject.
> 
> lol.


That's what they're called, can't help it.

The only naming I dislike is the double encapsulated ID's, which ReSharper doesn't agree on either.

----------


## Seifer

Updated to 1.0a, 04222010. This is the first release where I'm confident enough to say it's stable. At least, the majority of it, but more on that later on.

Anyway, changelog:



> 04222010 - Revision 9
> 
> - Added X,Y,Z to WowObject and an override on WowGameObject.
> - Rough functionality for Object searching introduced, unstable, and needs testing/fixing.


The object searching is based on Apoc's method, which works like a charm. The only thing is that, with the introduction of C# 4.0, we're now able to take optional parameters instead of overloads, so I'll be working on getting the object searching to work with C# 4.0 standards, rather than using overloads.

Stuff like:


```
/// <summary>
        /// Refreshes the Object Search.
        /// </summary>
        /// <param name="parameters"></param>
        public void Refresh([Optional, DefaultParameterValue(null)]SearchParams @parameters)
        {
            List<T> list = (@parameters == null) ? _objectList = DoSearch<T>(ObjectManager.Objects, Parameters) : _objectList = DoSearch<T>(ObjectManager.Objects, parameters);
        }
```

Is way too sloppy and poor written to call it stable, therefore this is an "alpha" release, if you will. I'm also working on making the entire DoSearch() method use LINQ rather than a foreach statement in the end, but that hasn't worked out too well either.

Anyway, it (finally) has X,Y,Z working now, for WowObject in general, and an override for GameObject (since they're different), so you should be able to get some sort of tool going with it now.

Oh and Apoc, in your post regarding Object Searching, you search for object specific stuff in WowObject, such as level, health (IsDead) etc. do you actually keep these values in WowObject, or do you pass it - for example - WowUnit? Can't imagine the latter, since you'd end up with null results in the LINQ statement for several objects. Can you clarify this? (Couldn't post in that thread because of necro protection)

Updated binaries and SVN.

----------


## Apoc

> Updated to 1.0a, 04222010. This is the first release where I'm confident enough to say it's stable. At least, the majority of it, but more on that later on.
> 
> Anyway, changelog:
> 
> 
> The object searching is based on Apoc's method, which works like a charm. The only thing is that, with the introduction of C# 4.0, we're now able to take optional parameters instead of overloads, so I'll be working on getting the object searching to work with C# 4.0 standards, rather than using overloads.
> 
> Stuff like:
> 
> ...


I actually ditched the entire 'object searching' method, in favor of (faster) LINQ queries.

Eg:



```
                possibleTargets = (from o in OnyxWoW.ObjectList
                                   where o is WoWUnit &&
                                         o != OnyxWoW.Me &&
                                         o.Distance <= AreaManager.CurrentArea.TargetingRange &&
                                         o.Position.Distance(AreaManager.CurrentHotspot.Position) <= AreaManager.CurrentHotspot.Range
                                   let u = o.ToUnit()
                                   where !u.Dead &&
                                         !u.PvpFlagged &&
                                         u.Relation != WoWUnitRelation.Friendly &&
                                         u.CreatureType != WoWCreatureType.Critter &&
                                         !u.Tapped &&
                                         u.Level >= MinLevel &&
                                         u.Level <= MaxLevel &&
                                         !u.OnTaxi &&
                                         u.Attackable &&
                                         !AreaManager.CurrentArea.IgnoreFactions.Contains(u.Faction.Id)
                                   orderby o.Distance ascending
                                   select u).ToList();
```

Makes it easier to do very fast, easy to understand, searches.

Also; as a design pattern, nothing in our WoW library returns null unless specifically stated. (99% of the stuff has an 'IsValid' boolean, so you can always be sure whether or not the object is a valid reference or not.)

And our main ObjectList never contains invalid objects. (They are persistent though)

----------


## Opirity

isnt blackrain the crack in iphone? D:

----------


## Seifer

> I actually ditched the entire 'object searching' method, in favor of (faster) LINQ queries.
> 
> Eg:
> 
> 
> 
> ```
>                 possibleTargets = (from o in OnyxWoW.ObjectList
>                                    where o is WoWUnit &&
> ...


That's exactly what I was shooting for - Thanks!

So, for example; if I'm using the above LINQ statement, or the statement you had posted in the ObjectSearching post, where you were searching WoWObjects, and had a check for "bool IsDead" in the LINQ statement, you kept the IsDead property in your WowObject class? That got me a bit confused, as IsDead is not a valid property for all objects that inherit from WowObject, I believe.




> isnt blackrain the crack in iphone? D:


It is. Hence the "original naming"  :Wink: 
I felt like this stuff is - in some way, shape or form - similar to jailbraking an iphone, as we allow our own code to run on the WoW baseline (long shot, I know).

----------


## Robske

> So, for example; if I'm using the above LINQ statement, or the statement you had posted in the ObjectSearching post, where you were searching WoWObjects, and had a check for "bool IsDead" in the LINQ statement, you kept the IsDead property in your WowObject class? That got me a bit confused, as IsDead is not a valid property for all objects that inherit from WowObject, I believe.


let u = o.ToUnit()

----------


## Kryso

> That's exactly what I was shooting for - Thanks!
> 
> So, for example; if I'm using the above LINQ statement, or the statement you had posted in the ObjectSearching post, where you were searching WoWObjects, and had a check for "bool IsDead" in the LINQ statement, you kept the IsDead property in your WowObject class? That got me a bit confused, as IsDead is not a valid property for all objects that inherit from WowObject, I believe.


Walkthrough: Writing Queries in C# (LINQ) - let keyword




> possibleTargets = (from o in OnyxWoW.ObjectList
> where o is WoWUnit &&
> o != OnyxWoW.Me &&
> o.Distance <= AreaManager.CurrentArea.TargetingRange &&
> o.Position.Distance(AreaManager.CurrentHotspot.Position) <= AreaManager.CurrentHotspot.Range
> *let u = o.ToUnit()*
> where !u.Dead &&
> !u.PvpFlagged &&
> u.Relation != WoWUnitRelation.Friendly &&
> ...


edit: damn, too slow

----------


## Seifer

> let u = o.ToUnit()



Yes, I noted that in this post, but in the post over at:
http://www.mmowned.com/forums/progra...ml#post1596536

He has shown us a method like:


```
IEnumerable<WoWObject> filtered = from o in objects
where
                                                  Compare.Equal(searchParams.Name, o.Name) &&
                                                  Compare.Equal(searchParams.CanAttack, o.CanAttack) &&
                                                  Compare.Equal(searchParams.Dead, o.IsDead) &&
```

And call me a knob, but I can't see how it's converted to a unit there.

Which got me to believing that IsDead is actually a property of WowObject, unless I'm missing something obvious. (Which I probably am)

----------


## Jackedy129

I've copied and pasted your code exactly (apart from readonly, for somereason it won't compile with that there), yet am getting NullReferenceException errors when reading health, wow is open and logged in etc. Any chance of a heads up?



```
Process[] _wowProc = Process.GetProcessesByName("Wow");
int pid = _wowProc[0].Id; // Will grab the first WoW process found. (0th element)
ObjectManager.Initialize(pid);
int playerHealth = ObjectManager.Me.Health;
```

----------


## Robske

> Yes, I noted that in this post, but in the post over at:
> http://www.mmowned.com/forums/progra...ml#post1596536
> 
> He has shown us a method like:
> 
> 
> ```
> IEnumerable<WoWObject> filtered = from o in objects
> where
> ...


...

From the post:




> First things first, lets create some quick wrapper stuff to feed our searcher.
> 
> 
> 
> ```
> namespace ObjectSearcher
> {
>     public class WoWObject
>     {
> ...

----------


## [email protected]^^@!

> I actually ditched the entire 'object searching' method, in favor of (faster) LINQ queries.
> ---SNIP---


Apoc, isn't LINQ slower because the keywords used by LINQ are syntactic sugar for invoactions to a set of generic routines that iterates collections and filtering through lambda expressions, meaning less possibilities for optimization? I may very well be wrong though...

----------


## Seifer

> I've copied and pasted your code exactly (apart from readonly, for somereason it won't compile with that there), yet am getting NullReferenceException errors when reading health, wow is open and logged in etc. Any chance of a heads up?
> 
> 
> 
> ```
> Process[] _wowProc = Process.GetProcessesByName("Wow");
> int pid = _wowProc[0].Id; // Will grab the first WoW process found. (0th element)
> ObjectManager.Initialize(pid);
> int playerHealth = ObjectManager.Me.Health;
> ```


Which version are you using?




> ...
> 
> From the post:


Alright, I missed something obvious.

----------


## uliena1979

You need to populate ObjectManager.Me first.
You can do that with ObjectManager.Pulse()




> I've copied and pasted your code exactly (apart from readonly, for somereason it won't compile with that there), yet am getting NullReferenceException errors when reading health, wow is open and logged in etc. Any chance of a heads up?
> 
> 
> 
> ```
> Process[] _wowProc = Process.GetProcessesByName("Wow");
> int pid = _wowProc[0].Id; // Will grab the first WoW process found. (0th element)
> ObjectManager.Initialize(pid);
> int playerHealth = ObjectManager.Me.Health;
> ```

----------


## Jackedy129

Im using Pulse now and health comes out as -3753472532?? And using latest version.

----------


## Seifer

> Im using Pulse now and health comes out as -3753472532?? And using latest version.


You're right, it did initialize ObjectManage.Me, and populated it, but didn't read the descriptors appropriately. That has been fixed, and a new revision is up on the SVN and as a download, which should display your health properly:




> [23/04/2010 14:49:38] - Type: 4
> BaseAddress: 0x775334xxx
> GUID: 360287xxxx2076xxxx
> Health: 69
> Location: 1680.705,-4443.605,19.18787


And the testing code I used:



```
lst_Objects.Items.Add("Me Type: " + ObjectManager.Me.Type);
            lst_Objects.Items.Add(string.Format("Me BaseAddress: 0x{0:X}", ObjectManager.Me.BaseAddress));
            lst_Objects.Items.Add("Me GUID: " + ObjectManager.Me.GUID);
            lst_Objects.Items.Add(ObjectManager.Me.ToString());
            lst_Objects.Items.Add(ObjectManager.Me.Health);
```

The only problem I've run into is that when you foreach loop WowPlayer, it throws an exception about not being able to convert WowItem to WowPlayer. Yet have to find out where that originates.

Anyway, download the new lib/src and you should be going again.

----------


## Bananenbrot

As a sidenote, if you want to rely on Blackmagic, so might want to try the new 1.1 version with built-in asm support I think. Didn't test it, but API seems to be quite the same. Get it from GameDeception.com.
Sooner or later I would suggest to write your own memory implementation is a more Apoc-style with generics and IntPtr instead of uint addresses for some people on x64.
One big advantage of .net 4, and that was because I downloaded the VS 10 RC at that time, is, that IntPtr got the long awaited offset operator and .Add/Substract methods. While not affecting efficiency it is a gratification for my eyes to use


```
Memory.Read<IntPtr>(BaseAddress + 0x546548);
```

instead of something like


```
Memory.Read<IntPtr>(new IntPtr(BaseAddress.ToInt64() + 0x546548));
```

Great to see someone doing something for the beginners in this forum to get an insight into how to combine all that source snippets  :Smile: 

EDIT: Forget about what I said about the Blackmagic 1.1 and the fasm dependency. I just examined the project and I haven't noticed any changes.

----------


## Seifer

I might implement an IntPtr based memory library at a later point in time, but as of now, BlackMagic does its job perfectly. I'm based on an x64 system myself, and haven't had any trouble at all with BlackMagic, or fasm_managed.

Currently, I'm working on better and more detailed Exception handling, and logging. Thanks for the suggestion.  :Smile:

----------


## solttu

> The only problem I've run into is that when you foreach loop WowPlayer, it throws an exception about not being able to convert WowItem to WowPlayer. Yet have to find out where that originates.


It also throws an exception when I try to foreach loop WowGameObjects.

InvalidCastException was unhandled




> Unable to cast object of type 'BlackRain.Common.Objects.WowItem' to type 'BlackRain.Common.Objects.WowGameObject'.

----------


## Apoc

I already explained to seifer why it was throwing exceptions, and how to fix it.



```
foreach(var obj in ObjectList.OfType<WowPlayer>()) { DoStuff(); }
```

You can't convert a WoWItem to a WoWPlayer. Go read up on OOP, and how inheritance works.

----------


## Seifer

> I already explained to seifer why it was throwing exceptions, and how to fix it.
> 
> 
> 
> ```
> foreach(var obj in ObjectList.OfType<WowPlayer>()) { DoStuff(); }
> ```
> 
> You can't convert a WoWItem to a WoWPlayer. Go read up on OOP, and how inheritance works.



Correct, I've just been extremely lazy and haven't got around to updating it. I do plan on doing this sometime in the near future.

----------


## Seifer

Alright, I've been rate lazy and finally kicked my own bollocks into updating this again. Should've done it long ago, since Apoc just spoon-fed the solution, basically.

This update will fix the problem people had with the "Unable to cast object of type 'BlackRain.Common.Objects.WowItem' to type 'BlackRain.Common.Objects.WowGameObject'.".

Where we used to do:


```
foreach (WowPlayer obj in ObjectManager.Objects)
```

We now do:


```
foreach (WowPlayer obj in ObjectManager.Objects.OfType<WowPlayer>())
```

This requires the System.Linq reference in the file where you are calling the list, and the Type. 
Somewhere in the coming weeks I'll be kicking this rig up again, and use LINQ to get Object "Searching" done, and make this something proper and up to standards again.

Small push to the SVN to reflect these changes. Enjoy.

// Edit - No bins this time around, everything you need is on the SVN. If you want the "latest compiled binary", even though changes are extremely minimal; grab it from the SVN.

----------


## Bananenbrot

I'm doing it with a single query and mostly with named paramters.
The actual implementation is (needless to say) ugly, especially the prototype:


```
public static IEnumerable<T> Search<T>(int minLevel = int.MinValue, int maxLevel = int.MaxValue, int exactLevel = int.MaxValue, 
            bool? dead = null, bool? canAttack = null, bool lineOfSight = false, bool includeMe = true, string name = "",
            float minDistance = float.MinValue, float maxDistance = float.MaxValue, ulong guid = 0) 
            where T: WoWObject
        {
            if (guid != 0)
                return new T[] { GetObjectByGuid(guid) as T };

            var query = ObjectList.OfType<T>();

            if (exactLevel != int.MaxValue)
                query = query.Where(o => (o as WoWUnit).Level == exactLevel);
            else
            {
                if (minLevel != int.MinValue)
                    query = query.Where(o => (o as WoWUnit).Level >= minLevel);
                if (maxLevel != int.MinValue)
                    query = query.Where(o => (o as WoWUnit).Level <= maxLevel);
            }

            if (dead.HasValue)
                query = query.Where(o => (o as WoWUnit).IsDead == dead);
            if (canAttack.HasValue)
                query = query.Where(o => (o as WoWUnit).IsCritter == !canAttack);
            if (lineOfSight)
                query = query.Where(o => o.IsInLineOfSight);
            if (!includeMe)
                query = query.Where(o => !(o as WoWUnit).IsMe);

            if(minDistance != float.MinValue)
                query = query.Where(o => o.Distance(ObjectManager.Me) >= minDistance);
            if(maxDistance != float.MaxValue)
                query = query.Where(o => o.Distance(ObjectManager.Me) <= maxDistance);

            return query;
        }
```

Searching for an object boils down to something like:


```
var nextMob = ObjectManager.Search<WoWUnit>(
    minLevel: 1, 
    maxLevel: 3, 
    dead: false, 
    canAttack: true, 
    includeMe: false,
).OrderBy(u => u.Distance(ObjectManager.Me)).First();
```

----------


## ~Unknown~

Very nice work on the library. Few questions though. I'm just wondering why you aren't using a dictionary structure for your wow objects. I always thought it was a better data structure for that, but I could be mistaken. Also, have you planned on using locks in the manager at some point for use in multi-threaded applications?

----------


## Seifer

> Very nice work on the library. Few questions though. I'm just wondering why you aren't using a dictionary structure for your wow objects. I always thought it was a better data structure for that, but I could be mistaken. Also, have you planned on using locks in the manager at some point for use in multi-threaded applications?


Thanks. And I prefer lists over dictionaries, because I have no reason whatsoever to use the TKey, TValue structure, I just want a list of my objects and then use LINQ to search what I need, rather than Dictionary[index] and Dictionarty.ContainsKey stuff, which - in my opinion - is just rubbish. Feel free to use dictionaries for it, though. :P

And no, I don't plan to implement locks in the near future.

----------


## Kryso

I personally use Dictionary because in theory it should be faster than list when we are refreshing it, unless you are destroying and re-creating all objects in which case speed should be about the same.

----------


## ~Unknown~

> Thanks. And I prefer lists over dictionaries, because I have no reason whatsoever to use the TKey, TValue structure, I just want a list of my objects and then use LINQ to search what I need, rather than Dictionary[index] and Dictionarty.ContainsKey stuff, which - in my opinion - is just rubbish. Feel free to use dictionaries for it, though. :P
> 
> And no, I don't plan to implement locks in the near future.


Yea I figured it was just a preference. I don't care either way tbh. Using Lists can be considered easier for some.
Not that it would be your job to put in locks anyway. Whoever uses this should be smart enough to use them if they are using many threads anyway.
All in all though great work!  :Smile: 



> I personally use Dictionary because in theory it should be faster than list when we are refreshing it, unless you are destroying and re-creating all objects in which case speed should be about the same.


Yea in my implementation I use Dictionaries as well for that same reason. That's the only reason I asked, because I wasn't sure if I was right or not.

----------


## Apoc

Both collections use hashtables internally.

Dictionaries are faster depending on what you're doing. (Plus it's a direct lookup, instead of an iteration to look it up)

For things like storing objects by GUIDs, a dictionary is quite a bit faster than iterating a list each time.

----------


## Seifer

> Both collections use hashtables internally.
> 
> Dictionaries are faster depending on what you're doing. (Plus it's a direct lookup, instead of an iteration to look it up)
> 
> For things like storing objects by GUIDs, a dictionary is quite a bit faster than iterating a list each time.


If going with Dictionaries, is there a more efficient way to pull out the object rather than using myDictionary[indexGuid].Health? That got pretty tedious. (Talking about over a year ago, when I was completely new to this, so I probably missed something)

----------


## MaiN

> If going with Dictionaries, is there a more efficient way to pull out the object rather than using myDictionary[indexGuid].Health? That got pretty tedious. (Talking about over a year ago, when I was completely new to this, so I probably missed something)


 What are you talking about? It works exactly like a list except the indexer uses a hash code instead of an index.

----------


## Robske

> What are you talking about? It works exactly like a list except the indexer uses a hash code instead of an index.


If this is a reply to the List vs. Dictionary discussion, searching for a particular key in a Dictionary will be faster than iterating over a List. 

If memory serves searching for a particular key in a Dictionary will have a time complexity of O(1) in the best case, something you certainly can't realistically achieve with a List  :Smile:  (which was Apoc's point)

----------


## MaiN

> If this is a reply to the List vs. Dictionary discussion, searching for a particular key in a Dictionary will be faster than iterating over a List. 
> 
> If memory serves searching for a particular key in a Dictionary will have a time complexity of O(1) in the best case, something you certainly can't realistically achieve with a List  (which was Apoc's point)


 I know. I was talking about access of elements.

----------


## Grape

Extreamly usefull  :Big Grin: 
Is there gonna be a update for Unit names?

----------


## Jackedy129

My mistake...

----------


## Seifer

> Extreamly usefull 
> Is there gonna be a update for Unit names?


I'll likely put that in soon.  :Smile:

----------


## tarends

Hi all, 

Im quite new to C# so dont start flaming at the start. 

I have been exited to see a library like this here as i have been a user of many bots for a long time. And at this moment i am nearly dont with my study as web develloper so i know little about building classes etc. 

At the moment im just looking around with the library to see what things i can use and what everything does.

For somebody who did not found out. 

i wrote a small function to get the distance from the current toon to a certain position (X, Y, Z). 



```
public double distanceFromMe(float nX, float nY, float nZ)
        {
            return Math.Sqrt((Math.Pow((double)(ObjectManager.Me.X - nX), 2.0) + Math.Pow((double)(ObjectManager.Me.Y - nY), 2.0)) + Math.Pow((double)(ObjectManager.Me.Z - nZ), 2.0));
        }
```

Its just simple but im still learning etc. 

I was wondering if somebody like to share how he found out to get the name of a object. 
At this moment im looking for the names of a object with the type of 3. but i does not really matter as i think it will be the same with all objects.

----------


## Grape

*WowUnit.cs*



```
/// <summary>
/// The name of the unit.
/// </summary>
public string Name
{
     get { return ObjectManager.Memory.ReadASCIIString(ObjectManager.Memory.ReadUInt(ObjectManager.Memory.ReadUInt(BaseAddress + 0x964) + 0x5c), 24); }
}
```

----------


## eLaps

> *WowUnit.cs*


 Simpler using the object's vtable.
But that's not the topic and if someone isn't capable to find it by himself, he's not going to do much in this section (google with "site:mmowned.com keyword").

ps @MaiN below me: you must be right for that...... never tried out of process.

----------


## MaiN

> Simpler using the object's vtable.
> But that's not the topic and if someone isn't capable to find it by himself, he's not going to do much in this section (google with "site:mmowned.com keyword").


 Not when you are out of process......

----------


## Seifer

> i wrote a small function to get the distance from the current toon to a certain position (X, Y, Z). 
> 
> 
> 
> ```
> public double distanceFromMe(float nX, float nY, float nZ)
>         {
>             return Math.Sqrt((Math.Pow((double)(ObjectManager.Me.X - nX), 2.0) + Math.Pow((double)(ObjectManager.Me.Y - nY), 2.0)) + Math.Pow((double)(ObjectManager.Me.Z - nZ), 2.0));
>         }
> ...


Apoc posted a class called Point somewhere around the boards, which simplifies the math you are trying to do by a great deal. The class includes distance and the lot, I believe.

As for the name, the objects are all stored in ObjectManager.Objects, so looping like:


```
foreach (WowUnit obj in ObjectManager.Objects.OfType<WowUnit>()) {  }
```

And implementing what Grape posted below me, to call obj.Name should get you sorted.

----------


## DarkLinux

How important are the new updates from May 31? I hate to update the code and mess all my code I have added to it.

----------


## Seifer

> How important are the new updates from May 31? I hate to update the code and mess all my code I have added to it.


You don't have to, compile the BlackRain source to a binary, and set up a reference to it in your project.

To answer your question: very, very minor.

----------


## DarkLinux

Sounds good! Thanks!

----------


## Miivers

Hello.
First of all thanks for publishing your work. 

I would like to ask one thing. I use the namespaces you provided us with from the first post but for some reason I cant use "Process" to get the wow-process. I ma getting (The type or namespace name 'Process' could not be found (are you missing a using directive or an assembly reference?))

As fare as I can see "Process" is nowhere to find within "BlackRain" when I look in the object browser(Visual studio). Or am I totally lost here?

----------


## caytchen

Process is part of System.Diagnostics, so you are indeed missing a using directive  :Wink:

----------


## Miivers

Thanks!
It is going to be a long night for me tonight  :Cool:

----------


## Seifer

> Hello.
> First of all thanks for publishing your work. 
> 
> I would like to ask one thing. I use the namespaces you provided us with from the first post but for some reason I cant use "Process" to get the wow-process. I ma getting (The type or namespace name 'Process' could not be found (are you missing a using directive or an assembly reference?))
> 
> As fare as I can see "Process" is nowhere to find within "BlackRain" when I look in the object browser(Visual studio). Or am I totally lost here?


As caytchen already mentioned; you need the System.Diagnostics namespace for it.

And no, using the Object Browser the way to go around finding what's in which directive.

----------


## PunkGamer1021

Okay, flame if neccessary but a mineral vein / Herb would be considered what type of object? Looking for a way to generate a list of nearby nodes...

----------


## Seifer

> Okay, flame if neccessary but a mineral vein / Herb would be considered what type of object? Looking for a way to generate a list of nearby nodes...


GameObject. And if you're going to set up lists with them, set up a list with the Entry ID's of the herbs and mines, and check for them in the GameObject list. That way you only get herbs and veins, and not the other game objects.

----------


## PunkGamer1021

> GameObject. And if you're going to set up lists with them, set up a list with the Entry ID's of the herbs and mines, and check for them in the GameObject list. That way you only get herbs and veins, and not the other game objects.


Yeah, was going to add in the skill level of the node as well. Thank you for the help!

P.S. I already added it to the source I downloaded, but you should add something to check which class the player is, and mana/rage/etc. percentages as you have for the health.

----------


## Seifer

> Yeah, was going to add in the skill level of the node as well. Thank you for the help!
> 
> P.S. I already added it to the source I downloaded, but you should add something to check which class the player is, and mana/rage/etc. percentages as you have for the health.


Reported to the issues tracker:
Issue 3 - blackrainobjects - Maximum mana is maximum health - Project Hosting on Google Code

Thanks.

----------


## PunkGamer1021

Is there any kind of flag stored that determines whether the node is an herbalism or mining node? Other than looking for the EntryID, and comparing it to an XML file containing all of the Herb and Mineral node ID's? Thanks for any advice...

----------


## Cypher

> Is there any kind of flag stored that determines whether the node is an herbalism or mining node? Other than looking for the EntryID, and comparing it to an XML file containing all of the Herb and Mineral node ID's? Thanks for any advice...


ISXWoW used to use the model name. There's a virtual function in CGObject_C that returns the model string which you should be able to find and use easily.

You don't need to do a list of all model names or anything, they all have a prefix in their path which you can (ab)use for detection.

EDIT:

That being said, if you have the address of GetLockRec then the method Kynox proposed is much better.

----------


## kynox

> Is there any kind of flag stored that determines whether the node is an herbalism or mining node? Other than looking for the EntryID, and comparing it to an XML file containing all of the Herb and Mineral node ID's? Thanks for any advice...




```
        LockRec* pLockRec = pObject->GetGameObject()->GetLockRec();
        if ( pLockRec != nullptr )
        {
            int lockTypeIndex = pLockRec->Index[0];

            // If its not herbalism, and its not mining
            if ( lockTypeIndex != 2 && lockTypeIndex != 3 )
                return false;
        }
```

That should get you going.

----------


## DarkLinux

Hello,
So I am trying to use Black Rain To get a targets Health. With some help from -Ryuk- we came up with this,


```
        /// <summary>
        /// The Targets Health
        /// </summary>
        public virtual int TargetHealth
        {
            get
            {

                var GUID = GetStorageField<ulong>((uint)Offsets.WowPlayerFields.TargetGUID);
                return Memory.ReadInt(GUID + (uint)Offsets.WowUnitFields.UNIT_FIELD_BASE_HEALTH);
            }
        }
```

It does not work, so any ideas? It is something simple but I am just not seeing it. 
Thanks so much!

----------


## eLaps

> GUID + (uint)Offsets.WowUnitFields.UNIT_FIELD_BASE_HEALTH
> It is something simple but I am just not seeing it.


Each time you post it is for asking help about 2-line code, and you don't even get what is obviously and awfully wrong in these two lines.
It's like asking what is wrong in "3*3+3=-9".

----------


## DarkLinux

If your not going to help why post.

----------


## Evieh

Because spoonfeeding is so much better right? Learn to search, reading health has been covered so many times.

Hint: you're reading from the wrong place.

----------


## DarkLinux

See that is something I can work with, Info. I do not want you to spoon feed me. I am looking for help like that. Thanks!

----------


## Seifer

> See that is something I can work with, Info. I do not want you to spoon feed me. I am looking for help like that. Thanks!


Just use the Health property in WowUnit?



```
var target = (from o in ObjectManager.Objects
                         where o.GUID == ObjectManager.Me.Target
                         select o).FirstOrDefault();

var targetHealth = target.Health;
```

No need for the stuff you put up with.

----------


## tymezz

DarkLinux: Almost all of your questions I've seen you ask could have been resolved by you taking 20-30 minutes of your seemingly too precious time to either:

A) Read the first ~10 pages of a programming book to learn about data types
B) Understanding the classes/libraries you use.

Your first issue I tried helping you with was a misunderstanding of both, data types, and what methods of your memory class to use.
This issue, if you're using Seifer's "Blackrain" as a base, could have been solved by looking at the Unit class.. instead of copy pasting code from a random post. It was already available to you with no extra work required on your part.

I spent quite a bit of my time replying to you in PM and in another thread trying to help you UNDERSTAND and point out your logical errors. It's time you take the initiative to learn the basics!

----------


## DarkLinux

Sounds Good, I fell that I have a better idea of the community around this forum. You guys really stick with it. I'll stop with the stupid questions. 

-6 rep lol can you make it -100? it would be more funny. 

Thanks for the help!

----------


## Seifer

Figured I might as well give a heads-up in this thread; I'm currently working on BlackRain 1.2, which will most likely be the definitive version for this expansion pack.

BlackRain 1.2 comes with a few key features:
Access to 99% of all object fields.Easier object searching, though a built-in search class.XML DocumentationEnhanced logging.Support for LUA functions.

And by the last I mean it will include a variety of reversed LUA functions which allow for easy access to them through the Object Manager.

Hoping to get it out somewhere in the next week, and yes, it will be 3.3.5 compatible.

----------


## Seifer

A binary of version 1.2 has been uploaded to the repository. Code changes should be minimal compared to using 1.x.

Hope you'll enjoy the new features, and if you find any bugs, please report them to the issue tracker at:

Issues - blackrainobjects - Project Hosting on Google Code

Rather than in this thread. Enjoy.

----------


## DarkLinux

Nice work! Love the support for LUA functions. +Rep

----------


## Fearsoldier

Is it 3.3.5 compat? I'm initializing but I'm pretty much only able to read player guid, any variable I try to access within Me throws null exceptions.

EDIT: Nvm, forgot my pulse statement. However, when I try and pull the player's name it throws a "uInt Failed" exception, so maybe the address is wrong?

----------


## Seifer

> Is it 3.3.5 compat? I'm initializing but I'm pretty much only able to read player guid, any variable I try to access within Me throws null exceptions.
> 
> EDIT: Nvm, forgot my pulse statement. However, when I try and pull the player's name it throws a "uInt Failed" exception, so maybe the address is wrong?


EU hasn't been updated to 3.3.5 yet, so I haven't come around to updating it yet.

As for your question, the descriptors are out of date for sure, don't know about the stuff like names and such, but I'm pretty confident that'll be sorted when I update it to 3.3.5.

(You can still fetch the source off the SVN and update the descriptors yourself)

----------


## Fearsoldier

> EU hasn't been updated to 3.3.5 yet, so I haven't come around to updating it yet.
> 
> As for your question, the descriptors are out of date for sure, don't know about the stuff like names and such, but I'm pretty confident that'll be sorted when I update it to 3.3.5.
> 
> (You can still fetch the source off the SVN and update the descriptors yourself)


Ah, didn't realize you guys had the newest version up on svn, thought it was just compiled. It's only a few, I'll definitely do that. I'm trying to figure out a way to tell if the character is logged in. I think I'm just going to try and pull a variable like the characters name and catch any exceptions. That just seems like dirty coding to me.

----------


## Robske

> Ah, didn't realize you guys had the newest version up on svn, thought it was just compiled. It's only a few, I'll definitely do that. I'm trying to figure out a way to tell if the character is logged in. I think I'm just going to try and pull a variable like the characters name and catch any exceptions. That just seems like dirty coding to me.


Check for the presence of the localplayer('s GUID)

----------


## Seifer

> Ah, didn't realize you guys had the newest version up on svn, thought it was just compiled. It's only a few, I'll definitely do that. I'm trying to figure out a way to tell if the character is logged in. I think I'm just going to try and pull a variable like the characters name and catch any exceptions. That just seems like dirty coding to me.


There is a compiled version up on the Google Projects page, of both 1.2 and 1.1, as well as the entire source in the SVN repository.

I haven't had the chance to look into this stuff, and specifically 3.3.5, but over the past few patches, updating the descriptors proved to be sufficient.

----------


## Fearsoldier

> There is a compiled version up on the Google Projects page, of both 1.2 and 1.1, as well as the entire source in the SVN repository.
> 
> I haven't had the chance to look into this stuff, and specifically 3.3.5, but over the past few patches, updating the descriptors proved to be sufficient.


Absolutely, like I said I have no problem updating the descriptors, I just read some of the documentation wrong and thought you did not have the most recent source on the svn, and didn't bother to look.

Also, as for the player guid, it doesn't change as I log in and log out. If I start my program with a timer updating a label with the players guid, and I initialize when I'm logged out it starts with a 0 guid, and after I log in it stays at 0. But if I restart the program and initialize while I'm logged in it find the guid, just fine but also doesn't change when I log out. I also tried the pulse statement before I poll the guid, but it still doesn't update. Other than that it's working just fine right now.

----------


## Robske

> Also, as for the player guid, it doesn't change as I log in and log out. If I start my program with a timer updating a label with the players guid, and I initialize when I'm logged out it starts with a 0 guid, and after I log in it stays at 0. But if I restart the program and initialize while I'm logged in it find the guid, just fine but also doesn't change when I log out. I also tried the pulse statement before I poll the guid, but it still doesn't update. Other than that it's working just fine right now.


You are doing it wrong.

----------


## Fearsoldier

> You are doing it wrong.


In what way? The timer? Initialization? I'm not sure where.

----------


## Seifer

> Also, as for the player guid, it doesn't change as I log in and log out. If I start my program with a timer updating a label with the players guid, and I initialize when I'm logged out it starts with a 0 guid, and after I log in it stays at 0. But if I restart the program and initialize while I'm logged in it find the guid, just fine but also doesn't change when I log out. I also tried the pulse statement before I poll the guid, but it still doesn't update. Other than that it's working just fine right now.


 
Initialize when logged in, always worked for me.

----------


## Chinchy

> Initialize when logged in, always worked for me.


I just did a quick test, but initializing at the login screen then using Pulse() after zoning in seemed to supply a valid GUID. Not sure what his problem is.

----------


## Fearsoldier

You guys planning on releasing the source to 1.2 anytime soon? I'd love to use it with 3.3.5a but some of the descriptors don't work and I'd like to add some of my custom stuff.

----------


## Seifer

> You guys planning on releasing the source to 1.2 anytime soon? I'd love to use it with 3.3.5a but some of the descriptors don't work and I'd like to add some of my custom stuff.


Yes. The source of version 1.2 will be available on the SVN in the coming week. (between 14th of July and the 21st)

----------


## hmzdlh

Looking forward to the source code of version 1.2  :Smile:

----------


## spawnfestis

Is there any source to the Weather application?.. Would give people a fair amount of knowledge of how your library works.

edit;
Sorry, I found it.
http://code.google.com/p/blackrainob...eather/Main.cs

----------


## spawnfestis

Is there no implemention in BlackRain to read a target's Health and MaxHealth for example?
I can grab the Object.Level, Object.GUID for example, but here I was thinking Health and MaxHealth would also be? Am I wrong?..

I've used ObjectManager.Me.Health etc. to reach myself, and I got the GUID/BaseAddress of the monster, but now I want to attack it, so the health is necessary..

----------


## SKU

> Is there no implemention in BlackRain to read a target's Health and MaxHealth for example?
> I can grab the Object.Level, Object.GUID for example, but here I was thinking Health and MaxHealth would also be? Am I wrong?..
> 
> I've used ObjectManager.Me.Health etc. to reach myself, and I got the GUID/BaseAddress of the monster, but now I want to attack it, so the health is necessary..


Inheritance (object-oriented programming) - Wikipedia, the free encyclopedia

http://code.google.com/p/blackrainob...cts/WowUnit.cs

----------


## spawnfestis

> Inheritance (object-oriented programming) - Wikipedia, the free encyclopedia mother****er, do you speak it?


Don't worry. Solved it already.
Didn't know there was difference to Object and Unit, because I could find NPC's with Object. Anyway, it works now so.

---------- Post added 07-25-2010 at 01:30 AM ---------- Previous post was 07-24-2010 at 11:38 PM ----------

Okay, serious issue.
I am not able to find any kind of "write" methods in BlackRain.
And when I try to include BlackMagic (the other library) it says the following:
_"Error	1	The type 'Magic.BlackMagic' exists in both 'BlackRain.dll' and 'BlackMagic.dll'	WoWForm.cs	109	21	InsaneWoW"_

This is rather ****ed up, or am I missing something here?

----------


## ~Unknown~

While using the 1.2 beta I noticed BM Memory writing portion is not there anymore. Any plans of putting it back in?

----------


## spawnfestis

> While using the 1.2 beta I noticed BM Memory writing portion is not there anymore. Any plans of putting it back in?


So it's actually removed? Well that seems like a bitch considering I was going to use that for CTM. And now I don't even know why I started this project out with BlackRain at all, because I can't use BlackMagic too - only BlackRain, else they collide. (as you see in the posts above)

----------


## ~Unknown~

> So it's actually removed? Well that seems like a bitch considering I was going to use that for CTM. And now I don't even know why I started this project out with BlackRain at all, because I can't use BlackMagic too - only BlackRain, else they collide. (as you see in the posts above)


Yea. Unless I'm mistaken I was trying to do that same thing and all I could find was the memory reading. I wanted to use Blackrain so I didn't have to write my own object manager. xD

----------


## ctac_18

johnmoore's WoW-Object-Manager at master - GitHub
Object Manager + Source code 3.3.5
johnmoore's WoW-Radar at master - GitHub
Radar + source code 3.3.5

----------


## ~Unknown~

> johnmoore's WoW-Object-Manager at master - GitHub
> Object Manager + Source code 3.3.5
> johnmoore's WoW-Radar at master - GitHub
> Radar + source code 3.3.5


Well thank you sir! just the work I didn't want to have to write :P

----------


## Seifer

The source of version 1.2 is now available at the SVN, including support for 3.3.5. All systems should be working fine and dandy now, enjoy.

Binary download available as well:
http://code.google.com/p/blackrainob...0.rar&can=2&q=

Oh and, thanks to Nesox for a few parts of the code in it.

----------


## NiRd

After a bunch of years playing the game and doing lots of multiboxing I finaly got bored with that. I started to read up on mmowned to get into the memory reading and writing part of bots. Really love this framework since for me it is an easy way into making my first "bot" since C# is my nr. 1 love.

Thanks for the effort you and others have put in this framework. I know there are many others on this board that reserve +rep but since I use your framework for now this is where I start.

----------


## Seifer

> After a bunch of years playing the game and doing lots of multiboxing I finaly got bored with that. I started to read up on mmowned to get into the memory reading and writing part of bots. Really love this framework since for me it is an easy way into making my first "bot" since C# is my nr. 1 love.
> 
> Thanks for the effort you and others have put in this framework. I know there are many others on this board that reserve +rep but since I use your framework for now this is where I start.


Thanks for the support, and you're very welcome.  :Smile:

----------


## rafaelcn

I have some problem when i use ObjectManager
these is the code in ObjectManager.cs



```

public static void Initialize(int pID)
        {
             if (Initialized) // Nothing to do if we're already initialized.
                return;
             Memory = new BlackMagic(pID);
             try
            {
                var TLS =Memory.FindPattern(
                    "EB 02 33 C0 8B D 00 00 00 00 64 8B 15 00 00 00 00 8B 34 8A 8B D 00 00 00 00 89 81 00 00 00 00",
                        "xxxxxx????xxx????xxxxx????xx????");
                
                 if (TLS != uint.MaxValue)
                {
                    var ClientConnection = Memory.ReadUInt(Memory.ReadUInt(TLS + 0x16));
                    var ClientConnectionOffset = Memory.ReadUInt(TLS + 0x1C);
                    CurrentManager = Memory.ReadUInt(ClientConnection + ClientConnectionOffset);
                     PlayerGUID = Memory.ReadUInt64(CurrentManager + 0xC0); // Store the player's GUID.
                }
            }
            catch (Exception ex)
            {
                Logging.WriteException(Color.Red, ex);
            }
        } 


```

the line 
var TLS =Memory.FindPattern(
"EB 02 33 C0 8B D 00 00 00 00 64 8B 15 00 00 00 00 8B 34 8A 8B D 00 00 00 00 89 81 00 00 00 00",
"xxxxxx????xxx????xxxxx????xx????");

the Pattern "EB 02 33 C0 8B D 00 00 00 00 64 8B 15 00 00 00 00 8B 34 8A 8B D 00 00 00 00 89 81 00 00 00 00", How can I get the Pattern in wow.exe ver 3.1.3 .In china ,wow version is still 3.1.3,the lastversion of blackrain is for wow 3.3.5.

I just want to know how can I get the pattern what i need to find .

----------


## caytchen

Take a deep look at 0x7C0740 in the 3.1.3 client. Compare to 0x4d7750 from 3.3.5 and figure out what the code you pasted is searching for.

----------


## ~Unknown~

> The source of version 1.2 is now available at the SVN, including support for 3.3.5. All systems should be working fine and dandy now, enjoy.
> 
> Binary download available as well:
> BlackRain.1.2.0.1-335.12340.rar - blackrainobjects - BlackRain 1.2.0.1 - Project Hosting on Google Code
> 
> Oh and, thanks to Nesox for a few parts of the code in it.



Great work! Switched back to yours today. However, I'm getting Readuint failed when trying to call Me.Name I'm sure I've initialized and pulsed because I can read all the other player attributes fine. I'm guessing playernamecache pointer needs updated?

----------


## caytchen

> Great work! Switched back to yours today. However, I'm getting Readuint failed when trying to call Me.Name I'm sure I've initialized and pulsed because I can read all the other player attributes fine. I'm guessing playernamecache pointer needs updated?


Actually, they're fine. See quote:


```
.text:0072A275                 mov     esi, [esi+964h]
.text:0072A27B                 test    esi, esi
.text:0072A27D                 jz      short loc_72A24D
.text:0072A27F                 mov     eax, [esi+5Ch]
```

On the other hand, GetUnitName is one big function and it does a lot more than the code in BlackRain. Point is, go injected. Anyway, enough trolling this thread.

----------


## rafaelcn

> Take a deep look at 0x7C0740 in the 3.1.3 client. Compare to 0x4d7750 from 3.3.5 and figure out what the code you pasted is searching for.


thanks a lot. 
the code block is at 0x7C0660 in the 3.1.3 client.

----------


## barthen

Good job with this project Seifer. I think you have to learn a little more about svn repositories and branching because you're not using it well

----------


## Seifer

> Point is, go injected. Anyway, enough trolling this thread.


This thread is for those who don't want to go injected.  :Smile: 




> Good job with this project Seifer. I think you have to learn a little more about svn repositories and branching because you're not using it well


I just dump it there without any thought. Haven't put any effort into it being proper whatsoever. (I know I should :P)


Edit; tested and confirmed to be compatible with 3.3.5.

----------


## homer91

Thank for this awesome stuff!

----------


## Seifer

Will be updated as soon as I get around doing it. Also accepting community input and changes, freely PM me any working updated parts of BlackRain you have, and once tested they will be added to the SVN. 

I'll be making the first few changes to the ObjectManager and add relative address support.

----------


## ddebug

If people want BlackRain to work with 4.0.1, I released a *.diff (see attachment) that upgrades the latest revision (rev-07272010-v1.2.0.1) and gives it 4.0.1 compatibility. Enjoy.

So far, everything I've tested is working.

Thanks to everyone here for some of the updated descriptors and offsets.

BlackRain 4.x.zip

----------


## Seifer

BlackRain has been updated with Ddebug's patch, and thus has entered a beta stage for compatilibity with 4.0.1.

Revision 50 on the SVN: blackrainobjects - Project Hosting on Google Code
As always, use the Issue Tracker for any problems you may find: Issues - blackrainobjects - Project Hosting on Google Code

Reports through PM will not be reviewed as quickly as Issue Tracker ones!

Furthermore, greetings and credits fly out to everyone contributing in the 4.0 migration thread. It's thanks to their amazing work that you are able to use stuff like this from patch to patch.
Enjoy.

----------


## ddebug

BlackRain updated to revision 53.

Change log:



> + ADDED: Anti-thread racing code to prevent Pulse() from crashing BlackRain if invoked when previous instance was not finished processing
> + ADDED: New field in ObjectManager that stores the base address for the World of Warcraft process
> + ADDED: New class, 'WowPlayerMe.cs'. This class controls functions that you can only do with your current logged in character. With this class, new features were added:
> Money - Retrieves the amount of copper your character hasZone/SubZone - Retrieves string representing the zone of your character
> * FIXED: GetObjectsOfType. It now no longer returns 'Me' if the boolean 'includeMeIfFound' is set to false
> * FIXED: Name retrieval for Players is now working. This will no longer crash BlackRain.

----------


## snigelmannen

If you are adding money why not add a complete conversion on Copper > Silver > Gold

----------


## ddebug

You can always divide the copper result by 100 to get silver. Then divide by 100 more to get gold.

I didn't think it was necessary to write code for that  :Wink: .

----------


## DarkLinux

Anyone having problem attaching to wow? I am using BlackRain's Select Process and it will not Attach to wow. Any ideas why? I have looked it over about 100x in about 2-4 hours, still working on it and I still cant find the error. 

Code I am using,
SelectProcess.cs - blackrainobjects - Project Hosting on Google Code

I know that its skipping this part,


```
            if (cmb_Processes.SelectedIndex != 0 && _processes.Count != 0)
            {
                ObjectManager.Initialize(_processes[cmb_Processes.SelectedIndex].Id,
                _processes[cmb_Processes.SelectedIndex].MainModule.BaseAddress);
            }
```

So if I take out "!= 0" I get this error, 
Unhandled exception has occurred in your application.
Note all privilege or groups referenced are assigned to the caller.

Also should update 1st page on how to use ObjectManager.Initialize
Thanks for the help!

----------


## Seifer

> Unhandled exception has occurred in your application.
> Note all privilege or groups referenced are assigned to the caller.


Running Vista/7? If so; run as administrator.

----------


## DarkLinux

That worked! I did not think I had to do that. Before it did not need admin privileges. Anyways thanks for the help!

----------


## 2$mart4me

Great work Seifer!!
And thanks for your gentle nudge in the right direction on finding runestate and runetype. Rep+

----------


## blindkilla

I'm getting an error when trying to use this in my project.



```
Could not load file or assembly 'BlackRain, Version=1.2.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
```

Has anyone ran into this problem?

----------


## ddebug

> I'm getting an error when trying to use this in my project.
> 
> 
> 
> ```
> Could not load file or assembly 'BlackRain, Version=1.2.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
> ```
> 
> Has anyone ran into this problem?


Do you have BlackMagic.dll and fasm_managed.dll? These need to be referenced in BlackRain. 

That is probably why you are having an error. The 2 libraries that BlackRain uses to perform its work are not referenced correctly.

----------


## Seifer

Please confirm your project targets .NET 3.5, and x86.

----------


## snigelmannen

> You can always divide the copper result by 100 to get silver. Then divide by 100 more to get gold.
> 
> I didn't think it was necessary to write code for that .


 Well no, but when you were adding it, it would be simple just to add the conversion as the output  :Smile:

----------


## Seifer

Pushing an update to the SVN as well as a (beta) binary download to the Google Code page, which features the following changes:




> v1.3
> - Decentralized offsets in the ObjectManager.
> - Changed objPulse to be readonly.
> - Removed various unnecessary casts.
> - Added enum ObjectManager to Offsets.cs.
> - Introduced ObjectManager.Read<T> for static memory reading.
> - Introduced ObjectManager.ReadRelative<T> for dynamic memory reading.
> - Introduced ObjectManager.Write<T> for writing to memory.
> - ObjectManager.Initialize() now takes a Process and an int as an argument. The internal relative address is derived from this; and recommended is to provide a Process object.
> ...


Consider this a beta release. The changes made to the memory reading/writing part are significant, and are basically putting the traditional ObjectManager.Memory method out of the picture. This release does in fact address all previous issues known on the tracker, and in all honesty, it gets kind of boring without issues, so make sure to report any new ones you find!

Overall I think this is a step forward in quality and standards for this lib, and I hope everyone enjoys it! :-)

Regards

----------


## Jens

So are you moving away from BlackMagic or just building on top of it?

----------


## Seifer

> So are you moving away from BlackMagic or just building on top of it?


Right now we're wrapping it. However, in the not-so distant future we do plan to implement our own MemLib. By taking this step we make the change significantly easier when we decide to implement it.  :Smile:

----------


## sman

I've been slowly making a passive bot for myself and have come across some things that could help others that use this library

Below is some code that dumps the spell id's of every (default) binding on the action bars (so i can send the key to the warcraft window when the spell id i want to use is found)
(Offset for 4.0.1)



```
uint[,] actionbar = new uint[6,12];
for (uint a = 0; a <= 5; a++)
	for (uint b = 0; b <= 11; b++)
		actionbar[a, b] = ObjectManager.ReadRelative<uint>(0x9EE0D8 + 0x4 * b + 0x30 * a);
```

Below is some code that can find the current player's (or any player's) class (i used it for getting the correct spell rotation and showing the player's power) (this seems to be wrong as it returns as 8 for me which could just need an updated offset)

WowPlayer.cs 


```
public Offsets.WoWClass Class
{
	get
	{
		return (Offsets.WoWClass)System.BitConverter.GetBytes(GetStorageField<uint>((uint)Offsets.WowPlayerFields.PLAYER_FIELD_BYTES))[0];
	}
}
```

Offsets.cs


```
public enum WoWClass : uint
{
	None = 0,
	Warrior = 1,
	Paladin = 2,
	Hunter = 3,
	Rogue = 4,
	Priest = 5,
	DeathKnight = 6,
	Shaman = 7,
	Mage = 8,
	Warlock = 9,
	Druid = 11,
}
```

Originally from : http://www.mmowned.com/forums/world-...ml#post1957269

BTW thanks for the great library =]

----------


## ddebug

Latest revision implements 2 new features that I noticed people were requesting...




> + ADDED: Get Unit Class.
> + ADDED: Get Unit Race.

----------


## 2$mart4me

I believe your location information in your Offsets.cs needs to be updated.

In your code(Facing is actually Pitch):



```
        /// <summary>
          /// Memory locations specific to the WowObject type.
          /// </summary>
          public enum WowObject : uint
          {
              X = 0x880,
              Y = 0x884,
              Z = 0x888,
              GameObjectX = 0x110,
              GameObjectY = 0x114,
              GameObjectZ = 0x118,
              Facing = 0x894,
          }
```

It believe it should be (Facing and Pitch updated):



```
        /// <summary>
        /// Memory locations specific to the WowObject type.
        /// </summary>
        public enum WowObject : uint
        {
            X = 0x880,
            Y = 0x884,
            Z = 0x888,
            GameObjectX = 0x110,
            GameObjectY = 0x114,
            GameObjectZ = 0x118,
            Facing = 0x890,
            Pitch = 0x894,
        }
```

----------


## Fabolous1

Is BlackRain still being maintained and updated?

----------


## wiirgi

> Is BlackRain still being maintained and updated?


I doubt so :<

----------


## Fabio571

> Is BlackRain still being maintained and updated?


 Just update yourself the offsets and that's fine.

----------


## DarkLinux

Just use WRadar's BlackRain. They have an updated BlackRain.

http://www.mmowned.com/forums/world-...radar-wow.html

https://github.com/LaoArchAngel/WRadar

----------


## Seifer

> Is BlackRain still being maintained and updated?





> I doubt so :<


It is, but there's nothing to update apart offsets, which you can do yourself as well.

We do still update BlackRain, and if need be, I'll add stuff as it comes by.

----------


## Fabolous1

I have been messing with trying to return the Name of objects and players as a string, and can't seem to get it working no matter what I do. I'm using

This in WowUnit


```
        public virtual string Name
        {
            get
            {
                try
                {
                    return Magic.SMemory.ReadASCIIString((IntPtr)_wowProc[0].Id, Magic.SMemory.ReadUInt((IntPtr)_wowProc[0].Id, Magic.SMemory.ReadUInt((IntPtr)_wowProc[0].Id, BaseAddress + 0xA24) + 0x60), 40);
                }
                catch (Exception)
                {
                    return string.Empty;
                }
            }
        }
```

and WowGameObject


```
        public string Name
        {
            get
            {
                try
                {
                    return Magic.SMemory.ReadASCIIString((IntPtr)_wowProc[0].Id, Magic.SMemory.ReadUInt((IntPtr)_wowProc[0].Id, Magic.SMemory.ReadUInt((IntPtr)_wowProc[0].Id, BaseAddress + 0x1CC) + 0xB4), 40);
                }
                catch (Exception)
                {
                    return string.Empty;
                }
            }
        }
```

I can't even get it to just return the name for NPCs. I am using BlackMagic as a memory library and also have tried ReadUnicodeString too, still no results. These offsets are the most recent offsets

----------


## FenixTX2

This is pretty much what I used in 3.3.5
I can't say anything for certain but looking at your code I'd think that the offsets were wrong. 
Did you find them yourself? If not, can you provide a link to where you found them.



```
uint unitNameBaseOffset1 = 0x964,
uint unitNameBaseOffset2 = 0x5C,

uint pName1 =  ProcessManager.WowProcess.ReadUInt(ObjectPointer + unitNameBaseOffset1);               
uint pName2 =  ProcessManager.WowProcess.ReadUInt(pName1 + unitNameBaseOffset2);
return ProcessManager.WowProcess.ReadASCIIString(pName2,40);
```

----------


## Fabolous1

I got my offsets from the new 4.0.6:13623 info dump thread, more specifically:




> TOM_RUS: Thank you for always providing the IDA database!
> 
> Untested:
> 
> 
> ```
>         /// <summary>
>         ///   Updated for 4.0.6.13623
>         /// </summary>
> ...


The code I use was adapted to my Blackrain project from XRadar, trying to use how they returned their names.

When I run my program I get an error saying Unhandled exception has ocurred in your application, blablabla. Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

It stops listing the objects after my target when I try returning my targets name and gives that error.

----------


## Seifer

BlackRain's core has been updated to work with World of Warcraft 4.0.6. There are bound to be some things that don't work properly or are bugged; please report them to the issue tracker on our Google Code page.

There will - from now on - be a central page where you can always download the latest (and often, greatest) BlackRain package: blackrain world of warcraft 

Make sure to download the BlackRain package from there, launch World of Warcraft, log into your character, and then run rain.exe. Press make it rain, and if everything goes well, it should tell you BlackRain is functional. If it's not, then you don't want to use it. Really. Just wait for an update.

Have fun, and I hope the "new theme" tickles your geek nerve.

----------


## snigelmannen

Lulz @ the song, you don't this on a svn anymore?

Edit, found it...

----------


## Seifer

> Lulz @ the song, you don't this on a svn anymore?
> 
> Edit, found it...


It's still open-source.  :Smile:

----------


## souldipper

Hi,

I have a rather weird problem atm using BlackRain.

For some reason there are only some properties that display the correct values.
(Ex ObjectManager.Me.Location, ObjectManager.Me.Type, ObjectManager.Me.GUID, ..)
Hower most of the properties return the wrong information, including but not limited to: class, health, mana, level, mounted, ...

Using latest BlackRain with the correct WoW version
(rain.exe executes succesfully and tells me I'm ready to use BlackRain in my project)

Any suggestions how to solve this would be greatly appreciated.

----------


## snigelmannen

> Lulz @ the song, you don't this on a svn anymore?
> 
> Edit, found it...


 Ye I know, just that there was no link to the SVN on your new fancy website  :Wink: 

And I fail at spelling way to often.

----------


## Seifer

> Hi,
> 
> I have a rather weird problem atm using BlackRain.
> 
> For some reason there are only some properties that display the correct values.
> (Ex ObjectManager.Me.Location, ObjectManager.Me.Type, ObjectManager.Me.GUID, ..)
> Hower most of the properties return the wrong information, including but not limited to: class, health, mana, level, mounted, ...
> 
> Using latest BlackRain with the correct WoW version
> ...


Probably just a descriptor problem. I've not tested this revision of BlackRain beyond the launcher, simply because I haven't even had an active World of Warcraft account for over a year now.

However, there's a huge public thread that contains pretty much all offsets you could want per version, take a look at it, or even better - reverse them yourself. If you find something else being the cause, submit an issue on the Google Code SVN and I'll take a look at it. Or one of the other dead devs. Who knows.

----------


## m4ximus

found small bug in method below

public static T ReadRelative<T>(uint address) 


From:
case TypeCode.Int16:
 ret = Memory.ReadUShort(address);

case TypeCode.Single:
ret = Memory.ReadShort(MakeAbsolute(address));

To:
case TypeCode.Int16:
ret = Memory.ReadShort(address);

case TypeCode.Single:
ret = Memory.ReadFloat(MakeAbsolute(address));


additionally since the existing code for reading storage fields was not working i started to use the following methods:



```
 #region <Storage Field Methods>

        protected byte ReadStorageByte(uint field, uint pos)
        {
            var storage = ObjectManager.Read<uint>(BaseAddress + 0x08);
            return ObjectManager.Memory.ReadByte((storage + field) + pos);
        }

        protected int ReadStorageInt(uint field)
        {
            var storage = ObjectManager.Read<uint>(BaseAddress + 0x08);
            var result = ObjectManager.Memory.ReadInt(storage + field);
            return result;
        }

        protected uint ReadStorageUInt(uint field)
        {
            var storage = ObjectManager.Read<uint>(BaseAddress + 0x08);
            var result = ObjectManager.Memory.ReadUInt(storage + field);
            return result;
        }

        public ulong ReadStorageUInt64(uint field)
        {
            var storage = ObjectManager.Read<uint>(BaseAddress + 0x08);
            var result = ObjectManager.Memory.ReadUInt64(storage + field);
            return result;
        }

        #endregion
```

everythign seems to be reading correctly after the change is made o.O not sure why yet.

----------


## Seifer

Could pass on the Type parameter to Read<T> as in the following example:



```
protected T GetStorageField<T>(uint field) where T : struct
        {
            field *= 4;
            var descriptorStack = Manager.Read<uint>(BaseAddress + 0x8);

            return Manager.Read<T>(descriptorStack + field);
        }
```

If anyone could give that a go and report back their findings would be great, I've no active WoW account and don't plan to ever get one again, either.  :Smile:

----------


## TenshiSan

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using BlackRain.Common.Objects;
using BlackRain.Common;

namespace WindowsFormsApplication1
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            readonly Process[] _proc = Process.GetProcessesByName("Wow.exe");
            ObjectManager.Initialize(_proc);

            ObjectManager.Pulse;
            foreach (WowObject obj in ObjectManager.Objects)
            {
                 lst_Objects.Items.Add(string.Format("GUID: {0} | Entry: {1} | Type: {2}", obj.GUID, obj.Entry, obj.Type));
            }
        }
    }
}
```

------ Build started: Project: WindowsFormsApplication1, Configuration: Debug x86 ------
C:\Users\Simon\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs(18,13 ): error CS0106: The modifier 'readonly' is not valid for this item

----------


## miceiken

Are you for real? Learn to code a language before you step into memory editing.

----------


## [email protected]^^@!

> ```
> using System;
> using System.Collections.Generic;
> using System.Linq;
> using System.Windows.Forms;
> using BlackRain.Common.Objects;
> using BlackRain.Common;
> 
> namespace WindowsFormsApplication1
> ...



Oh my........

----------


## Sychotix

That's not even something you need to know coding to understand. It tells you exactly what and where the problem is.

----------


## lollollol1

Hello gais! I don't get how to use this for example if i want to get the information from the fishing bobber to se if it has moved(a fish is hooked).

Would be awesome if someone could help me out here^^ 

///lollollol1

----------


## miceiken

> Hello gais! I don't get how to use this for example if i want to get the information from the fishing bobber to se if it has moved(a fish is hooked).
> 
> Would be awesome if someone could help me out here^^ 
> 
> ///lollollol1


Maybe because it contains nothing about it?

----------


## ~Unknown~

> Hello gais! I don't get how to use this for example if i want to get the information from the fishing bobber to se if it has moved(a fish is hooked).
> 
> Would be awesome if someone could help me out here^^ 
> 
> ///lollollol1


In addition to what mic said, I believe this library isn't updated for the newest patch anyway.

----------


## lollollol1

Ohh okey i'll guess i have to learn some more about it then ^^ Thanks for your answere! :Smile:

----------


## Seifer

> In addition to what mic said, I believe this library isn't updated for the newest patch anyway.


You only need to update the descriptor indices and update it to look for them at 0xC. Along with a copy/paste from the info dump for the offsets and you're good to go. Nothing major has changed ever since I last updated this. Anyway, there are some spin-offs of BlackRain in several other projects which do contain up-to-date copies of the library. You may want to take a look at those.

----------


## DarkLinux

Seifer! Your Alive! Still Retired?

----------


## Seifer

> Seifer! Your Alive! Still Retired?


Sort of. I'm working on other games than World of Warcraft.  :Smile: 

I might check back here occasionally and perhaps even write a thing or two if I'm in the mood. Probably won't be an update to BlackRain in all honesty, but perhaps something more powerful.

----------


## ~Unknown~

> You only need to update the descriptor indices and update it to look for them at 0xC. Along with a copy/paste from the info dump for the offsets and you're good to go. Nothing major has changed ever since I last updated this. Anyway, there are some spin-offs of BlackRain in several other projects which do contain up-to-date copies of the library. You may want to take a look at those.


Yeah, I personally still use blackrain for a couple of my projects. I was just letting that poster know it wasn't updated. If only I wasn't so lazy and I would just use EnumVisibleObjects....

----------


## Seifer

> Yeah, I personally still use blackrain for a couple of my projects. I was just letting that poster know it wasn't updated. If only I wasn't so lazy and I would just use EnumVisibleObjects....


If you have an up-to-date version and your code is clean (by my standards), get in touch and I might give you SVN access. Keeping BlackRain alive as a community project with quality committers is an interesting option.

----------


## Fredi83

Awesome code, thanks!

Would you think about moving it to Github?

----------


## ~Unknown~

> If you have an up-to-date version and your code is clean (by my standards), get in touch and I might give you SVN access. Keeping BlackRain alive as a community project with quality committers is an interesting option.


Yea, when I get some time I'll make a separate project for it and make sure I've made it public code quality. iirc it mostly was just changing offsets. I'll let you know if/when I get around to it.

----------


## hesa2020

I really need a version updated with the latest offsets i have try 3 time changing all offsets.
If you can please give me a updated version for 15595 it will be awesome !!! thank you very much.  :Wink:

----------


## hankerspace

Hi,
I'm a new wow-memory developper and i really want to up BlackRain to date (5.0.5).
I'm working on the new offsets, when my realease work, i'll upload it for ownedcore.

----------


## Shadowhunter12

> Hi,
> I'm a new wow-memory developper and i really want to up BlackRain to date (5.0.5).
> I'm working on the new offsets, when my realease work, i'll upload it for ownedcore.


Hey there,

I'd be interested to see how you made out. I'd be willing to assist too.

-Shadow

----------


## blackpercy

Does anyone have offsets for wow 1.12.1?

----------


## ~Unknown~

> Does anyone have offsets for wow 1.12.1?


http://www.ownedcore.com/forums/worl...mp-thread.html

----------


## mazer

sorry for necroing this thread...
from the description it seems to be a nice little library for starting small stuff, without the hassle to write my own objmgr.

someone willing to update this to the current wow version?
cause i'm a lazy **** and won't do it myself.

maybe even with findpattern or external xml file for offsets

even willing to pay teh paypal moneyz (for working dll and source, pm me)



maybe there are some other ready to use and easy to implement libraries out there, that i didn't find.
would appreciate any hint.

----------


## JuJuBoSc

Come on it's 10min max to update

----------


## miceiken

> someone willing to update this to the current wow version?
> cause i'm a lazy **** and won't do it myself.


Please. Do us all a favor and leave. No begging in this forum section, read the rules. Noone is gonna spoonfeed you whatsoever.

----------


## mazer

@JuJuBoSc
nah, tried it for ~1h and gave up, but i'm on it again

@miceiken
sorry... didn't know that asking for an update of existing code is begging or even spoonfeeding. no need to be harsh.
i'm lazy because i'm not able to do this easily by myself.


as stated, im on it. had to look up how to debug a dll project and set it all up (never done this before) and how to find the actual exceptions.
should this end with success, i'll upload the code and link it here.

----------


## mazer

small update. after a quite long night, i got most stuff working again. getting player names, updated descriptors etc. also added some new stuff.
the last things to do are unitflags and figuring out how the power system works. (energy, focus...)

i also wrote seifer, that i am updating his lib.
i'm on vacation this week, so can't get it done the next days, but will upload it once done.

cheers

----------


## wowsc4p3

> Come on it's 10min max to update


As I recall, the method to determine object names has changed significantly.

----------


## mazer

> As I recall, the method to determine object names has changed significantly.


Yeah it did (player names), but i've figured out how to do it. Gonna release the updated version next week. Still have to fix some parts.

----------


## Seifer

Moved to GitHub as it may still be somewhat relevant even though it hasn't been updated for quite a while. Mainly educational purposes.

----------

