Diablo 2 mods
 


Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 12, 2017 12:12 pm 
 Post subject: pPlayer from pHireling
 
Offline
Champion of the Light
User avatar

Joined: Sat Mar 07, 2015 9:07 pm
Posts: 495
Gender: Male
Hello,

Rewriting some asm to c++, and have a situation where I need to get
pPlayer when I only have pHireling unit.

looked at

pUnit->dwOwnerGUID
MonsterData->AiControl->dwOwnerGUID

no dice..

I was able to pair up the 2 units with Unitnode chain at pGame+0x10F8, but is there a simpler way?

:-|

_________________
Pandemonium Quest 1.13d | Uber Tristram 1.13d
UVLoD | 1.13d Code Edits


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 12, 2017 9:21 pm 
 Post subject: Re: pPlayer from pHireling
 
Offline
Senior Moderator
Senior Moderator
User avatar

Age: 26
Joined: Sat Mar 25, 2006 1:22 pm
Posts: 8802
Location: The Land of the Dead
Gender: Male
You want to use:
/*
   Date: Tue Jun 16 10:53:30 2009
   Author: Necrolis
   Function: PETS_GetOwner
   Address: D2Game.0x6FCCF320
   Comments:
*/

D2UnitStrc* __fastcall PETS_GetOwner(D2UnitStrc* pMinion)

_________________
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 13, 2017 12:31 am 
 Post subject: Re: pPlayer from pHireling
 
Offline
Champion of the Light
User avatar

Joined: Sat Mar 07, 2015 9:07 pm
Posts: 495
Gender: Male
Works Great!!

[1.13c]
D2Game.6FC41260 - PETS_GetOwner

Thanks!
:)

_________________
Pandemonium Quest 1.13d | Uber Tristram 1.13d
UVLoD | 1.13d Code Edits


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Black Rock template by onyx (based on BlackSoul for phpBB2)