[C#][Source] BlackRain - Simple Object Manager Library menu

User Tag List

Page 1 of 14 12345 ... LastLast
Results 1 to 15 of 196
  1. #1
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C#][Source] BlackRain - Simple Object Manager Library

    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:
    Code:
    using BlackRain.Common.Objects;
    using BlackRain.Common;
    Obtain the process of World of Wacraft:
    Code:
    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:
    Code:
    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:
    Code:
    int playerHealth = ObjectManager.Me.Health;
    But also access the memory of the WoW process the ObjectManager is attached to:
    Code:
    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.
    Last edited by Seifer; 04-08-2015 at 03:02 PM. Reason: Moved to GitHub

    [C#][Source] BlackRain - Simple Object Manager Library
  2. #2
    Danne206's Avatar Contributor
    Reputation
    183
    Join Date
    Jan 2008
    Posts
    717
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will take a look - thanks for sharing this!
    Dahnniel [DOT] s [AT] gmail [DOT] com

  3. #3
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Danne206 View Post
    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.

  4. #4
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see bins, no src!

    I shall wait to criticize you perhaps...

    Edit: Didn't see the link. Silly ninja colors...
    Last edited by Apoc; 04-16-2010 at 05:24 PM.

  5. #5
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    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.

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Few things

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

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

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

    Code:
    field = field * 4;
    Code:
    field *= 4;
    Yes, I'm anal.

    Code:
            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)
    Last edited by Apoc; 04-17-2010 at 07:35 AM.

  7. #7
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

    Code:
    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.
    Last edited by Seifer; 04-17-2010 at 05:52 AM.

  8. #8
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Code:
    field = field * 4;
    Code:
    field *= field;
    Yes, I'm anal.
    Fail .
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  9. #9
    namreeb's Avatar Legendary

    Reputation
    658
    Join Date
    Sep 2008
    Posts
    1,023
    Thanks G/R
    7/215
    Trade Feedback
    0 (0%)
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Code:
    field = field * 4;
    Code:
    field *= 4;
    Yes, I'm anal.
    Welcome to my world. +rep to you, sir, for the contribution (the op not apoc you tool)

  10. #10
    l1nk3's Avatar Active Member
    Reputation
    25
    Join Date
    Feb 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please don't call me a newb, I am very new to this.

    What is the purpose for field *= field?

  11. #11
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by l1nk3 View Post
    Please don't call me a newb, I am very new to this.
    Self pwnage

  12. #12
    l1nk3's Avatar Active Member
    Reputation
    25
    Join Date
    Feb 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by miceiken View Post
    Self pwnage
    Your immaturity is showing.

  13. #13
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by l1nk3 View Post
    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?

  14. #14
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by l1nk3 View Post
    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.
    Last edited by SKU; 04-17-2010 at 03:23 PM.

  15. #15
    l1nk3's Avatar Active Member
    Reputation
    25
    Join Date
    Feb 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by miceiken View Post
    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?

Page 1 of 14 12345 ... LastLast

Similar Threads

  1. [C#][Source] Radar and Object Manager Tester / Verifier
    By xochi in forum WoW Memory Editing
    Replies: 18
    Last Post: 01-08-2011, 02:04 AM
  2. [Source] WPF Wow Object manager
    By !@^^@! in forum WoW Memory Editing
    Replies: 11
    Last Post: 01-26-2010, 04:13 PM
  3. Mobs missing from object manager.
    By RawrSnarl in forum WoW Memory Editing
    Replies: 23
    Last Post: 12-31-2008, 01:31 PM
  4. Object Manager
    By Shamun in forum WoW Memory Editing
    Replies: 11
    Last Post: 11-28-2008, 02:06 PM
  5. WoW Object Manager ?
    By discorly in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 07-28-2007, 06:34 PM
All times are GMT -5. The time now is 02:15 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search