/* * * * * * * * * * * * * * * * 
 * 	 ______     __  __     ______     __  __     ______     ______     __  __    
 *	/\  __ \   /\ \/\ \   /\  == \   /\ \_\ \   /\  __ \   /\  ___\   /\ \/ /    
 *	\ \ \/\ \  \ \ \_\ \  \ \  __<   \ \  __ \  \ \  __ \  \ \ \____  \ \  _"-.  
 *	 \ \_____\  \ \_____\  \ \_____\  \ \_\ \_\  \ \_\ \_\  \ \_____\  \ \_\ \_\ 
 *	  \/_____/   \/_____/   \/_____/   \/_/\/_/   \/_/\/_/   \/_____/   \/_/\/_/ 
 *
 *  - Version : 3L
 *  - By Oubliette
 * * * * * * * * * * * * * * * */

#include "main.h"

#include "oubhack_engineclient.h"

IEngineClient::IEngineClient( PDWORD_PTR* pdwClass ){

	this->base = pdwClass;

}

template <typename T> T IEngineClient::GetFunction( PDWORD_PTR* pdwClass, unsigned int uiIndex ){

	PDWORD_PTR pdwVMT = *pdwClass;

	return (T)pdwVMT[ uiIndex ];

}

PDWORD_PTR* IEngineClient::GetBase( ){

	return this->base;

}

/* ========================================
	Name : IEngineClient::GetINetChannelInfo
	Returns : void
=========================================== */

INetChannelInfo* IEngineClient::GetINetChannelInfo(){

	return this->GetFunction< GetINetChannelInfoFn >( this->base, INDEX_ENGINECLIENT_GETINETCHANNELINFO )( this->base );

}
