Dynamic Things Posted July 8, 2015 at 07:22 PM Share Posted July 8, 2015 at 07:22 PM Abrir game/input_main.cpp Procurar por: SHOUT_LIMIT_LEVEL Irá aparecer algo semelhante ao seguinte exemplo: if (pinfo->type == CHAT_TYPE_SHOUT) { const int SHOUT_LIMIT_LEVEL = g_iUseLocale ? 15 : 3; if (ch->GetLevel() < SHOUT_LIMIT_LEVEL) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¿ÜÄ¡±â´Â ·¹º§ %d ÀÌ»ó¸¸ »ç¿ë °¡´É ÇÕ´Ï´Ù."), SHOUT_LIMIT_LEVEL); return (iExtraLen); } if (thecore_heart->pulse - (int) ch->GetLastShoutPulse() < passes_per_sec * 15) return (iExtraLen); ch->SetLastShoutPulse(thecore_heart->pulse); TPacketGGShout p; p.bHeader = HEADER_GG_SHOUT; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShout(chatbuf, ch->GetEmpire()); return (iExtraLen); } Para remover a obrigatoriedade de ter o nível, vão remover está seguinte parte: const int SHOUT_LIMIT_LEVEL = g_iUseLocale ? 15 : 3; if (ch->GetLevel() < SHOUT_LIMIT_LEVEL) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¿ÜÄ¡±â´Â ·¹º§ %d ÀÌ»ó¸¸ »ç¿ë °¡´É ÇÕ´Ï´Ù."), SHOUT_LIMIT_LEVEL); return (iExtraLen); } Ficando Assim: if (pinfo->type == CHAT_TYPE_SHOUT) { if (thecore_heart->pulse - (int) ch->GetLastShoutPulse() < passes_per_sec * 15) return (iExtraLen); ch->SetLastShoutPulse(thecore_heart->pulse); TPacketGGShout p; p.bHeader = HEADER_GG_SHOUT; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShout(chatbuf, ch->GetEmpire()); return (iExtraLen); } Para alterar o tempo de intervalo por mensagem (Ainda não testado): if (thecore_heart->pulse - (int) ch->GetLastShoutPulse() < passes_per_sec * 15) Segundo penso eu, será só remover o valor 15 por outro numero desejado. Em breve irei-me verificar do mesmo conteúdo não testado, e irei avisar no tópico sobre o seu funcionado, ou não. Cumprimentos DynamicThings Link to comment Share on other sites More sharing options...
Magician Posted August 24, 2016 at 01:48 PM Share Posted August 24, 2016 at 01:48 PM Na Minha Opinião para remover o Lvl Min mete-se o Lv 1 pois não vai haver algum server com lv min menor que 1 Assim : if (pinfo->type == CHAT_TYPE_SHOUT) { //const int SHOUT_LIMIT_LEVEL = g_iUseLocale ? 15 : 3; int SHOUT_LIMIT_LEVEL = 1 if (ch->GetLevel() < 1) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¿ÜÄ¡±â´Â ·¹º§ %d ÀÌ»ó¸¸ »ç¿ë °¡´É ÇÕ´Ï´Ù."), SHOUT_LIMIT_LEVEL); return (iExtraLen); } Link to comment Share on other sites More sharing options...
Karbust Posted August 24, 2016 at 01:51 PM Share Posted August 24, 2016 at 01:51 PM Ele removeu o nível necessário na 1ª parte, apagando código que não ficava lá a fazer nada... Na 2ª parte disse como se fazer para alterar o tempo entre cada shout, tipo de 15 segundos para 10 por exemplo... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now