Non avendo trovato nulla su inforge riguardante la chat globale nei source ho deciso di postare una guida riscritta in italiano.
Prima di tutto andiamo nella cartella "Game" all'interno dei source:
/src_server/game/src/
Cerchiamo il file "input_p2p.cpp"
In cima aggiungiamo (dopo l'elenco)
Screen:
Ora cerchiamo "struct FuncShout" e sostituiamo
Con:
Screen:
E con questo file abbiamo finito, ora apriamo "input_main.cpp" e cerchiamo:
Sotto esso aggiungiamo: (Contiene già la modifica per lo Staff)
Screen:
E anche qui abbiamo finito, apriamo "config.cpp"
Cerchiamo:
Aggiungiamo sotto:
Screen:
Ora cerchiamo:
E sotto aggiungiamo:
Screen:
E con i source abbiamo finito (Salviamo tutto e compiliamo)
Ora andiamo in share/locale/italy/locale_string.txt
All'interno del "locale_string.txt" aggiungiamo:
PS:
"Jinno"; <--- Corrisponde a quello nei source
"Jinno"; <--- Corrisponde a ciò che volete che venga scritto in gioco
Ora basta inserire nei "CONFIG"
Ed il gioco è fatto
Fonti: Metin2D*v, Denis, Despero, Shisui
Prima di tutto andiamo nella cartella "Game" all'interno dei source:
/src_server/game/src/
Cerchiamo il file "input_p2p.cpp"
In cima aggiungiamo (dopo l'elenco)
Codice:
#include "threeway_war.h"
extern bool global_chat;
Screen:
Ora cerchiamo "struct FuncShout" e sostituiamo
Codice:
if (!d->GetCharacter() || (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire))
return;
Codice:
if(global_chat)
{
if (!d->GetCharacter())
return;
}else {
if (!d->GetCharacter() || (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire))
return;
}
Screen:
E con questo file abbiamo finito, ora apriamo "input_main.cpp" e cerchiamo:
Codice:
ch->SetLastShoutPulse(thecore_heart->pulse);
Sotto esso aggiungiamo: (Contiene già la modifica per lo Staff)
Codice:
if(global_chat)
{
char buf[256];
char chatbuf_global[CHAT_MAX_LEN + 1];
const BYTE char_empire = ch->GetEmpire();
if (ch->GetGMLevel() != GM_PLAYER)
{
strlcpy(buf, LC_TEXT("Staff"), sizeof(buf));
std::string staff_color = "|cFFFFC700|H|h[";
staff_color += buf;
staff_color += "]|cFFA7FFD4|H|h";
sprintf(chatbuf_global, "%s %s", staff_color.c_str(), chatbuf);
}
else if (char_empire == 1)
{
strlcpy(buf, LC_TEXT("Shinsoo"), sizeof(buf));
std::string kingdom_red = "|cFFff0000|H|h[";
kingdom_red += buf;
kingdom_red += "]|cFFA7FFD4|H|h";
sprintf(chatbuf_global, "%s %s", kingdom_red.c_str(), chatbuf);
}
else if (char_empire == 2)
{
strlcpy(buf, LC_TEXT("Chunjo"), sizeof(buf));
std::string kingdom_yel = "|cFFFFFF00|H|h[";
kingdom_yel += buf;
kingdom_yel += "]|cFFA7FFD4|H|h";
sprintf(chatbuf_global, "%s %s", kingdom_yel.c_str(), chatbuf);
}
else if (char_empire == 3) {
strlcpy(buf, LC_TEXT("Jinno"), sizeof(buf));
std::string kingdom_blue = "|cFF0080FF|H|h[";
kingdom_blue += buf;
kingdom_blue += "]|cFFA7FFD4|H|h";
sprintf(chatbuf_global, "%s %s", kingdom_blue.c_str(), chatbuf);
}
TPacketGGShout p;
p.bHeader = HEADER_GG_SHOUT;
p.bEmpire = char_empire;
strlcpy(p.szText, chatbuf_global, sizeof(p.szText));
P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout));
SendShout(chatbuf_global, ch->GetEmpire());
return (iExtraLen);
}
Screen:
Cerchiamo:
Codice:
int gPlayerMaxLevel = 99;
Aggiungiamo sotto:
Codice:
bool global_chat = false;
Screen:
Ora cerchiamo:
Codice:
TOKEN("max_level")
{
str_to_number(gPlayerMaxLevel, value_string);
gPlayerMaxLevel = MINMAX(1, gPlayerMaxLevel, PLAYER_MAX_LEVEL_CONST);
fprintf(stderr, "PLAYER_MAX_LEVEL: %d\n", gPlayerMaxLevel);
}
Codice:
TOKEN("global_chat")
{
int flag = 0;
str_to_number(flag, value_string);
if (1 == flag)
{
global_chat = true;
fprintf(stderr, "GLOBAL_CHAT: %i\n", flag);
}
}
Screen:
E con i source abbiamo finito (Salviamo tutto e compiliamo)
Ora andiamo in share/locale/italy/locale_string.txt
All'interno del "locale_string.txt" aggiungiamo:
Codice:
"Jinno";
"Jinno";
"Chunjo";
"Chunjo";
"Shinsoo";
"Shinsoo";
"Staff";
"Team";
"Jinno"; <--- Corrisponde a quello nei source
"Jinno"; <--- Corrisponde a ciò che volete che venga scritto in gioco
Ora basta inserire nei "CONFIG"
Codice:
global_chat: 1
Fonti: Metin2D*v, Denis, Despero, Shisui