ServersMU - Comunidad

Zona Programadores => Sources => Mensaje iniciado por: Applayo en Abril 21, 2021, 05:43:18 pm

Título: Add Keep DL command status option - MuEMU
Publicado por: Applayo en Abril 21, 2021, 05:43:18 pm
Opção para manter o status DL quando ResetType for 1 (Pontuativo)


Em [b]ServerInfo.h[/b] procure por [b]int m_CommandResetPointRate[MAX_CLASS];[/b]

E acrescente abaixo [b]int m_CommandResetKeepDLCommandPoint[MAX_ACCOUNT_LEVEL];[/b]


Em [b]ServerInfo.cpp[/b] procure por [b]this->m_CommandResetPointRate[6] = GetPrivateProfileInt(section,"CommandResetPointRat eRF",0,path);[/b]

E acrescente abaixo

[code]this->m_CommandResetKeepDLCommandPoint[0] = GetPrivateProfileInt(section,"CommandResetKeepDLCo mmandPoint_AL0",0,path);

this->m_CommandResetKeepDLCommandPoint[1] = GetPrivateProfileInt(section,"CommandResetKeepDLCo mmandPoint_AL1",0,path);

this->m_CommandResetKeepDLCommandPoint[2] = GetPrivateProfileInt(section,"CommandResetKeepDLCo mmandPoint_AL2",0,path);

this->m_CommandResetKeepDLCommandPoint[3] = GetPrivateProfileInt(section,"CommandResetKeepDLCo mmandPoint_AL3",0,path);[/code]


Na função
Código:

[b]void CCommandManager::DGCommandResetRecv(SDHP_COMMAND_RESET_RECV* lpMsg) // OK[/b]

encontre [b]if(gServerInfo.m_CommandResetType == 1)[/b]

e onde estiver [b]lpObj->Leadership = gDefaultClassInfo.m_DefaultClassInfo[lpObj->Class].Leadership;[/b]

troque para

[code]//- Add Keep DL command status option
if(gServerInfo.m_CommandResetKeepDLCommandPoint[lpObj->AccountLevel] == 0)
{
lpObj->Leadership = gDefaultClassInfo.m_DefaultClassInfo[lpObj->Class].Leadership;
}[/code]


No arquivo [b]GameServerInfo - Command.dat[/b] acrescente as linhas ao ; [b]Reset Command Settings[/b]

[code]CommandResetKeepDLCommandPoint_AL0 = 0
CommandResetKeepDLCommandPoint_AL1 = 0
CommandResetKeepDLCommandPoint_AL2 = 0
CommandResetKeepDLCommandPoint_AL3 = 0[/code]


Créditos: Emershow
Título: Re: Add Keep DL command status option - MuEMU
Publicado por: robins1998 en Mayo 27, 2021, 02:30:56 am
Very helpful, thanks for sharing.