Decompile fn_23478 (CSession::GetTalkType)
Batch #15379 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_23478 CSession::GetTalkType: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, eAthena Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
7b8d24610f
commit
08341c1e8f
1 changed files with 111 additions and 210 deletions
|
|
@ -1018,76 +1018,50 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
}
|
||||
|
||||
LowercaseText(tokenizer[0]);
|
||||
const int count = static_cast<int>(tokenizer.tokens.size());
|
||||
int offset = 0;
|
||||
if (text[0] != '/') {
|
||||
*talkType = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto matches = [&tokenizer](std::initializer_list<char> command) {
|
||||
const std::string& token = tokenizer[0];
|
||||
return token.size() == command.size() && std::memcmp(token.data(), command.begin(), command.size()) == 0;
|
||||
};
|
||||
auto skipSpaces = [text](int offset) {
|
||||
while (text[offset] == ' ') {
|
||||
++offset;
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
const int count = static_cast<int>(tokenizer.tokens.size());
|
||||
|
||||
if (matches({'/', '\xA4', '\xD0'})) {
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xD0'})) {
|
||||
*talkType = 0x1;
|
||||
return skipSpaces(3);
|
||||
}
|
||||
if (matches({'/', 'b'})) {
|
||||
offset = 3;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'b'})) {
|
||||
*talkType = 0x1;
|
||||
return skipSpaces(2);
|
||||
}
|
||||
if (matches({'/', 'l', 'b'})) {
|
||||
offset = 2;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'l', 'b'})) {
|
||||
*talkType = 0x57;
|
||||
return skipSpaces(3);
|
||||
}
|
||||
if (matches({'/', '\xA4', '\xD3', '\xA4', '\xD0'})) {
|
||||
offset = 3;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xD3', '\xA4', '\xD0'})) {
|
||||
*talkType = 0x57;
|
||||
return skipSpaces(5);
|
||||
}
|
||||
if (matches({'/', 'n', 'b'})) {
|
||||
offset = 5;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'n', 'b'})) {
|
||||
*talkType = 0x5A;
|
||||
return skipSpaces(3);
|
||||
}
|
||||
if (matches({'/', '\xC6', '\xC4', '\xB6', '\xF5', '\xB8', '\xBB'})) {
|
||||
offset = 3;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', '\xC6', '\xC4', '\xB6', '\xF5', '\xB8', '\xBB'})) {
|
||||
*talkType = 0x66;
|
||||
return skipSpaces(7);
|
||||
}
|
||||
if (matches({'/', '\xA4', '\xCC', '\xA4', '\xD0'})) {
|
||||
offset = 7;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xCC', '\xA4', '\xD0'})) {
|
||||
*talkType = 0x5A;
|
||||
return skipSpaces(5);
|
||||
}
|
||||
if (matches({'/', 'n', 'l', 'b'})) {
|
||||
offset = 5;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'n', 'l', 'b'})) {
|
||||
*talkType = 0x5B;
|
||||
return skipSpaces(4);
|
||||
}
|
||||
if (matches({'/', '\xA4', '\xCF', '\xA4', '\xD0'})) {
|
||||
offset = 4;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xCF', '\xA4', '\xD0'})) {
|
||||
*talkType = 0x5B;
|
||||
return skipSpaces(5);
|
||||
}
|
||||
if (matches({'/', 'b', 'b'})) {
|
||||
offset = 5;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'b', 'b'})) {
|
||||
*talkType = 0x66;
|
||||
return skipSpaces(3);
|
||||
}
|
||||
if (tokenizer[0] == "/지역파란말") {
|
||||
offset = 3;
|
||||
} else if (tokenizer[0] == "/지역파란말") {
|
||||
*talkType = 0x67;
|
||||
return skipSpaces(11);
|
||||
}
|
||||
if (matches({'/', 'm', 'b'})) {
|
||||
offset = 11;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'm', 'b'})) {
|
||||
*talkType = 0x67;
|
||||
return skipSpaces(3);
|
||||
}
|
||||
if (matches({'/', 'k', 'i', 'l', 'l'})) {
|
||||
offset = 3;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'k', 'i', 'l', 'l'})) {
|
||||
*talkType = 0x4;
|
||||
return skipSpaces(5);
|
||||
}
|
||||
if (matches({'/', 'v'}) || matches({'/', '\xA4', '\xBD'})) {
|
||||
offset = 5;
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'v'}) || IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xBD'})) {
|
||||
*talkType = 0xC;
|
||||
if (count >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
|
|
@ -1097,8 +1071,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
_itoa(g_soundMgr->sampleVolume, volume, 10);
|
||||
parts[0].assign(volume, std::strlen(volume));
|
||||
return -1;
|
||||
}
|
||||
if (matches({'/', 'b', 'v'}) || matches({'/', '\xA4', '\xD0', '\xA4', '\xBD'})) {
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'b', 'v'}) || IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xD0', '\xA4', '\xBD'})) {
|
||||
*talkType = 0xD;
|
||||
if (count >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
|
|
@ -1108,23 +1081,19 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
_itoa(CSoundMgr::Volume(g_soundMgr), volume, 10);
|
||||
parts[0].assign(volume, std::strlen(volume));
|
||||
return -1;
|
||||
}
|
||||
if ((matches({'/', 'g', 'c'}) || matches({'/', 'g', 'u', 'i', 'l', 'd', 'c', 'h', 'a', 't'})) && count >= 2) {
|
||||
} else if ((IsTalkCommand(tokenizer[0], {'/', 'g', 'c'}) || IsTalkCommand(tokenizer[0], {'/', 'g', 'u', 'i', 'l', 'd', 'c', 'h', 'a', 't'})) && count >= 2) {
|
||||
*talkType = 0x39;
|
||||
parts[0] = text + (matches({'/', 'g', 'c'}) ? 4 : 11);
|
||||
parts[0] = text + (IsTalkCommand(tokenizer[0], {'/', 'g', 'c'}) ? 4 : 11);
|
||||
return -1;
|
||||
}
|
||||
if ((matches({'/', 'e', 'x'}) || matches({'/', '\xC2', '\xF7', '\xB4', '\xDC'})) && count >= 2) {
|
||||
} else if ((IsTalkCommand(tokenizer[0], {'/', 'e', 'x'}) || IsTalkCommand(tokenizer[0], {'/', '\xC2', '\xF7', '\xB4', '\xDC'})) && count >= 2) {
|
||||
*talkType = 0x12;
|
||||
parts[0] = text + (matches({'/', 'e', 'x'}) ? 4 : 6);
|
||||
parts[0] = text + (IsTalkCommand(tokenizer[0], {'/', 'e', 'x'}) ? 4 : 6);
|
||||
return -1;
|
||||
}
|
||||
if ((matches({'/', 'i', 'n'}) || matches({'/', '\xC7', '\xD8', '\xC1', '\xA6'})) && count >= 2) {
|
||||
} else if ((IsTalkCommand(tokenizer[0], {'/', 'i', 'n'}) || IsTalkCommand(tokenizer[0], {'/', '\xC7', '\xD8', '\xC1', '\xA6'})) && count >= 2) {
|
||||
*talkType = 0x13;
|
||||
parts[0] = text + (matches({'/', 'i', 'n'}) ? 4 : 6);
|
||||
parts[0] = text + (IsTalkCommand(tokenizer[0], {'/', 'i', 'n'}) ? 4 : 6);
|
||||
return -1;
|
||||
}
|
||||
if (matches({'/', 'r', 'e', 'd'})) {
|
||||
} else if (IsTalkCommand(tokenizer[0], {'/', 'r', 'e', 'd'})) {
|
||||
*talkType = 0x14;
|
||||
for (int index = 1; index < static_cast<int>(tokenizer.tokens.size()); ++index) {
|
||||
const std::string& token = tokenizer[index];
|
||||
|
|
@ -1132,28 +1101,23 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
parts[0].append(" ");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if ((matches({'/', '\xB0', '\xC5', '\xB7', '\xA1'}) || matches({'/', 'r', 'j', 'f', 'o'}) || matches({'/', '\xB1', '\xB3', '\xC8', '\xAF'}) || matches({'/', 'r', 'y', 'g', 'h', 'k', 's'}) || matches({'/', 'd', 'e', 'a', 'l'}) || matches({'/', '\xA4', '\xB7', '\xA4', '\xA7', '\xB9', '\xCC'})) && count == 2) {
|
||||
} else if ((IsTalkCommand(tokenizer[0], {'/', '\xB0', '\xC5', '\xB7', '\xA1'}) || IsTalkCommand(tokenizer[0], {'/', 'r', 'j', 'f', 'o'}) || IsTalkCommand(tokenizer[0], {'/', '\xB1', '\xB3', '\xC8', '\xAF'}) || IsTalkCommand(tokenizer[0], {'/', 'r', 'y', 'g', 'h', 'k', 's'}) || IsTalkCommand(tokenizer[0], {'/', 'd', 'e', 'a', 'l'}) || IsTalkCommand(tokenizer[0], {'/', '\xA4', '\xB7', '\xA4', '\xA7', '\xB9', '\xCC'})) && count == 2) {
|
||||
*talkType = 0x19;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if ((matches({'/', '\xB1', '\xE6', '\xB5', '\xE5'}) || matches({'/', 'r', 'l', 'f', 'e', 'm'}) || matches({'/', 'g', 'u', 'i', 'l', 'd'})) && count == 2) {
|
||||
} else if ((IsTalkCommand(tokenizer[0], {'/', '\xB1', '\xE6', '\xB5', '\xE5'}) || IsTalkCommand(tokenizer[0], {'/', 'r', 'l', 'f', 'e', 'm'}) || IsTalkCommand(tokenizer[0], {'/', 'g', 'u', 'i', 'l', 'd'})) && count == 2) {
|
||||
*talkType = 0x37;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if ((matches({'/', '\xC7', '\xD8', '\xC3', '\xBC'}) || tokenizer[0] == "/gocp" || tokenizer[0] == "/breakguild") && count == 2) {
|
||||
} else if ((IsTalkCommand(tokenizer[0], {'/', '\xC7', '\xD8', '\xC3', '\xBC'}) || tokenizer[0] == "/gocp" || tokenizer[0] == "/breakguild") && count == 2) {
|
||||
*talkType = 0x38;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/결성" || tokenizer[0] == "/ruftjd" || tokenizer[0] == "/organize") && count == 2) {
|
||||
} else if ((tokenizer[0] == "/결성" || tokenizer[0] == "/ruftjd" || tokenizer[0] == "/organize") && count == 2) {
|
||||
*talkType = 0x1A;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/몬스터" || tokenizer[0] == "/아이템" || tokenizer[0] == "/item" || tokenizer[0] == "/monster") && count >= 2) {
|
||||
} else if ((tokenizer[0] == "/몬스터" || tokenizer[0] == "/아이템" || tokenizer[0] == "/item" || tokenizer[0] == "/monster") && count >= 2) {
|
||||
*talkType = 0x30;
|
||||
parts[0] = tokenizer[1];
|
||||
if (count > 2) {
|
||||
|
|
@ -1168,8 +1132,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
parts[0] = joined;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/맵이동" || tokenizer[0] == "/mapmove" || tokenizer[0] == "/mm") && count > 1) {
|
||||
} else if ((tokenizer[0] == "/맵이동" || tokenizer[0] == "/mapmove" || tokenizer[0] == "/mm") && count > 1) {
|
||||
*talkType = 0x31;
|
||||
parts[0] = tokenizer[1];
|
||||
if (tokenizer.tokens.size() == 4) {
|
||||
|
|
@ -1179,22 +1142,18 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
parts[1] = parts[2].assign("0");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/제명" || tokenizer[0] == "/wpaud" || tokenizer[0] == "/expel") && count == 2) {
|
||||
} else if ((tokenizer[0] == "/제명" || tokenizer[0] == "/wpaud" || tokenizer[0] == "/expel") && count == 2) {
|
||||
*talkType = 0x1C;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/sm" && count == 2) {
|
||||
} else if (tokenizer[0] == "/sm" && count == 2) {
|
||||
*talkType = 0x3A;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/resetstate") {
|
||||
} else if (tokenizer[0] == "/resetstate") {
|
||||
*talkType = 0x3D;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/resetskill") {
|
||||
} else if (tokenizer[0] == "/resetskill") {
|
||||
*talkType = 0x3E;
|
||||
if (tokenizer.tokens.size() >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
|
|
@ -1202,131 +1161,93 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
parts[0].assign("1");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/changemaptype" || tokenizer[0] == "/cmt") && count == 4) {
|
||||
} else if ((tokenizer[0] == "/changemaptype" || tokenizer[0] == "/cmt") && count == 4) {
|
||||
*talkType = 0x3F;
|
||||
parts[0] = tokenizer[1];
|
||||
parts[1] = tokenizer[2];
|
||||
parts[2] = tokenizer[3];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/emblem" || tokenizer[0] == "/엠블렘" || tokenizer[0] == "/앰블렘" || tokenizer[0] == "/dpaqmffpa" || tokenizer[0] == "/doaqmffpa") {
|
||||
} else if (tokenizer[0] == "/emblem" || tokenizer[0] == "/엠블렘" || tokenizer[0] == "/앰블렘" || tokenizer[0] == "/dpaqmffpa" || tokenizer[0] == "/doaqmffpa") {
|
||||
*talkType = 0x40;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/hide") {
|
||||
} else if (tokenizer[0] == "/hide") {
|
||||
*talkType = 0x58;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/폰트" || tokenizer[0] == "/font") {
|
||||
} else if (tokenizer[0] == "/폰트" || tokenizer[0] == "/font") {
|
||||
*talkType = 0x5C;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/mineffect" || tokenizer[0] == LookupMessage(MSI_MINEFFECT)) {
|
||||
} else if (tokenizer[0] == "/mineffect" || tokenizer[0] == LookupMessage(MSI_MINEFFECT)) {
|
||||
*talkType = 0xE5;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/remove" && count == 2) {
|
||||
} else if (tokenizer[0] == "/remove" && count == 2) {
|
||||
*talkType = 0x5F;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/summon" && count == 2) {
|
||||
} else if (tokenizer[0] == "/summon" && count == 2) {
|
||||
*talkType = 0x62;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/shift") {
|
||||
} else if (tokenizer[0] == "/shift") {
|
||||
*talkType = 0x60;
|
||||
for (int index = 0; index < static_cast<int>(tokenizer.tokens.size()) - 1; ++index) {
|
||||
parts[index] = tokenizer[index + 1];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/recall" && count == 2) {
|
||||
} else if (tokenizer[0] == "/recall" && count == 2) {
|
||||
*talkType = 0x61;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/check" && count == 2) {
|
||||
} else if (tokenizer[0] == "/check" && count == 2) {
|
||||
*talkType = 0x8F;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/rc" && count == 2) {
|
||||
} else if (tokenizer[0] == "/rc" && count == 2) {
|
||||
*talkType = 0x90;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/요금") {
|
||||
} else if (tokenizer[0] == "/요금") {
|
||||
*talkType = 0x65;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/이름표시" || tokenizer[0] == "/showname") {
|
||||
} else if (tokenizer[0] == "/이름표시" || tokenizer[0] == "/showname") {
|
||||
*talkType = 0x6C;
|
||||
return skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/str+" && count > 1) {
|
||||
offset = 0;
|
||||
} else if (tokenizer[0] == "/str+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_STATUS_CHANGE, 0xD, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/agi+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/agi+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_STATUS_CHANGE, 0xE, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/luk+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/luk+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_STATUS_CHANGE, 0x12, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/int+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/int+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_STATUS_CHANGE, 0x10, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/vit+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/vit+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_STATUS_CHANGE, 0xF, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/dex+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/dex+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_STATUS_CHANGE, 0x11, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/pow+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/pow+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_ADVANCED_STATUS_CHANGE, 0xDB, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/sta+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/sta+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_ADVANCED_STATUS_CHANGE, 0xDC, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/wis+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/wis+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_ADVANCED_STATUS_CHANGE, 0xDD, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/spl+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/spl+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_ADVANCED_STATUS_CHANGE, 0xDE, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/con+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/con+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_ADVANCED_STATUS_CHANGE, 0xDF, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/crt+" && count > 1) {
|
||||
} else if (tokenizer[0] == "/crt+" && count > 1) {
|
||||
*talkType = 0x89;
|
||||
g_modeMgr.GetGameMode()->SendMsg(MM_ADVANCED_STATUS_CHANGE, 0xE0, std::atoi(tokenizer[1].c_str()), 0, 0);
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if (tokenizer[0] == "/hi") {
|
||||
} else if (tokenizer[0] == "/hi") {
|
||||
std::string message("");
|
||||
*talkType = 0x97;
|
||||
if (count > 1) {
|
||||
|
|
@ -1338,8 +1259,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
g_windowMgr.SetChatInputText(message.c_str());
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/초대" || tokenizer[0] == "/cheo" || tokenizer[0] == "/invite") {
|
||||
} else if (tokenizer[0] == "/초대" || tokenizer[0] == "/cheo" || tokenizer[0] == "/invite") {
|
||||
*talkType = 0xB8;
|
||||
std::string command(text);
|
||||
const std::size_t space = command.find(" ", 0);
|
||||
|
|
@ -1349,8 +1269,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
g_windowMgr.SetChatInputText(LookupMessage(MSI_NOWARPSKILL2));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/길드초대" || tokenizer[0] == "/rlfemcheo" || tokenizer[0] == "/guildinvite") {
|
||||
} else if (tokenizer[0] == "/길드초대" || tokenizer[0] == "/rlfemcheo" || tokenizer[0] == "/guildinvite") {
|
||||
*talkType = 0xD3;
|
||||
std::string command(text);
|
||||
const std::size_t space = command.find(" ", 0);
|
||||
|
|
@ -1360,73 +1279,58 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
g_windowMgr.SetChatInputText(LookupMessage(MSI_PARA_PURCHASE_ITEM_WEIGHT));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/web" && count >= 2) {
|
||||
} else if (tokenizer[0] == "/web" && count >= 2) {
|
||||
*talkType = 0xD0;
|
||||
parts[0] = tokenizer[1];
|
||||
return *talkType == 0 ? 0 : skipSpaces(0);
|
||||
}
|
||||
if ((tokenizer[0] == "/navi" || tokenizer[0] == "/navigation") && count >= 3) {
|
||||
} else if ((tokenizer[0] == "/navi" || tokenizer[0] == "/navigation") && count >= 3) {
|
||||
*talkType = 0xD1;
|
||||
parts[0] = tokenizer[1];
|
||||
parts[1] = tokenizer[2];
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/navi2" || tokenizer[0] == "/navigation2") && count >= 4) {
|
||||
} else if ((tokenizer[0] == "/navi2" || tokenizer[0] == "/navigation2") && count >= 4) {
|
||||
*talkType = 0xD2;
|
||||
parts[0] = tokenizer[1];
|
||||
parts[1] = tokenizer[2];
|
||||
parts[2] = tokenizer[3];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/naviopen") {
|
||||
} else if (tokenizer[0] == "/naviopen") {
|
||||
*talkType = 0xD9;
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/cl" || tokenizer[0] == "/clanchat") && count >= 2) {
|
||||
} else if ((tokenizer[0] == "/cl" || tokenizer[0] == "/clanchat") && count >= 2) {
|
||||
*talkType = 0xD6;
|
||||
parts[0] = text + (tokenizer[0] == "/cl" ? 4 : 10);
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == LookupMessage(MSI_PARA_RESULT_TITLE)) {
|
||||
} else if (tokenizer[0] == LookupMessage(MSI_PARA_RESULT_TITLE)) {
|
||||
*talkType = 0xD8;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/cashshop") {
|
||||
} else if (tokenizer[0] == "/cashshop") {
|
||||
*talkType = 0xDA;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/goldpc") {
|
||||
} else if (tokenizer[0] == "/goldpc") {
|
||||
*talkType = 0xDB;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/roulette") {
|
||||
} else if (tokenizer[0] == "/roulette") {
|
||||
*talkType = 0xDC;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/quake") {
|
||||
} else if (tokenizer[0] == "/quake") {
|
||||
*talkType = 0xDD;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/매크로등록" || tokenizer[0] == "/macro_register" || tokenizer[0] == "/mr") {
|
||||
} else if (tokenizer[0] == "/매크로등록" || tokenizer[0] == "/macro_register" || tokenizer[0] == "/mr") {
|
||||
*talkType = 0xE0;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/매크로확인" || tokenizer[0] == "/macro_preview" || tokenizer[0] == "/mp") {
|
||||
} else if (tokenizer[0] == "/매크로확인" || tokenizer[0] == "/macro_preview" || tokenizer[0] == "/mp") {
|
||||
*talkType = 0xE1;
|
||||
if (count >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/매크로신고" || tokenizer[0] == "/macro_detector" || tokenizer[0] == "/md") {
|
||||
} else if (tokenizer[0] == "/매크로신고" || tokenizer[0] == "/macro_detector" || tokenizer[0] == "/md") {
|
||||
*talkType = 0xE2;
|
||||
if (count >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/setcamera" && count > 2) {
|
||||
} else if (tokenizer[0] == "/setcamera" && count > 2) {
|
||||
*talkType = 0xE4;
|
||||
parts[0] = tokenizer[1];
|
||||
parts[1] = tokenizer[2];
|
||||
|
|
@ -1434,39 +1338,31 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
parts[2] = tokenizer[3];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/resetcooltime" || tokenizer[0] == "/rct") {
|
||||
} else if (tokenizer[0] == "/resetcooltime" || tokenizer[0] == "/rct") {
|
||||
*talkType = 0xE6;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/call" || tokenizer[0] == "/호출") {
|
||||
} else if (tokenizer[0] == "/call" || tokenizer[0] == "/호출") {
|
||||
*talkType = 0xE7;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/환복" || tokenizer[0] == "/changedress" || tokenizer[0] == "/nocosplay") {
|
||||
} else if (tokenizer[0] == "/환복" || tokenizer[0] == "/changedress" || tokenizer[0] == "/nocosplay") {
|
||||
*talkType = 0xEF;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/노점보기" || tokenizer[0] == "/showshop") {
|
||||
} else if (tokenizer[0] == "/노점보기" || tokenizer[0] == "/showshop") {
|
||||
*talkType = 0xFA;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/prison") {
|
||||
} else if (tokenizer[0] == "/prison") {
|
||||
*talkType = 0xFB;
|
||||
if (count >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/계정한정" || tokenizer[0] == "/accountlimitedtool") {
|
||||
} else if (tokenizer[0] == "/계정한정" || tokenizer[0] == "/accountlimitedtool") {
|
||||
*talkType = 0xFC;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/모험가중개소" || tokenizer[0] == "/중개소" || tokenizer[0] == "/agency") {
|
||||
} else if (tokenizer[0] == "/모험가중개소" || tokenizer[0] == "/중개소" || tokenizer[0] == "/agency") {
|
||||
*talkType = 0xED;
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/removeon") {
|
||||
} else if (tokenizer[0] == "/removeon") {
|
||||
*talkType = 0xFE;
|
||||
if (tokenizer.tokens.size() >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
|
|
@ -1479,26 +1375,31 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) {
|
|||
parts[1] = "0";
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/removeoff") {
|
||||
} else if (tokenizer[0] == "/removeoff") {
|
||||
*talkType = 0xFF;
|
||||
if (count >= 2) {
|
||||
parts[0] = tokenizer[1];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if ((tokenizer[0] == "/MacroChecker" || tokenizer[0] == "/macrochecker") && count > 1) {
|
||||
} else if ((tokenizer[0] == "/MacroChecker" || tokenizer[0] == "/macrochecker") && count > 1) {
|
||||
*talkType = 0x104;
|
||||
parts[0] = tokenizer[1];
|
||||
return -1;
|
||||
}
|
||||
if (tokenizer[0] == "/ProbabilityTest" || tokenizer[0] == "/확률테스트") {
|
||||
} else if (tokenizer[0] == "/ProbabilityTest" || tokenizer[0] == "/확률테스트") {
|
||||
*talkType = 0x117;
|
||||
return -1;
|
||||
} else {
|
||||
*talkType = this->GetCommandId(tokenizer[0].c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
*talkType = this->GetCommandId(tokenizer[0].c_str());
|
||||
return -1;
|
||||
if (*talkType != 0) {
|
||||
while (text[offset] == ' ') {
|
||||
++offset;
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DDF890
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue