Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 14.06.2007, 14:03   #6
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

SO_VALID_USER - simple thing that checks given pointer and checks if its really poits to valid User class
0x00602C04 - offset of User virtual functions, same for all users
its good when u not sure and wanna reinsure %)

SafeObjects.h
Code:
#pragma once

class CCreature;

inline bool SO_VALID_USER(CCreature *pUser)
{
	DWORD *p = (DWORD *)pUser;
	if (p==NULL) return false;
	DWORD a = (DWORD)p;
	if (a<0x1000000) return false;
	a = *p;
	if (a!=0x00602C04) return false;
	return true;
}
humordwarf is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:11.