ActivePlayers object disapearing menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Tambel's Avatar Member
    Reputation
    6
    Join Date
    Nov 2013
    Posts
    36
    Thanks G/R
    5/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ActivePlayers object disapearing

    Hi All.

    In this code, im sorting out objects (units and players)
    Code:
    unsigned  ObjectManager::GetAllVisibleObjects()
    {
    	unsigned curObj;
    	curObj=ProcessWorker::ReadUInt(baseAddress+0x0D8);
    	int c=0;
    	while ((curObj!=0) && (curObj & 1)==0)
    	{
    		curObj=ProcessWorker::ReadUInt(curObj+0x03C);
    		WowObject wo=WowObject(curObj);
    		if (wo.GetType()==3)
    		{
    			WowUnit wu=WowUnit(curObj);
    			wchar_t * name=wu.GetName();
    			wprintf(L"%s \n",name);
    			delete(name);
    
    			
    		}
    		else if (wo.GetType()==4)
    		{
    			
    			WowPlayer wpp= WowPlayer(curObj);
    			wchar_t  *name;
    			name =wpp.GetName();
    			wprintf(L"%s,Player!!!!!! \n",name);
    			delete(name);
    		}
    	
    	}
    	return 0;
    }
    It works good, finds active players object first and prints it name, but sometimes, it can not find active player, and print other units and player names, without him.
    Pls, explain me what im doing wrong.
    Maybe something wrong in my program, and i simply missing it, or maybe i shouldn`t search active player by objectType, and search it by GUID?
    Like this
    Code:
    if (wo.GetGuid()==GetLocalGuid())
    	{
    		//FOUND!!!!
    	}
    Thank you very much
    Last edited by Tambel; 01-30-2015 at 11:10 AM.

    ActivePlayers object disapearing
  2. #2
    aeo's Avatar Contributor
    Reputation
    127
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    84/62
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm going to reply with the same reply I give a lot of people that are using this legacy method of enumerating the objects. Stop. Use EnumVisibleUnits/Objects. Just google wowaddin by tom rus is a great project and will save you from having to update 6 offsets each patch( or at least verify them). Blizzard does the work for you. it never fails.

    even easier here is the link :

    https://github.com/tomrus88/WowAddin

Similar Threads

  1. What happens when The Unstoppable Force hits The Immovable Object!?
    By kBlaster in forum World of Warcraft General
    Replies: 5
    Last Post: 04-30-2007, 09:02 AM
  2. Weird "Objects" in STM.
    By tyguy22894 in forum World of Warcraft Exploration
    Replies: 18
    Last Post: 04-22-2007, 03:22 PM
  3. WoW Addiction, I OBJECT! Video
    By The Juggernaut in forum Community Chat
    Replies: 1
    Last Post: 03-07-2007, 04:31 PM
  4. Model Editing (objects) Video Turtorial [No Download Required]
    By tyman2006 in forum World of Warcraft Model Editing
    Replies: 3
    Last Post: 12-21-2006, 08:11 PM
  5. Campfire---> Ramp or other climbable object?
    By Piratewolf in forum WoW ME Questions and Requests
    Replies: 7
    Last Post: 10-04-2006, 08:22 AM
All times are GMT -5. The time now is 03:28 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