For the goodies here are the 3 tables used by the game (i wrote them just for info),
Code: Select all
const int MonsterLife_Percent_Per_Players[9] = { 0,0,50,100,150,200,250,300,350 };
const int MonsterExp_Percent_Per_Players[9] = { 0,0,50,100,150,200,250,300,350 };
const int MonsterDamage_Percent_Per_Players[9] = { 0,0,8,16,24,32,40,48,56 };
You need to patch those addresses:
Code: Select all
{ D2DLL_D2GAME,0x124F8,0x00,(DWORD)GetVirtualPlayerCount, TRUE },
{ D2DLL_D2GAME,0xAF87C,0x00,(DWORD)GetVirtualPlayerCount,TRUE },
it will execute our function instead and it's where the magic happen.
Code: Select all
int __fastcall GetVirtualPlayerCount()
{
D2GameStrc *ThisGame;
__asm
{
mov ThisGame, eax;
}
if (IsBadCodePtr((FARPROC)ThisGame->nClients))
{
return D2GAME_GetVirtualPlayerCount(ThisGame);
}
else
{
return ThisGame->nClients;
}
}
So with proper way (admin command, or something else) you will simply need to do this (if you want players 8) pGame->nClients = 8;
As it's impossible to talk about packets handler or anything related to it i'll stop with this but i hope this post helped.
Thanks to kidpaddle for the awesome D2Template that i used for many years and to the people that helped me to find quicker the addresses for the monsters.