Decompile fn_22016 (CGameMode::ReceiveClanChat)
Batch #9023 by youko: 0 byte-identical, 1 confirmed by peer review. - fn_22016 CGameMode::ReceiveClanChat: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, pedrao, dori 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
2d707bd1fb
commit
afaf9ab6db
4 changed files with 45 additions and 12 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "Contents/Effects/Effect.h"
|
||||
#include "Contents/Effects/EffectLists.h"
|
||||
#include "Contents/Effects/MonsterSkillEffects.h"
|
||||
#include "Contents/ForbiddenWords.h"
|
||||
#include "Contents/Ground/TerrainHeight.h"
|
||||
#include "Contents/GuildMgr.h"
|
||||
#include "Contents/Items/ItemDescription.h"
|
||||
|
|
@ -2882,3 +2883,26 @@ void CGameMode::ReceivePendingItem1718List(const unsigned char* packet) {
|
|||
window->SendMsg(nullptr, 0x24, 1, 0, 0, 0);
|
||||
window->SendMsg(nullptr, 0x17, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00D66860
|
||||
// FUNCTION: fn_22016
|
||||
void CGameMode::ReceiveClanChat(const unsigned char* packet) {
|
||||
const int messageLength = *reinterpret_cast<const std::int16_t*>(packet + 2) - 28;
|
||||
|
||||
if (messageLength < 0 || messageLength > 220) {
|
||||
return;
|
||||
}
|
||||
|
||||
char message[220];
|
||||
std::memset(message, 0, sizeof(message));
|
||||
strcpy_s(message, sizeof(message), reinterpret_cast<const char*>(packet + 28));
|
||||
|
||||
if (g_forbiddenWords.Contains(message) == true) {
|
||||
std::string masked;
|
||||
g_forbiddenWords.Mask(message, &masked);
|
||||
}
|
||||
|
||||
if (!g_serviceOptions.Get(148)) {
|
||||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(message), 0xB4B4FF, 21, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue