pPlayer from pHireling

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
devurandom
Angel
Posts: 526
Joined: Sat Mar 07, 2015 9:07 pm

pPlayer from pHireling

Post by devurandom » Thu Oct 12, 2017 12:12 pm

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?

:-|

User avatar
Necrolis
Site Admin
Site Admin
Throne
Posts: 8831
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: pPlayer from pHireling

Post by Necrolis » Thu Oct 12, 2017 9:21 pm

You want to use:

Code: Select all

/* 
	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

User avatar
devurandom
Angel
Posts: 526
Joined: Sat Mar 07, 2015 9:07 pm

Re: pPlayer from pHireling

Post by devurandom » Fri Oct 13, 2017 12:31 am

Works Great!!

[1.13c]
D2Game.6FC41260 - PETS_GetOwner

Thanks!
:)

Post Reply

Return to “Code Editing”