Problem reading player(s)/units/objects and positions in 7.0.3.22566  (64 bit) menu

User Tag List

Results 1 to 1 of 1
  1. #1
    kajko's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    48
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem reading player(s)/units/objects and positions in 7.0.3.22566 (64 bit)

    Hi,

    I have problem reading player(s)/units/objects and their positions on 64 bit. Maybe some1 can see what I did wrong:

    Here is my defs and structs:

    Code:
    #define WOW_ENTITYLIST 0x1575E10
    #define WOW_FIRSTOBJ 0x18
    #define WOW_NEXTOBJ 0x70
    #define WOW_OBJTYPE 0x20
    #define WOW_OBJDESCRIPTOR 0x08
    
    // player
    #define WOW_UNITPOSOFFSET 0x15A8
    #define WOW_UNITCASTING	0x1CB4
    #define WOW_OBJPOSOFFSET 0x0228
    
    typedef struct _WGUID 
    {
    	__int64 a;
    	__int64 b;
    } WOWGUID;
    
    	struct Position
    	{
    		float m_x;
    		float m_y;
    		float m_z;
    		float m_dummy;	// not used
    		float m_angle;
    	};
    
    struct WOWObject
    {
    	struct
    	{
    		struct _CGObjectData
    		{
    			WOWGUID Guid;				
    			WOWGUID Data;			
    			unsigned int Type;			
    			unsigned int EntryID;		       
    			unsigned int DynamicFlags;	
    			unsigned int Scale;			
    		} CGObjectData;
    
    		union MyUnion2
    		{
    			struct _CGItemData
    			{
    				WOWGUID Owner;	  
    				WOWGUID ContainedIn;	
    				WOWGUID Creator;	  
    				WOWGUID GiftCreator;	
    				unsigned int StackCount;	
                                // ...
    			} CGItemData;
    
    			struct _CGUnitData
    			{
    				WOWGUID Charm;	 
    				WOWGUID Summon;	 
    				WOWGUID Critter;	  
    				WOWGUID CharmedBy;	  
    				WOWGUID SummonedBy;	  
                               // ...
    			} CGUnitData;
    
    			struct _CGGameObjectData
    			{
    				WOWGUID CreatedBy;	 
    				unsigned int DisplayID;	 
    				unsigned int Flags;	  
                               // ...
    			} CGGameObjectData;
    
    
    		} supData;
    
    	} m_data;
    and here is the code snippet:

    Code:
    	BYTE* Manager::FirstObj(void)
    	{
    		return  m_pMemMan->Read<BYTE*>(m_pMemMan->Read<BYTE*>(m_pMemMan->dwBaseAddress + WOW_ENTITYLIST) + WOW_FIRSTOBJ);
    	}
    
    	BYTE* Manager::NextObj(BYTE* unitAddress)
    	{
    		return  m_pMemMan->Read<BYTE*>(unitAddress + WOW_NEXTOBJ);
    	}
    
    	bool Manager::GetObject(WOWGUID wgd, WOWObject& current)
    	{
    		BYTE* curObj;
    
    		curObj = FirstObj();
    		while (curObj != 0 && ((unsigned int)curObj & 1) == 0)
    		{
    			Fill(curObj, current);
    			if (wgd == current.m_data.CGObjectData.Guid)
    				return true;
    
    			curObj = NextObj(curObj);
    		}
    
    		return false;
    	}
    
    	void Manager::Fill(BYTE* objAddress, WOWObject& obj)
    	{
    		obj.address = objAddress;
    		obj.type = m_pMemMan->Read<unsigned char>(objAddress + WOW_OBJTYPE);
    		obj.descriptors = m_pMemMan->Read<BYTE*>(objAddress + WOW_OBJDESCRIPTOR);
    		m_pMemMan->Read(obj.descriptors, (BYTE*)&obj.m_data, sizeof(obj.m_data));
    		
    		switch (obj.type)
    		{
    		case WOW_PLAYER:;
    		case WOW_UNIT:
    		{
    			m_pMemMan->Read(objAddress + WOW_UNITPOSOFFSET, obj.pos, sizeof(Position));
    			BYTE cst;
    			m_pMemMan->Read(objAddress + WOW_UNITCASTING, &cst, sizeof(cst));
    			if (cst)
    				obj.bCasting = true;
    			else
    			{
    
    			}
    				obj.bCasting = false;
    		}
    		break;
    		case WOW_OBJ:;
    			m_pMemMan->Read(objAddress + WOW_OBJPOSOFFSET, obj.pos, sizeof(Position));
    			BYTE bob;
    			m_pMemMan->Read(objAddress + ObjectBobbing, &bob, sizeof(bob));
    			obj.bBobbing = ( bob ? true : false );
    			break;
    		}
    
    		// in combat
    		obj.bInCombat = (obj.m_data.supData.CGUnitData.Flags & UNIT_FLAG_IN_COMBAT ? true : false);
    		obj.bSkinable = (obj.m_data.supData.CGUnitData.Flags & UNIT_FLAG_SKINNABLE ? true : false);
    
    		obj.bTaggedByMe = false;
    		if ((obj.m_data.CGObjectData.DynamicFlags & 2) == 2)
    		{
    			obj.bLootable = true;
    			obj.bTaggedByMe = true;
    		}
    		else
    			obj.bLootable = false;
    
    		if ((obj.m_data.CGObjectData.DynamicFlags & 16) == 16)
    			obj.bTaggedByMe = true;
    
    	}
    
    	bool Manager::GetObject(WOWGUID wgd, WOWObject& current)
    	{
    		BYTE* curObj;
    
    		curObj = FirstObj();
    		while (curObj != 0 && ((unsigned int)curObj & 1) == 0)
    		{
    			Fill(curObj, current);
    			if (wgd == current.m_data.CGObjectData.Guid)
    				return true;
    
    			curObj = NextObj(curObj);
    		}
    
    		return false;
    	}
    and example of usage:

    Code:
    		WOWObject target;
    		getManager()->GetObject(m_guidTarget, target);

    Problem reading player(s)/units/objects and positions in 7.0.3.22566  (64 bit)

Similar Threads

  1. How to get a spell Object's target and position?
    By demonguy in forum WoW Memory Editing
    Replies: 24
    Last Post: 05-29-2012, 11:39 PM
  2. Replies: 26
    Last Post: 09-08-2007, 12:43 PM
  3. Guild Wars Problem! (READ!)
    By XaVe in forum Gaming Chat
    Replies: 20
    Last Post: 09-03-2007, 08:50 PM
  4. World of Warcraft Player ownd by Mommy and Lacrosse lol
    By rageelf in forum Community Chat
    Replies: 3
    Last Post: 08-22-2007, 12:56 PM
  5. OMFG! Big Acc Scam Problem! READ THIS!
    By Jones4ever in forum World of Warcraft General
    Replies: 23
    Last Post: 02-06-2007, 10:57 PM
All times are GMT -5. The time now is 03:39 AM. 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