Maintenance: Second pass: name remaining numeric switch case labels (identifier-only; no code change). ~3,500 more labels across 150

Batch #14936 by ragnarok-clanker: no function's compiled code changes; checked with 158 compiled unit(s), including every includer of Source/Client/Mode/GameModeEnums.h, Source/Client/Mode/ModeMessage.h, Source/Contents/Actors/ActorEnums.h, Source/Contents/Actors/PetEnums.h, Source/Contents/Combat/CombatTypes.h, Source/Contents/Configuration/ServiceEnums.h, Source/Contents/Effects/EffectPrimId.h, Source/Contents/Hotkeys/InterfaceHotkey.h, Source/Contents/Items/ItemId.h, Source/Contents/Items/ItemType.h, Source/Network/Packets/ModeResultEnums.h, Source/Network/Packets/NoticeEnums.h, Source/Network/Packets/PacketId.h, Source/UI/Window/UIEnums.h, Source/UI/Window/WindowId.h.
This commit is contained in:
ragnarok-clanker 2026-11-08 12:37:46 +00:00
commit 858265cc69
159 changed files with 5409 additions and 3560 deletions

View file

@ -444,19 +444,19 @@ CLanguageBase::CLanguageBase()
this->codePage = g_inlineCharset ? LanguageCodePage(this->language) : g_textCodePage;
switch (static_cast<std::uint16_t>(GetUserDefaultLangID() & 0x3FF)) {
case 7:
case LANG_GERMAN:
this->alternateLanguage = 7;
this->servicePrefix = "german\\";
break;
case 16:
case LANG_ITALIAN:
this->alternateLanguage = 16;
this->servicePrefix = "italian\\";
break;
case 22:
case LANG_PORTUGUESE:
this->alternateLanguage = 22;
this->servicePrefix = "portuguese\\";
break;
case 31:
case LANG_TURKISH:
this->alternateLanguage = 31;
this->servicePrefix = "turkish\\";
break;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,81 @@
#ifndef RAGNAROK_SOURCE_CLIENT_MODE_GAMEMODEENUMS_H
#define RAGNAROK_SOURCE_CLIENT_MODE_GAMEMODEENUMS_H
enum NAME_BALLOON_TYPE : int {
NAME_BALLOON_BOTTOM = 0,
NAME_BALLOON_TOP = 1,
NAME_BALLOON_LEFT = 2,
NAME_BALLOON_RIGHT = 3,
};
enum ENUM_SKILL_USE_TYPE : int {
SUT_NOSKILL = 0,
SUT_TO_CHARACTER = 2,
SUT_TO_ALL = 4,
};
enum MSGEFFECTTYPE : int {
MET_JUST_ANIMATE = 0,
MET_EMOTION = 1,
MET_MVP = 2,
MET_CART = 3,
MET_PKEFFECT = 4,
MET_ICEEFFECT = 5,
MET_ICEBREAKEFFECT = 6,
MET_CURSE_EFFECT = 7,
MET_SLEEP_EFFECT = 8,
MET_STUN_EFFECT = 9,
MET_SILENCE_EFFECT = 10,
MET_ANGELUS_EFFECT = 11,
MET_CRUSIS_EFFECT = 12,
MET_MISS = 13,
MET_NUMBER = 14,
MET_CRITICAL_EFFECT = 15,
MET_NUMBER_CRITICAL = 16,
MET_LUCKY_EFFECT = 17,
MET_BIRD = 18,
MET_NUMBER_HALF = 21,
MET_NUMBER_TOTAL = 22,
MET_GUARD = 24,
MET_BLUE_EFFECT = 25,
MET_CURSOR_EFFECT = 26,
};
enum MAKE_MSG_EFFECT_TYPE : int {
MAKETYPE_MVP_EFFECT = 0,
MAKETYPE_CART_EFFECT = 1,
MAKETYPE_PK_EFFECT = 2,
MAKETYPE_ICE_EFFECT = 3,
MAKETYPE_ICEBREAK_EFFECT = 4,
MAKETYPE_SMOKE_EFFECT = 5,
MAKETYPE_CURSE_EFFECT = 6,
MAKETYPE_SLEEP_EFFECT = 7,
MAKETYPE_STUN_EFFECT = 8,
MAKETYPE_SILENCE_EFFECT = 9,
MAKETYPE_ANGELUS_EFFECT = 10,
MAKETYPE_CRUSIS_EFFECT = 11,
MAKETYPE_CRITICAL_EFFECT = 12,
MAKETYPE_LUCKY_EFFECT = 13,
MAKETYPE_BIRD_EFFECT = 14,
MAKETYPE_CART_EFFECT2 = 16,
MAKETYPE_CART_EFFECT3 = 17,
MAKETYPE_CART_EFFECT4 = 18,
MAKETYPE_CART_EFFECT5 = 19,
MAKETYPE_GUARD_EFFECT = 20,
MAKETYPE_CART_EFFECT6 = 21,
MAKETYPE_BLUE_EFFECT = 22,
MAKETYPE_BIRD_EFFECT2 = 23,
MAKETYPE_BIRD_EFFECT3 = 24,
MAKETYPE_CART_EFFECT11 = 25,
MAKETYPE_CART_EFFECT12 = 26,
MAKETYPE_CART_EFFECT13 = 27,
MAKETYPE_CART_EFFECT14 = 28,
MAKETYPE_CART_EFFECT15 = 29,
MAKETYPE_CART_EFFECT16 = 30,
MAKETYPE_CURSOR_EFFECT = 31,
MAKETYPE_BIRD_EFFECT4 = 32,
MAKETYPE_BIRD_EFFECT5 = 33,
MAKETYPE_BIRD_EFFECT6 = 34,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CGameMode.h"
#include "Network/Packets/NoticeEnums.h"
#include "Contents/Skills/SkillUnitId.h"
#include "Network/Packets/ModeResultEnums.h"
#include "Client/Mode/CLoginMode.h"
@ -610,7 +611,7 @@ void CGameMode::ReceivePendingResult(const unsigned char* packet) {
std::string text;
std::uint32_t color = 0xFF;
switch (*reinterpret_cast<const std::int16_t*>(packet + 10)) {
case 0:
case ERROR_TYPE_NONE:
case 8:
g_pendingAid = *reinterpret_cast<const int*>(packet + 2);
g_pendingGid = *reinterpret_cast<const int*>(packet + 6);
@ -624,25 +625,25 @@ void CGameMode::ReceivePendingResult(const unsigned char* packet) {
text = LookupMessage(54);
}
break;
case 1:
case ERROR_TYPE_NPC:
text = LookupMessage(1227);
break;
case 2:
case ERROR_TYPE_SYSTEM:
text = LookupMessage(1228);
break;
case 3:
case ERROR_TYPE_INVENTORY_WEIGHT:
text = LookupMessage(56);
break;
case 4:
case ERROR_TYPE_EXCHANGE:
text = LookupMessage(1229);
break;
case 5:
case ERROR_TYPE_ITEM_ID:
text = LookupMessage(1230);
break;
case 6:
case ERROR_TYPE_MONEY:
text = LookupMessage(1254);
break;
case 7:
case ERROR_TYPE_AMOUNT:
text = LookupMessage(1813);
break;
case 9:
@ -695,23 +696,23 @@ void CGameMode::ReceiveItem1718BasicList(const unsigned char* packet) {
// FUNCTION: fn_21793
void CGameMode::ReceiveItem1718Result(const unsigned char* packet) {
switch (packet[2]) {
case 0:
case PURCHASE_SUCCEED:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(54)), 0xFFFF00, 0, 0, 0);
break;
case 1:
case PURCHASE_FAIL_MONEY:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(55)), 0xFF, 0, 0, 0);
break;
case 3:
case PURCHASE_FAIL_COUNT:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(221)), 0xFF, 0, 0, 0);
break;
case 2:
case PURCHASE_FAIL_WEIGHT:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(56)), 0xFF, 0, 0, 0);
break;
case 9:
case PURCHASE_FAIL_EACHITEM_COUNT:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(1940)), 0xFF, 0, 0, 0);
break;
@ -1092,31 +1093,31 @@ void CGameMode::ReceiveResultNotice00FC(const unsigned char* packet) {
this->unknown_00FC = 0;
switch (packet[2]) {
case 0:
case ENTERROOM_FULL:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x43)), 0xFF, 0, 0, 0);
break;
case 1:
case ENTERROOM_WRONG_PASSWORD:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(7)), 0xFF, 0, 0, 0);
break;
case 2:
case ENTERROOM_KICKED:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x44)), 0xFF, 0, 0, 0);
break;
case 4:
case REFUSETYPE_ZENY:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x37)), 0xFF, 0, 0, 0);
break;
case 5:
case REFUSETYPE_LOWLEVEL:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x1B0)), 0xFF, 0, 0, 0);
break;
case 6:
case REFUSETYPE_HIGHLEVEL:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x1B1)), 0xFF, 0, 0, 0);
break;
case 7:
case REFUSETYPE_JOB:
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0x1B2)), 0xFF, 0, 0, 0);
break;
@ -1256,13 +1257,13 @@ void CGameMode::ReceiveServerRateNotice(const unsigned char* packet) {
std::memset(text, 0, sizeof(text));
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
switch (g_session.unknown_54A0) {
case 0:
case EXP_NOTSHARED:
std::sprintf(text, "%s - %s : %s", LookupMessage(291), LookupMessage(292), LookupMessage(287));
break;
case 1:
case EXP_SHARED:
std::sprintf(text, "%s - %s : %s", LookupMessage(291), LookupMessage(292), LookupMessage(288));
break;
case 2:
case EXP_CHANGE_IMPOSSIBLE:
std::sprintf(text, "%s - %s : %s(%s)", LookupMessage(291), LookupMessage(292), LookupMessage(287), LookupMessage(1535));
break;
}
@ -1458,25 +1459,25 @@ void CGameMode::ReceiveNamedResultNotice(const unsigned char* packet) {
void CGameMode::ReceiveResultNotice0118(const unsigned char* packet) {
g_windowMgr.SendNotice(3, 0, 0, 0, 0, 0);
switch (packet[2]) {
case 0:
case WT_EXCLUDE_WHISPER:
switch (packet[3]) {
case 1:
case WHIPSER_SETTING_FAILED:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>((this->unknown_0118 + LookupMessage(194)).c_str()), 0xFFFF, 0, 0, 0);
break;
case 2:
case WHISPER_SETTING_FAILED_OVERCOUNT:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>((this->unknown_0118 + LookupMessage(195)).c_str()), 0xFFFF, 0, 0, 0);
break;
}
break;
case 1:
case WT_INCLUDE_WHISPER:
switch (packet[3]) {
case 0:
case WHISPER_SETTING_SUCCEED:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>((this->unknown_0118 + LookupMessage(196)).c_str()), 0xFFFF, 0, 0, 0);
break;
case 1:
case WHIPSER_SETTING_FAILED:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>((this->unknown_0118 + LookupMessage(197)).c_str()), 0xFFFF, 0, 0, 0);
break;
case 2:
case WHISPER_SETTING_FAILED_OVERCOUNT:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>((this->unknown_0118 + LookupMessage(198)).c_str()), 0xFFFF, 0, 0, 0);
break;
}
@ -2096,20 +2097,20 @@ void CGameMode::ReceiveServiceRequest(unsigned char type, int value) {
case 4:
this->OpenServiceWindow(type);
break;
case 5:
case OUT_UI_TIP:
if (UITipboxWnd* window = static_cast<UITipboxWnd*>(g_windowMgr.EnsureWindow(315))) {
window->ShowTip(value);
}
break;
case 6:
case OUT_UI_QUEST:
g_renewQuestMgr->ShowQuestInfo(value);
break;
case 7:
case OUT_UI_ATTENDANCE:
if (UIWindow* window = g_windowMgr.EnsureWindow(328)) {
window->SendMsg(nullptr, 0x22, value, 0, 0, 0);
}
break;
case 8:
case OUT_UI_ENCHANTGRADE:
g_windowMgr.EnsureWindow(343);
break;
}

View file

@ -1457,7 +1457,7 @@ void CGameMode::ReceiveShortcutPagePacket(const unsigned char* data) {
void CGameMode::ReceiveCardCompositionResult(const unsigned char* data) {
const auto* packet = reinterpret_cast<const CardCompositionPacket*>(data);
switch (packet->result) {
case 0: {
case ITEMCOMPOSITON_SUCCESS: {
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(493)), 0xFFFF00, 0, 0, 0);
ITEM_INFO card = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->cardIndex);
ITEM_INFO equip = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->equipIndex);
@ -1475,7 +1475,7 @@ void CGameMode::ReceiveCardCompositionResult(const unsigned char* data) {
}
break;
}
case 1:
case ITEMCOMPOSITION_FAILURE:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(494)), 0xFF, 0, 0, 0);
break;
}
@ -2550,34 +2550,34 @@ void CGameMode::ReceivePartyMemberEffect(const unsigned char* data) {
}
switch (packet->type) {
case 0:
case LEVELUP_EFFECT:
actor->LaunchEffect(371, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 1:
case JOBLEVELUP_EFFECT:
actor->LaunchEffect(158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 7:
case LEVELUP_EFFECT2:
actor->LaunchEffect(338, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 9:
case LEVELUP_EFFECT3:
actor->LaunchEffect(582, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 8:
case JOBLEVELUP_EFFECT2:
actor->LaunchEffect(337, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 2:
case REFINING_FAIL_EFFECT:
actor->LaunchEffect(155, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 3:
case REFINING_SUCCESS_EFFECT:
actor->LaunchEffect(154, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 5:
case MAKEITEM_AM_SUCCESS_EFFECT:
actor->LaunchEffect(305, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 6:
case MAKEITEM_AM_FAIL_EFFECT:
actor->LaunchEffect(306, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 4:
case GAME_OVER_EFFECT:
g_partyEffectNoticePending = 1;
break;
}

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CGameMode.h"
#include "Network/Packets/NoticeEnums.h"
#include "Contents/Actors/Pc.h"
#include "Contents/Actors/RenderObject.h"
#include "Contents/Sound/SoundMgr.h"
@ -28,7 +29,7 @@ void CGameMode::ReceiveSound(const unsigned char* data) {
const SoundPacket* packet = reinterpret_cast<const SoundPacket*>(data);
switch (packet->act) {
case 0: {
case SOUND_ACT_PLAY: {
CRenderObject* actor = this->scene->GetGameActorByAID(packet->npcId);
if (actor != nullptr) {
CPlayer* player = this->scene->player;
@ -40,7 +41,7 @@ void CGameMode::ReceiveSound(const unsigned char* data) {
}
break;
}
case 1: {
case SOUND_ACT_REPEAT: {
GameModeLoopSound sound;
sound.name = packet->name;
sound.term = packet->term;
@ -50,7 +51,7 @@ void CGameMode::ReceiveSound(const unsigned char* data) {
g_soundMgr->PlayWave(packet->name, 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0);
break;
}
case 2:
case SOUNT_ACT_STOP:
for (std::vector<GameModeLoopSound>::iterator it = this->loopSounds.begin(); it != this->loopSounds.end(); ++it) {
GameModeLoopSound sound = *it;
if (std::strcmp(sound.name.c_str(), packet->name) == 0) {

View file

@ -1,4 +1,6 @@
#include "Client/Mode/CLoginMode.h"
#include "Client/Mode/ModeMessage.h"
#include "Contents/Configuration/ServiceEnums.h"
#include "Network/Packets/PacketId.h"
#include "Network/Packets/ModeResultEnums.h"
#include "Utility/EncryptedName.h"
@ -483,13 +485,13 @@ int GetClientType() {
switch (g_serviceType) {
case 1:
return 14;
case 2:
case ServiceJapan:
return 9;
case 3:
case ServiceChina:
return 4;
case 4:
case ServiceTaiwan:
return 5;
case 5:
case ServiceThai:
return 7;
case 6:
return 13;
@ -507,11 +509,11 @@ int GetClientType() {
return 22;
case 13:
return 23;
case 15:
case ServiceVietnam:
return 33;
case 19:
return 35;
case 14:
case ServiceRussia:
return 25;
case 20:
return 36;
@ -523,11 +525,11 @@ int GetClientType() {
switch (g_serviceType) {
case 7:
return 27;
case 2:
case ServiceJapan:
return 28;
case 5:
case ServiceThai:
return 29;
case 15:
case ServiceVietnam:
return 32;
case 6:
return 34;
@ -539,13 +541,13 @@ int GetClientType() {
switch (g_serviceType) {
case 1:
return 1;
case 2:
case ServiceJapan:
return 3;
case 3:
case ServiceChina:
return 4;
case 4:
case ServiceTaiwan:
return 5;
case 5:
case ServiceThai:
return 7;
case 6:
return 12;
@ -563,11 +565,11 @@ int GetClientType() {
return 22;
case 13:
return 23;
case 14:
case ServiceRussia:
return 25;
case 15:
case ServiceVietnam:
return 26;
case 17:
case ServiceChile:
return 30;
case 18:
return 31;
@ -1199,7 +1201,7 @@ void CLoginMode::SubD97F00(int) {
// FUNCTION: fn_22308
void CLoginMode::OpenAccountRegistration() {
switch (g_serviceType) {
case 0:
case ServiceKorea:
if (*reinterpret_cast<const int*>(&g_session.unknown_59DC[0x198]) == 1) {
const char* url = LookupMessage(1308);
const char source[] = {'\x30', '\x45', '\xCA', '\xFB', '\x9D'};
@ -1220,9 +1222,9 @@ void CLoginMode::OpenAccountRegistration() {
ShellExecuteA(hWnd, DecryptName<0x17A9E5BF39AD4737ULL>(source), file, nullptr, nullptr, SW_SHOWNORMAL);
break;
}
case 2:
case ServiceJapan:
break;
case 3: {
case ServiceChina: {
const char urlSource[] = {'\x2B', '\x5D', '\x27', '\x57', '\xEF', '\x90', '\x66', '\xED', '\x6D', '\x42', '\x26', '\x49', '\xB9', '\xCA', '\x27', '\xB7',
'\x20', '\x46', '\x3E', '\x08', '\xEA', '\xDE', '\x2A', '\xED', '\x7E', '\x5F', '\x3C', '\x52', '\xB6', '\xD7', '\x2C', '\xEB',
'\x6D', '\x44', '\x32', '\x4E', '\xBB', '\x99', '\x2A', '\xF0', '\x27', '\x14', '\x62', '\x17', '\xE5', '\x8F', '\x6F', '\xE9',
@ -2010,10 +2012,10 @@ void CLoginMode::ShowLoginError(int code, int argument) {
case 33:
message = LookupMessage(0xA7A);
break;
case 0:
case REFUSE_INVALID_ID:
message = LookupMessage(6);
break;
case 1:
case REFUSE_INVALID_PASSWD:
if (g_serviceType == 0 && ++g_loginFailCount >= 3) {
message = std::string(PasswordRetryExceededMessage{}().Text());
if (g_windowMgr.Confirm(message.c_str(), 0, true, true, 0, "Message", 280, 120, 0) == 0xB8) {
@ -2037,66 +2039,66 @@ void CLoginMode::ShowLoginError(int code, int argument) {
message = LookupMessage(0x10B);
}
break;
case 2:
case REFUSE_ID_EXPIRED:
message = LookupMessage(8);
break;
case 4:
case REFUSE_NOT_CONFIRMED:
case 0x13C6:
message = LookupMessage(0x10A);
break;
case 5:
case REFUSE_INVALID_VERSION:
message = LookupMessage(0x136);
break;
case 99:
case REFUSE_DELETED_ACCOUNT:
message = LookupMessage(0x170);
break;
case 6: {
case REFUSE_BLOCK_TEMPORARY: {
const std::string text = FormatOwnedString(LookupMessage(0x1C1), argument);
message = text;
break;
}
case 101: {
case REFUSE_TEMP_BAN_HACKING_INVESTIGATION: {
const std::string text = FormatOwnedString(LookupMessage(0x32A), argument);
message = text;
break;
}
case 102:
case REFUSE_TEMP_BAN_BUG_INVESTIGATION:
message = LookupMessage(0x32B);
break;
case 103:
case REFUSE_TEMP_BAN_DELETING_CHAR:
message = LookupMessage(0x35B);
break;
case 104:
case REFUSE_TEMP_BAN_DELETING_SPOUSE_CHAR:
message = LookupMessage(0x35C);
break;
case 7:
message = LookupMessage(0x1B7);
break;
case 8:
case REFUSE_NONSAKRAY_ID_BLOCKED:
message = LookupMessage(0x2A9);
break;
case 9:
case REFUSE_BAN_BY_DBA:
message = LookupMessage(0x2BF);
break;
case 10:
case REFUSE_EMAIL_NOT_CONFIRMED:
message = LookupMessage(0x2C0);
break;
case 11:
case REFUSE_BAN_BY_GM:
message = LookupMessage(0x2C1);
break;
case 12:
case REFUSE_TEMP_BAN_FOR_DBWORK:
message = LookupMessage(0x2C2);
break;
case 13:
case REFUSE_SELF_LOCK:
message = LookupMessage(0x2C3);
break;
case 14:
case REFUSE_NOT_PERMITTED_GROUP:
message = LookupMessage(0x2C4);
break;
case 15:
case REFUSE_WAIT_FOR_SAKRAY_ACTIVE:
message = LookupMessage(0x2C5);
break;
case 100: {
case REFUSE_ALREADY_CONNECT: {
const std::string text = FormatOwnedString(LookupMessage(0x329), argument);
message = text;
break;
@ -2121,10 +2123,10 @@ void CLoginMode::ShowLoginError(int code, int argument) {
message.clear();
}
break;
case 106:
case ACCEPT_LOGIN_USER_PHONE_BLOCK:
message = LookupMessage(0x50D);
break;
case 105:
case REFUSE_USER_PHONE_BLOCK:
message = LookupMessage(0x55C);
break;
case 17: {
@ -2416,13 +2418,13 @@ void CLoginMode::PollNetworkStatus() {
while (GetRagConnection().ReadPacket(g_gameModePacketBuffer, nullptr, g_packetLengths)) {
switch (GetRagConnection().GetPacketType(reinterpret_cast<const char*>(g_gameModePacketBuffer))) {
case 0x69:
case 0x6D:
case ID_AC_ACCEPT_LOGIN_V1:
case ID_HC_ACCEPT_MAKECHAR_V1:
case ID_PING:
case 0x283:
case 0x8E3:
case 0x8E4:
case 0x99D:
case ID_HC_ACK_CHARINFO_PER_PAGE_V1:
case 0x9C2:
case 0xA4D:
case 0xA73:
@ -2431,7 +2433,7 @@ void CLoginMode::PollNetworkStatus() {
case 0xAE0:
case 0xC20:
break;
case 0x6A: {
case ID_AC_REFUSE_LOGIN_V1: {
RefuseLoginPacket* packet = reinterpret_cast<RefuseLoginPacket*>(g_gameModePacketBuffer);
packet->blockDate[19] = '\0';
this->ShowLoginError(packet->result, reinterpret_cast<int>(packet->blockDate));
@ -2533,10 +2535,10 @@ void CLoginMode::PollNetworkStatus() {
this->pendingCursorType = 7;
break;
}
case 0x71:
case ID_HC_NOTIFY_ZONESVR_V1:
this->ReceiveNotifyZoneServer(reinterpret_cast<const NotifyZoneServerPacket*>(g_gameModePacketBuffer));
break;
case 0x73:
case ID_ZC_ACCEPT_ENTER_V1:
this->Zc_Accept_Enter2(reinterpret_cast<const AcceptEnterPositionPacket*>(g_gameModePacketBuffer));
return;
case ID_ZC_REFUSE_ENTER:
@ -2625,7 +2627,7 @@ void CLoginMode::PollNetworkStatus() {
}
break;
}
case 0x290:
case ID_HC_ACK_CHANGE_CHARNAME_V1:
this->ReceiveCharacterResult(reinterpret_cast<const CharacterResultPacket*>(g_gameModePacketBuffer));
break;
case 0x2CA:
@ -2789,7 +2791,7 @@ void CLoginMode::PollNetworkStatus() {
break;
}
break;
case 0x8D5:
case ID_HC_ACK_CHANGE_CHARACTER_SLOT_V1:
case ID_HC_ACK_CHANGE_CHARACTER_SLOT:
if (reinterpret_cast<const SecondPasswordStatePacket*>(g_gameModePacketBuffer)->result == 1) {
g_windowMgr.Confirm(LookupMessage(0x7E1), 0, true, false, 0, "Message", 280, 120, 0);
@ -2969,38 +2971,38 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
(void)argument4;
switch (event) {
case 0:
case MM_COMMAND:
switch (argument1) {
case 10001:
case LMM_MAKECHARACTER:
this->pendingCursorType = 8;
return 0;
case 10002:
case LMM_TRANSFERCHARACTER:
this->pendingCursorType = 9;
return 0;
case 10004:
case LMM_SELECTCHARACTER:
this->pendingCursorType = 7;
return 0;
case 10006:
case LMM_CANCEL:
if (this->cursorType == 7) {
g_windowMgr.Shutdown();
GetRagConnection().Close();
this->pendingCursorType = 6;
}
return 0;
case 10010:
case LMM_DELETE_CHARACTER:
this->pendingCursorType = 11;
return 0;
default:
return 0;
}
case 1:
case MM_SOCKETERROR:
GetRagConnection().Close();
if (g_windowMgr.Confirm(LookupMessage(2), 0, true, true, 0, "Message", 280, 120, 0) != 0x10D) {
g_charServerAccountIdPending = 0;
this->pendingCursorType = 3;
}
return 0;
case 8:
case MM_QUERYCHARICTORINFO:
for (int i = 0; i < this->characterCount; ++i) {
if (this->characters[i].slot == argument1) {
return reinterpret_cast<int>(&this->characters[i]);
@ -3069,10 +3071,10 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
return 0;
}
return reinterpret_cast<int>(&this->characters[this->characterCount - 1]);
case 10000:
case LMM_CONNECT_TO_ACSVR:
this->pendingCursorType = 4;
return 0;
case 10003: {
case LMM_SELECTSVR: {
*reinterpret_cast<int*>(this->unknown_01C8) = argument1;
if (argument1 == -1) {
return 0;
@ -3104,10 +3106,10 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
this->pendingCursorType = 5;
return 0;
}
case 10005:
case LMM_SENDCHARINFO:
this->pendingCursorType = 10;
return 0;
case 10006:
case LMM_CANCEL:
if (this->cursorType == 6 || this->cursorType == 27) {
GetRagConnection().Close();
g_charServerAccountIdPending = 0;
@ -3118,14 +3120,14 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
this->pendingCursorType = 7;
}
return 0;
case 10007:
case LMM_PASSWORD:
strcpy(reinterpret_cast<char*>(this->unknown_0138), reinterpret_cast<const char*>(argument1));
return 0;
case 10008:
case LMM_ID:
strcpy(reinterpret_cast<char*>(&this->unknown_0138[0x40]), reinterpret_cast<const char*>(argument1));
strcpy(reinterpret_cast<char*>(g_session.unknown_07F4), reinterpret_cast<const char*>(argument1));
return 0;
case 10009: {
case LMM_SELECT_CHARACTER: {
g_session.unknown_0F50 = static_cast<unsigned char>(g_selectedSlotIndex);
g_windowMgr.LoadShortcutItems();
for (int i = 0; i < this->characterCount; ++i) {
@ -3206,25 +3208,25 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
}
return 0;
}
case 10011:
case LMM_GOTO_LOGIN:
GetRagConnection().Close();
g_charServerAccountIdPending = 0;
this->pendingCursorType = 3;
return 0;
case 10012:
case LMM_SET_EMAIL_ADDRESS:
g_windowMgr.InvalidateAll();
strcpy(reinterpret_cast<char*>(this->billingInfo), reinterpret_cast<const char*>(argument1));
return 0;
case 10013:
case LMM_GET_EMAIL_ADDRESS:
return reinterpret_cast<int>(this->billingInfo);
case 10014:
case LMM_GET_MAKING_CHAR_NAME:
return reinterpret_cast<int>(&this->unknown_0078);
case 10015:
case LMM_SET_MAKING_CHAR_NAME:
strcpy(reinterpret_cast<char*>(&this->unknown_0078), reinterpret_cast<const char*>(argument1));
return 0;
case 10016:
case LMM_GET_CHAR_PARAM:
return reinterpret_cast<int>(this->charParams);
case 10017: {
case LMM_SET_CHAR_PARAM: {
const int* values = reinterpret_cast<const int*>(argument1);
this->charParams[0] = values[0];
this->charParams[1] = values[1];
@ -3236,14 +3238,14 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
this->unknown_0074 = values[7];
return 0;
}
case 10018:
case LMM_GOTOSELECTACCOUNT:
if (argument2 == 201) {
g_modeMgr.gameMode->SendMsg(2, 0, 0, 0, 0);
return 0;
}
this->pendingCursorType = 2;
return 0;
case 10019:
case LMM_SELECTACCOUNT:
this->unknown_6F48 = argument1;
*reinterpret_cast<int*>(&g_session.unknown_5478[4]) = argument1;
TraceSelection(argument1);
@ -3273,7 +3275,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
}
this->pendingCursorType = (g_serviceType == 5 || g_serviceType == 7) ? 13 : 3;
return 0;
case 10020: {
case LMM_GET_BILLING_INFO: {
char* output = reinterpret_cast<char*>(argument1);
switch (this->slotExtension.unknown_0001) {
case 100:
@ -3312,7 +3314,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
return 0;
}
}
case 10021:
case LMM_DISCONNECT_ACSVR:
GetRagConnection().Close();
if (g_windowMgr.Confirm(LookupMessage(1), 0, true, false, 0, "Message", 280, 120, 0) != 0x10D) {
this->otpStarted = timeGetTime();
@ -3320,7 +3322,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3,
this->pendingCursorType = 3;
}
return 0;
case 10022:
case LMM_SELECTACCOUNT2:
this->unknown_6F4C = argument1;
this->unknown_6F38.clear();
TraceSelectionRange(this->unknown_6F48, this->unknown_6F4C);

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CLoginMode.h"
#include "Network/Packets/NoticeEnums.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/Session.h"
#include "Contents/Configuration/ServiceConfiguration.h"
@ -151,25 +152,25 @@ void CLoginMode::ReceiveNotifyBan(const unsigned char* data) {
GetRagConnection().Close();
switch (errorCode) {
case 0:
case BAN_UNFAIR:
strcpy(text, LookupMessage(3));
break;
case 1:
case BAN_SERVER_SHUTDOWN:
strcpy(text, LookupMessage(4));
break;
case 2:
case BAN_ANOTHER_LOGIN:
strcpy(text, LookupMessage(5));
break;
case 3:
case BAN_DETECTED_SPEEDHACK:
strcpy(text, LookupMessage(241));
break;
case 4:
case BAN_PC_OVERFLOW:
strcpy(text, LookupMessage(264));
break;
case 5:
case BAN_UNDER_AGE:
strcpy(text, LookupMessage(305));
break;
case 6:
case BAN_NOT_SETTLED:
strcpy(text, LookupMessage(438));
if (g_windowMgr.Confirm(text, 2, true, true, 0, "Message", 280, 120, 0) == 187) {
g_modeMgr.Quit();
@ -177,55 +178,55 @@ void CLoginMode::ReceiveNotifyBan(const unsigned char* data) {
}
text[0] = '\0';
break;
case 7:
case BAN_ACCOUNT_BUSY:
strcpy(text, LookupMessage(439));
break;
case 8:
case BAN_INFORMATION_REMAINED:
strcpy(text, LookupMessage(440));
break;
case 9:
case BAN_IP_OVERFLOW:
strcpy(text, LookupMessage(529));
break;
case 10:
case BAN_PAY_OUT:
strcpy(text, LookupMessage(530));
break;
case 11:
case BAN_PAY_SUSPEND:
strcpy(text, LookupMessage(575));
break;
case 12:
case BAN_PAY_CHANGE:
strcpy(text, LookupMessage(576));
break;
case 13:
case BAN_PAY_WRONGIP:
strcpy(text, LookupMessage(577));
break;
case 14:
case BAN_PAY_PNGAMEROOM:
strcpy(text, LookupMessage(578));
break;
case 16:
case BAN_JAPAN_REFUSE1:
strcpy(text, LookupMessage(606));
break;
case 17:
case BAN_JAPAN_REFUSE2:
strcpy(text, LookupMessage(607));
break;
case 18:
case BAN_INFORMATION_REMAINED_ANOTHER_ACCOUNT:
strcpy(text, LookupMessage(678));
break;
case 100:
case BAN_PC_IP_UNFAIR:
strcpy(text, LookupMessage(1123));
break;
case 101:
case BAN_PC_IP_COUNT_ALL:
strcpy(text, LookupMessage(1178));
break;
case 102:
case BAN_PC_IP_COUNT:
strcpy(text, LookupMessage(1179));
break;
case 103:
case BAN_GRAVITY_MEM_AGREE:
strcpy(text, LookupMessage(1309));
break;
case 104:
case BAN_GAME_MEM_AGREE:
strcpy(text, LookupMessage(1310));
break;
case 105:
case BAN_HAN_VALID:
strcpy(text, LookupMessage(1311));
break;
case 107:

View file

@ -0,0 +1,200 @@
#ifndef RAGNAROK_SOURCE_CLIENT_MODE_MODEMESSAGE_H
#define RAGNAROK_SOURCE_CLIENT_MODE_MODEMESSAGE_H
enum MODETYPE : int {
MT_LOGIN = 0,
MT_GAME = 1,
};
enum MODEMESSAGE : int {
MM_COMMAND = 0,
MM_SOCKETERROR = 1,
MM_SHOWMOUSEPOINTER = 4,
MM_HIDEMOUSEPOINTER = 5,
MM_CHATMSG = 6,
MM_BROADCASTMSG = 7,
MM_QUERYCHARICTORINFO = 8,
MM_QUERYRSWNAME = 9,
MM_CONTACTNPC = 10,
MM_WHISPERMSG = 11,
MM_ADDREGISTERPOS = 12,
MM_DELETEREGISTERPOS = 13,
MM_DISCONNECT_CHARACTER = 14,
MM_DISCONNECT_ALL_CHARACTER = 15,
MM_ITEMTHROW = 16,
MM_DROP = 17,
MM_CANCEL_DRAG = 18,
MM_WEAR_EQUIP = 19,
MM_TAKE_OFF_EQUIP = 20,
MM_ITEMTHROW_THROUGH_DROPCNTWND = 21,
MM_REQ_NEXT_SCRIPT = 22,
MM_CHOOSE_MENU = 23,
MM_MENUSELECTED = 24,
MM_RESTART = 25,
MM_USEITEM = 27,
MM_REQ_STATUS = 29,
MM_STATUS_CHANGE = 30,
MM_REQ_EMOTION = 31,
MM_REQ_NUM_USER = 32,
MM_REQ_PURCHASE = 34,
MM_REQ_SELL = 35,
MM_ACK_SELL = 37,
MM_ACK_BUY = 38,
MM_TOGGLE_PLAYERGAGE = 41,
MM_PROCESS_TALK_TYPE = 42,
MM_CREATE_CHATROOM = 43,
MM_CHANGE_CHATROOM = 44,
MM_REQ_ENTER_ROOM = 45,
MM_REQ_ROLE_CHANGE = 46,
MM_REQ_EXPEL_MEMBER = 47,
MM_REQ_EXIT_ROOM = 48,
MM_REQ_EXCHANGE_ITEM = 49,
MM_ACK_EXCHANGE_ITEM = 50,
MM_ADD_EXCHANGE_ITEM = 51,
MM_CONCLUDE_EXCHANGE_ITEM = 52,
MM_CANCEL_EXCHANGE_ITEM = 53,
MM_EXEC_EXCHANGE_ITEM = 54,
MM_ADD_ITEM_TO_STORE = 55,
MM_MOVE_ITEM_FROM_STORE_TO_BODY = 56,
MM_REQ_JOIN_GROUP = 59,
MM_JOIN_GROUP = 60,
MM_REQ_LEAVE_GROUP = 61,
MM_REQ_EXPEL_GROUP_MEMBER = 62,
MM_ADDPARTYPOS = 63,
MM_DELETEPARTYPOS = 64,
MM_DELETEPARTYPOSALL = 65,
MM_CHAT_PARTY = 66,
MM_UPGRADE_SKILLLEVEL = 67,
MM_USE_SKILL = 69,
MM_USE_SKILL_TOGROUND = 70,
MM_CANCEL_USE_SKILL = 71,
MM_HANG_USE_SKILL = 72,
MM_CANCEL_LOCKON = 73,
MM_SELECT_WARPPOINT = 74,
MM_REMEMBER_WARPPOINT = 75,
MM_MOVE_ITEM_FROM_BODY_TO_CART = 76,
MM_MOVE_ITEM_FROM_CART_TO_BODY = 77,
MM_MOVE_ITEM_FROM_STORE_TO_CART = 78,
MM_MOVE_ITEM_FROM_CART_TO_STORE = 79,
MM_REQ_CLOSESTORE = 81,
MM_REQ_OPENSTORE = 82,
MM_PC_PURCHASE_ITEMLIST_FROMMC = 83,
MM_REQ_BUY_FROMMC = 84,
MM_MAKE_SKILL_USED_MSG = 86,
MM_CLOSE_DIALOG = 89,
MM_REFRESH_MUSIC = 90,
MM_ITEM_CREATE = 91,
MM_MOVETO_MAP = 92,
MM_USESKILL_LEVEL_PLUS = 93,
MM_USESKILL_LEVEL_MINUS = 94,
MM_GET_SKILL_USE_TYPE = 95,
MM_CHANGE_GROUPEXPOPTION = 96,
MM_GET_SKILL_USE_LEVEL = 97,
MM_SEND_NUMBER_TO_NPC = 99,
MM_SHOW_IMAGE = 100,
MM_SEND_GUILD_EMBLEM = 102,
MM_REQ_CHANGE_MEMBERPOS = 103,
MM_REQ_CHANGE_GUILD_POSITIONINFO = 104,
MM_REQ_GUILD_MENUINTERFACE = 105,
MM_REQ_DISORGANIZE_GUILD = 106,
MM_REQ_GUILD_MENU = 107,
MM_REQ_OPEN_MEMBER_INFO = 109,
MM_REQ_LEAVE_GUILD = 110,
MM_REQ_BAN_GUILD = 111,
MM_REQ_MAKE_GUILD = 112,
MM_JOIN_GUILD = 114,
MM_REQ_JOIN_GUILD = 115,
MM_REQ_GIVE_MANNER_POINT = 117,
MM_GUILD_NOTICE = 118,
MM_REQ_ALLY_GUILD = 119,
MM_ALLY_GUILD = 120,
MM_REQ_ITEMIDENTIFY = 121,
MM_QUAKE = 122,
MM_REQ_ITEMCOMPOSITION_LIST = 123,
MM_REQ_ITEMCOMPOSITION = 124,
MM_REQ_HOSTILE_GUILD = 125,
MM_REQ_DELETE_RELATED_GUILD = 127,
MM_REQ_DISCONNECT = 128,
MM_CHAT_GUILD = 129,
MM_REQ_MAKING_ITEM = 130,
MM_USE_SKILL_TOGROUND_WITH_TALKBOX = 131,
MM_BEGIN_DRAG_FROM_METALPROCESSWND = 134,
MM_SETQUAKEINFO = 135,
MM_ITEMPICKUP = 136,
MM_REQUEST_ACT = 137,
MM_REQUEST_MOVE = 138,
MM_CHANGE_DIRECTION = 139,
MM_QUIT_TO_IDENTRY = 141,
MM_RESET_PARAMETER = 142,
MM_REQ_CHANGE_MAPTYPE = 143,
MM_CHANGE_EFFECTSTATE = 144,
MM_PET_RENAME = 145,
MM_PETEGG_SELECT_FROM_LIST = 146,
MM_REQ_PETEGG_INFO = 147,
MM_PET_ACT = 148,
MM_PETDECEIVE_SHOOT = 149,
MM_COMMAND_PET = 150,
MM_ARROW_FROM_LIST = 153,
MM_SELECT_CART = 154,
MM_REMOVE_TO_AID = 155,
MM_SHIFT_TO_GID = 156,
MM_RECALL_AID = 157,
MM_RECALL_GID = 158,
MM_BILLING_INFO = 161,
MM_SELECT_SPELL = 163,
MM_SEND_TEXT_TO_NPC = 164,
MM_JOIN_COUPLE = 167,
MM_CONFORM_MAKEGROUP = 168,
MM_DORIDORI = 169,
MM_ADDGUILDPOS = 170,
MM_DELETEGUILDPOS = 171,
MM_DELETEGUILDPOSALL = 172,
MM_JOIN_BABY = 173,
MM_REPAIRITEM_SELECT_FROM_LIST = 174,
MM_JOIN_FRIEND = 175,
MM_DELETE_FRIEND = 176,
MM_REQ_JOIN_BABY = 179,
MM_REFINEITEM_SELECT_FROM_LIST = 182,
MM_MER_RENAME = 185,
MM_COMMAND_MER = 186,
MM_STARPLACE_ACCEPT = 190,
MM_GET_MAIL_LIST = 191,
MM_RESET_MAIL_ITEM = 193,
MM_RETURN_MAIL = 197,
MM_GET_MAIL_ITEM = 198,
MM_REQ_HUNTING = 246,
MM_REQ_BUY_CASH_POINT = 249,
MM_REBIRTH = 250,
MM_CHAT_BATTLEFIELD = 254,
MM_GROUP_CHANGE_MASTER = 260,
MM_WHISPER_FILTER = 285,
MM_SHORTCUT_KEY_CHANGE = 313,
};
enum LOGINMODEMESSAGE : int {
LMM_CONNECT_TO_ACSVR = 10000,
LMM_MAKECHARACTER = 10001,
LMM_TRANSFERCHARACTER = 10002,
LMM_SELECTSVR = 10003,
LMM_SELECTCHARACTER = 10004,
LMM_SENDCHARINFO = 10005,
LMM_CANCEL = 10006,
LMM_PASSWORD = 10007,
LMM_ID = 10008,
LMM_SELECT_CHARACTER = 10009,
LMM_DELETE_CHARACTER = 10010,
LMM_GOTO_LOGIN = 10011,
LMM_SET_EMAIL_ADDRESS = 10012,
LMM_GET_EMAIL_ADDRESS = 10013,
LMM_GET_MAKING_CHAR_NAME = 10014,
LMM_SET_MAKING_CHAR_NAME = 10015,
LMM_GET_CHAR_PARAM = 10016,
LMM_SET_CHAR_PARAM = 10017,
LMM_GOTOSELECTACCOUNT = 10018,
LMM_SELECTACCOUNT = 10019,
LMM_GET_BILLING_INFO = 10020,
LMM_DISCONNECT_ACSVR = 10021,
LMM_SELECTACCOUNT2 = 10022,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Client/Mode/ModeMgr.h"
#include "Client/Mode/ModeMessage.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/CLoginMode.h"
@ -32,10 +33,10 @@ void CModeMgr::Run(int mode, const char* name) {
this->state = this->nextState;
std::strcpy(this->modeName, this->nextModeName);
switch (this->state) {
case 0:
case MT_LOGIN:
this->gameMode = new CLoginMode();
break;
case 1:
case MT_GAME:
this->gameMode = new CGameMode();
break;
}

View file

@ -1008,7 +1008,7 @@ std::vector<unsigned char> CSession::BuildSkillListReplayPacket(short id) {
return BuildSkillInfoListPacket(0x10F, this->m_skillBundle.skills);
case ID_ZC_HOSKILLINFO_LIST:
return BuildSkillInfoListPacket(0x235, this->m_homunSkills);
case 0x29D:
case ID_ZC_MER_SKILLINFO_LIST:
return BuildSkillInfoListPacket(0x29D, this->m_mercSkills);
default:
return {};

View file

@ -778,13 +778,13 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) {
equipped = &this->unknown_17F0[0];
break;
case EQP_HAND_R:
case 0x22:
case EQP_HAND_R | EQP_HAND_L:
equipped = &this->unknown_17F0[1];
break;
case EQP_GARMENT:
equipped = &this->unknown_17F0[2];
break;
case 0x88:
case EQP_ACC_RL:
equipped = &this->unknown_17F0[3];
break;
case EQP_ARMOR:
@ -797,13 +797,13 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) {
equipped = &this->unknown_17F0[6];
break;
case EQP_HEAD_TOP:
case 0x101:
case 0x300:
case 0x301:
case EQP_HEAD_TOP | EQP_HEAD_LOW:
case EQP_HEAD_TOP | EQP_HEAD_MID:
case EQP_HEAD_TOP | EQP_HEAD_MID | EQP_HEAD_LOW:
equipped = &this->unknown_17F0[8];
break;
case EQP_HEAD_MID:
case 0x201:
case EQP_HEAD_MID | EQP_HEAD_LOW:
equipped = &this->unknown_17F0[9];
break;
case EQP_COSTUME_HEAD_LOW:
@ -831,13 +831,13 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) {
equipped = &this->unknown_2B50[7];
break;
case EQP_COSTUME_HEAD_TOP:
case 0xC00:
case 0x1400:
case 0x1C00:
case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID:
case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_LOW:
case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW:
equipped = &this->unknown_2B50[8];
break;
case EQP_COSTUME_HEAD_MID:
case 0x1800:
case EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW:
equipped = &this->unknown_2B50[9];
break;
}

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CGameMode.h"
#include "Contents/Skills/SkillId.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/Session.h"
#include "Contents/Actors/GameActor.h"
@ -11,18 +12,18 @@
// FUNCTION: fn_23850
int CSession::IsState291To303(int state) const {
switch (state) {
case 291:
case 292:
case 293:
case 294:
case 295:
case 297:
case 298:
case 299:
case 300:
case 301:
case 302:
case 303:
case SA_MONOCELL:
case SA_CLASSCHANGE:
case SA_SUMMONMONSTER:
case SA_REVERSEORCISH:
case SA_DEATH:
case SA_TAMINGMONSTER:
case SA_QUESTION:
case SA_GRAVITY:
case SA_LEVELUP:
case SA_INSTANTDEATH:
case SA_FULLRECOVERY:
case SA_COMA:
return 1;
default:
return 0;

View file

@ -0,0 +1,177 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_ACTORS_ACTORENUMS_H
#define RAGNAROK_SOURCE_CONTENTS_ACTORS_ACTORENUMS_H
enum ACTORSTATEID : int {
ST_STAND = 0,
ST_MOVE = 1,
ST_ATTACK = 2,
ST_DEAD = 3,
ST_DAMAGE = 4,
ST_PICKUP = 5,
ST_SIT = 6,
ST_SKILL = 7,
ST_BEGIN_SKILL = 8,
ST_ATTACK2 = 9,
ST_SLEEP = 10,
ST_ATTACKWAIT = 11,
ST_THROW = 12,
ST_AUTOCOUNTER = 13,
ST_DANCE = 16,
ST_SING = 17,
ST_READYSHOT = 18,
ST_READYJUMP = 19,
ST_LANDJUMP = 20,
ST_R_STORM = 21,
ST_R_DOWN = 22,
ST_R_TURN = 23,
ST_R_COUNTER = 24,
ST_R_DODGE = 25,
ST_A_COUNTER = 26,
ST_A_JUMPKICK = 27,
ST_THROW2 = 28,
ST_A_STORM = 30,
ST_A_DOWN = 31,
ST_A_TURN = 32,
ST_SG_DOWN = 33,
ST_SG_TURN = 34,
ST_NINJASKILL1 = 35,
ST_NINJASKILL2 = 36,
ST_NINJAREADY = 37,
ST_GUNSKILL1 = 38,
ST_GUNSKILL2 = 39,
ST_GUNSKILL3 = 40,
ST_GUNREADY = 41,
ST_GUNREADY2 = 42,
ST_MADOSKILL = 43,
ST_MADOSKILL2 = 44,
ST_AB_SPECIAL = 45,
};
enum AIPROPERTY : int {
V_OWNER = 0,
V_POSITION = 1,
V_MOTION = 3,
V_ATTACKRANGE = 4,
V_TARGET = 5,
V_SKILLATTACKRANGE = 6,
V_HOMUNTYPE = 7,
V_HP = 8,
V_SP = 9,
V_MAXHP = 10,
V_MAXSP = 11,
V_MERTYPE = 12,
};
enum AICOMMAND : int {
MOVE_CMD = 1,
ATTACK_OBJECT_CMD = 3,
ATTACK_AREA_CMD = 4,
PATROL_CMD = 5,
SKILL_OBJECT_CMD = 7,
SKILL_AREA_CMD = 8,
};
enum ACTORMESSAGE : int {
AM_MOVE = 0,
AM_STANDENTRY = 3,
AM_INITSTANDENTRY = 4,
AM_MOVEENTRY = 5,
AM_INITMOVEENTRY = 6,
AM_CHAT = 7,
AM_FREEZE = 8,
AM_PREMOVE = 9,
AM_PROCEEDATTACK = 10,
AM_ACTION = 11,
AM_DEAD = 12,
AM_CANCELATTACK = 13,
AM_SETPOS = 14,
AM_ATTACKCLICKUP = 15,
AM_REQ_CHANGE_DIR = 16,
AM_REQ_MOVE = 17,
AM_PROCEEDPICKUPITEM = 18,
AM_SETMASTERGID = 22,
AM_EFFECT_DEAD = 23,
AM_MASTER_DEAD = 24,
AM_CHILD_DEAD = 25,
AM_ATTACKED = 26,
AM_WILL_BE_ATTACKED = 27,
AM_REQ_ATTACK = 29,
AM_REQ_SIT = 31,
AM_MAKE_CHAT_TITLE = 32,
AM_DELETE_CHAT_TITLE = 33,
AM_UPDATEGAGE = 34,
AM_REMOVEGAGE = 35,
AM_SKILL = 37,
AM_GROUNDSKILL = 38,
AM_ATTACKEDNOMOTION = 39,
AM_REQ_ATTACK_REPEAT = 40,
AM_PROCEEDSKILL = 41,
AM_REQ_SKILL = 42,
AM_ATTR_STATE_CHANGE = 43,
AM_SETCOUNT = 44,
AM_SKILLSTANDENTRY = 45,
AM_SETPARAM = 46,
AM_SETJOB = 47,
AM_MSGMASTER_DEAD = 49,
AM_SET_MASTER_POINTER = 50,
AM_DISAPPEAR = 53,
AM_DELETE_SHOP_TITLE = 54,
AM_MAKE_SHOP_TITLE = 55,
AM_CORRECT_POS = 61,
AM_SETPOS2 = 64,
AM_PROCEEDGROUNDSKILL = 65,
AM_REQ_GROUND_SKILL = 66,
AM_SET_DURATION = 80,
AM_SET_TARGET_AID = 81,
AM_MAKE_SKILL_RECHARGEGAGE = 82,
AM_DELETE_SKILL_RECHARGEGAGE = 83,
AM_MAKE_NUMBER = 88,
AM_MAKE_MISS = 89,
AM_SET_SKILL_USE_LEVEL = 90,
AM_REQ_MOVE_PRIMITIVE = 91,
AM_ATTACKED_CRITICAL = 93,
AM_ATTACKED_LUCKY = 94,
AM_MAKE_LUCKY = 95,
AM_ATTACKED_SKILL = 96,
AM_ATTACKEDNOMOTION_SKILL = 97,
AM_RESURRECTION = 98,
AM_OUTOFSIGHT = 99,
AM_SET_HEAD_DIR = 100,
AM_MAKE_BIRD = 101,
AM_DELETE_BIRD = 102,
AM_PROCEEDTOUCHSKILL = 103,
AM_DELETE_EFFECT = 109,
AM_STATUS_CHANGE = 110,
AM_SETTIME = 115,
AM_SET_SKILL = 117,
AM_SKILL_UPDATE = 119,
AM_IS_HAVE_EFFECT = 120,
AM_INITSTANDENTRY2 = 121,
AM_INITMOVEENTRY2 = 122,
AM_MOVEENTRY2 = 123,
AM_STANDENTRY2 = 124,
};
enum PROCEEDTYPE : int {
PT_ATTACK = 1,
PT_PICKUPITEM = 2,
PT_SKILL = 3,
PT_GROUNDSKILL = 4,
PT_ATTACK_2 = 5,
PT_TOUCH_SKILL = 6,
};
enum MOTIONTYPE : int {
MT_LOOP = 0,
MT_ONETIME = 1,
MT_STATIC = 2,
};
enum BLURACTORMESSAGE : int {
BM_RGB = 0,
BM_ALPHA = 1,
BM_MOTIONY = 2,
BM_MOTION_FREEZE = 3,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Contents/Actors/GameActor.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Jobs/JobId.h"
#include "Contents/Skills/SkillId.h"
@ -144,7 +145,7 @@ bool CGameActor::ProcessState() {
int moved = 0;
switch (this->render.unknown_0070) {
case 0xD:
case ST_AUTOCOUNTER:
if (this->unknown_0178 == 0) {
this->unknown_0178 = 1;
if (g_session.IsPlayerJobId(this->GetEffectiveJob(-1)) != 0) {
@ -169,7 +170,7 @@ bool CGameActor::ProcessState() {
this->unknown_0258 = serverTime;
return true;
case 0:
case ST_STAND:
if (this->render.unknown_006C == 1 && this->render.isMotionFinished) {
this->SetState(0, 1);
} else if (this->unknown_0314 == 7 && this->render.accountId == g_session.unknown_1010 && static_cast<std::uint32_t>(this->unknown_027C) > 0 &&
@ -189,7 +190,7 @@ bool CGameActor::ProcessState() {
this->unknown_0258 = serverTime;
return true;
case 1:
case ST_MOVE:
if (this->route.Empty()) {
break;
} else {
@ -269,9 +270,9 @@ bool CGameActor::ProcessState() {
goto applyHeight;
}
case 2:
case 9:
case 0xC:
case ST_ATTACK:
case ST_ATTACK2:
case ST_THROW:
case 0x34:
case 0x35:
case 0x36:
@ -287,7 +288,7 @@ bool CGameActor::ProcessState() {
this->unknown_0258 = serverTime;
return true;
case 8:
case ST_BEGIN_SKILL:
this->unknown_0178 = 0;
this->ProcessMotion();
{
@ -305,9 +306,9 @@ bool CGameActor::ProcessState() {
this->unknown_0258 = serverTime;
return true;
case 5:
case 7:
case 0x2D:
case ST_PICKUP:
case ST_SKILL:
case ST_AB_SPECIAL:
this->unknown_0178 = 0;
this->ProcessMotion();
if (this->render.isMotionFinished) {
@ -317,7 +318,7 @@ bool CGameActor::ProcessState() {
this->unknown_0258 = serverTime;
return true;
case 4:
case ST_DAMAGE:
this->unknown_0178 = 0;
this->ProcessMotion();
{
@ -342,7 +343,7 @@ bool CGameActor::ProcessState() {
}
break;
case 3:
case ST_DEAD:
this->render.unknown_00C8 = 0;
this->render.unknown_00D8 = 0;
this->render.unknown_00DC = 0;
@ -362,35 +363,35 @@ bool CGameActor::ProcessState() {
this->unknown_0258 = serverTime;
return true;
case 10:
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
case 0x19:
case 0x1A:
case 0x1B:
case 0x1C:
case 0x1E:
case 0x1F:
case 0x20:
case 0x21:
case 0x22:
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2A:
case 0x2B:
case 0x2C:
case ST_SLEEP:
case ST_DANCE:
case ST_SING:
case ST_READYSHOT:
case ST_READYJUMP:
case ST_LANDJUMP:
case ST_R_STORM:
case ST_R_DOWN:
case ST_R_TURN:
case ST_R_COUNTER:
case ST_R_DODGE:
case ST_A_COUNTER:
case ST_A_JUMPKICK:
case ST_THROW2:
case ST_A_STORM:
case ST_A_DOWN:
case ST_A_TURN:
case ST_SG_DOWN:
case ST_SG_TURN:
case ST_NINJASKILL1:
case ST_NINJASKILL2:
case ST_NINJAREADY:
case ST_GUNSKILL1:
case ST_GUNSKILL2:
case ST_GUNSKILL3:
case ST_GUNREADY:
case ST_GUNREADY2:
case ST_MADOSKILL:
case ST_MADOSKILL2:
case 0x2F:
case 0x30:
case 0x31:

View file

@ -1,4 +1,6 @@
#include "Contents/Actors/GameObject.h"
#include "Contents/Actors/ActorEnums.h"
#include "Network/Packets/NoticeEnums.h"
#include "Contents/Jobs/JobId.h"
#include "Contents/Effects/EffectTypes.h"
#include "Contents/Actors/GameActor.h"
@ -941,7 +943,7 @@ void CGameActor::ApplyPendingUnknown0408() {
// FUNCTION: fn_21111
void EffectActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, int d, int e, int, int, int, int, int, int, int, int) {
switch (static_cast<std::int64_t>(a) << 32 | static_cast<std::uint32_t>(message)) {
case 24:
case AM_MASTER_DEAD:
for (auto it = this->state.effects.begin(); it != this->state.effects.end(); ++it) {
(*it)->SendMsg(this, 24, 0, 0, 0, 0, 0, 0);
}
@ -1007,7 +1009,7 @@ void EffectActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
case 23:
case AM_EFFECT_DEAD:
if (sender) {
CRagEffect* const effect = static_cast<CRagEffect*>(sender);
for (auto it = this->state.effects.begin(); it != this->state.effects.end(); ++it) {
@ -1026,7 +1028,7 @@ void EffectActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
case 109:
case AM_DELETE_EFFECT:
if (g_effectMgr->HasAllocator(b) && sender) {
g_effectMgr->Retire(static_cast<CRenderObject*>(sender)->render.accountId, b);
return;
@ -1074,7 +1076,7 @@ void EffectActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
case 120:
case AM_IS_HAVE_EFFECT:
if (g_effectMgr->HasAllocator(b) == true && sender) {
if (g_effectMgr->Has(static_cast<CRenderObject*>(sender)->render.accountId, b) == true) {
*reinterpret_cast<int*>(b) = -1;
@ -1221,10 +1223,10 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
}
break;
case 81:
case AM_SET_TARGET_AID:
this->hitTargetAid = b;
break;
case 88: {
case AM_MAKE_NUMBER: {
if ((g_session.GetSceneUnknown004C() != 0 || g_session.WorldUnknown0050() != 0) && g_session.IsAdminSubMode(7) == 0) {
break;
}
@ -1245,7 +1247,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 89: {
case AM_MAKE_MISS: {
if (!g_serviceOptions.Get(0x35)) {
break;
}
@ -1258,7 +1260,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
case 126:
this->LaunchEffect(0x150, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 95: {
case AM_MAKE_LUCKY: {
CMsgEffect* effect = mode->SpawnMsgEffect(0xD, &this->render.position, this->render.accountId, true);
this->unknown_03B0.push_back(effect);
effect->SendMsg(this, 0x32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
@ -1319,7 +1321,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->unknown_037C[1] = 0;
}
break;
case 101: {
case AM_MAKE_BIRD: {
if (this->unknown_037C[0] != 0) {
break;
}
@ -1360,7 +1362,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->unknown_037C[0] = reinterpret_cast<int>(effect);
break;
}
case 102:
case AM_DELETE_BIRD:
if (this->unknown_037C[0] != 0) {
reinterpret_cast<CGameObject*>(this->unknown_037C[0])->SendMsg(nullptr, 0x35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
reinterpret_cast<CMsgEffect*>(this->unknown_037C[0])->m_visible = false;
@ -1620,14 +1622,14 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->unknown_037C[12] = 0;
}
break;
case 12:
case AM_DEAD:
if (this->render.unknown_0070 == 3) {
break;
}
this->SetState(3, 1);
break;
case 96:
case 97: {
case AM_ATTACKED_SKILL:
case AM_ATTACKEDNOMOTION_SKILL: {
this->render.overrideColor = 0xFFFF0000;
const int effectId = reinterpret_cast<const ActorDamageMessage*>(b)->effectId;
if (effectId == 0xC6) {
@ -1636,10 +1638,10 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->render.overrideColor = effectId == 0xB8 ? 0xFF505050 : this->render.overrideColor;
}
}
case 26:
case 39:
case 93:
case 94:
case AM_ATTACKED:
case AM_ATTACKEDNOMOTION:
case AM_ATTACKED_CRITICAL:
case AM_ATTACKED_LUCKY:
case 111:
case 129:
case 132:
@ -1899,7 +1901,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->SendMsg(nullptr, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
break;
case 27: {
case AM_WILL_BE_ATTACKED: {
ActorDamageMessage* damage = reinterpret_cast<ActorDamageMessage*>(b);
if ((static_cast<std::int64_t>(e) << 32 | static_cast<std::uint32_t>(d)) != 0) {
if (damage->action != 0x94) {
@ -1928,22 +1930,22 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->unknown_02A8.push_back(*damage);
break;
}
case 37:
case AM_SKILL:
this->ProcessSkillMessage(sender, reinterpret_cast<const ActorSkillInfo*>(b), d, f);
break;
case 38:
case AM_GROUNDSKILL:
this->PlayGroundSkillEffect(reinterpret_cast<int>(sender), reinterpret_cast<const int*>(b), d, f);
break;
case 11:
case AM_ACTION:
this->ProcessHitMessage(sender, reinterpret_cast<const ActorHitInfo*>(b), d, f);
break;
case 43: {
case AM_ATTR_STATE_CHANGE: {
const int* states = reinterpret_cast<const int*>(b);
this->SetStatusStates(states[0], states[1], states[2], true);
this->unknown_02C8 = states[3];
break;
}
case 3: {
case AM_STANDENTRY: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
switch (this->unknown_0314) {
case 8:
@ -1968,7 +1970,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->SetGuildInfo(entry->guildId, entry->guildVersion);
break;
}
case 4: {
case AM_INITSTANDENTRY: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
switch (this->unknown_0314) {
case 8:
@ -2001,10 +2003,10 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false);
if (Replay::Instance().state == 6) {
switch (entry->state) {
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -2026,8 +2028,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 6:
case 122: {
case AM_INITMOVEENTRY:
case AM_INITMOVEENTRY2: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
switch (this->unknown_0314) {
case 8:
@ -2064,8 +2066,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 5:
case 123: {
case AM_MOVEENTRY:
case AM_MOVEENTRY2: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
switch (this->unknown_0314) {
case 8:
@ -2093,7 +2095,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 0: {
case AM_MOVE: {
const int* route = reinterpret_cast<const int*>(b);
this->routeStartTick = route[0];
if (this->FindRoute(route[1], route[2], route[3], route[4], route[5], route[6], *reinterpret_cast<const int*>(&this->unknown_0170[4]))) {
@ -2106,19 +2108,19 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 54:
case AM_DELETE_SHOP_TITLE:
if (this->unknown_0264[2] != 0) {
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_0264[2]));
this->unknown_0264[2] = 0;
}
break;
case 33:
case AM_DELETE_CHAT_TITLE:
if (this->unknown_0264[1] != 0) {
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_0264[1]));
this->unknown_0264[1] = 0;
}
break;
case 55:
case AM_MAKE_SHOP_TITLE:
if (this->unknown_0264[2] == 0) {
UIMerchantShopTitle* title = new UIMerchantShopTitle(0);
this->unknown_0264[2] = reinterpret_cast<int>(title);
@ -2132,7 +2134,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
reinterpret_cast<UIWindow*>(this->unknown_0264[2])->Show(0);
}
break;
case 32:
case AM_MAKE_CHAT_TITLE:
if (this->unknown_0264[1] == 0) {
UIChatRoomTitle* title = new UIChatRoomTitle();
this->unknown_0264[1] = reinterpret_cast<int>(title);
@ -2142,7 +2144,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
reinterpret_cast<UIWindow*>(this->unknown_0264[1])->SendMsg(nullptr, 0x22, b, static_cast<std::int16_t>(this->render.unknown_00FC), 0, 0);
reinterpret_cast<UIWindow*>(this->unknown_0264[1])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110));
break;
case 82:
case AM_MAKE_SKILL_RECHARGEGAGE:
if (this->unknown_0264[3] == 0) {
// GLOBAL: gl_25466
static float s_gaugeOffsetY = static_cast<float>(g_renderer->viewport.height * 81 / 480);
@ -2158,7 +2160,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->unknown_0280 = timeGetTime() + b;
this->unknown_0284 = timeGetTime();
break;
case 83:
case AM_DELETE_SKILL_RECHARGEGAGE:
if (this->unknown_0264[3] != 0) {
g_windowMgr.Schedule(reinterpret_cast<UIWindow*>(this->unknown_0264[3]));
this->unknown_0264[3] = 0;
@ -2171,7 +2173,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
}
break;
case 7: {
case AM_CHAT: {
std::string text(reinterpret_cast<const char*>(b));
if (g_windowMgr.window_01C8 != nullptr) {
text = static_cast<UINewChatWnd*>(g_windowMgr.window_01C8)->ConvertChat(std::string(reinterpret_cast<const char*>(b)));
@ -2263,19 +2265,19 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 61:
case AM_CORRECT_POS:
this->unknown_0158[5] = b;
*reinterpret_cast<int*>(this->unknown_0170) = d;
mode->CellCenter(b, d, this->render.position.x, this->render.position.z);
break;
case 98:
case AM_RESURRECTION:
this->render.unknown_0070 = 0;
this->render.isLieOnGround = false;
this->render.unknown_00A4Bytes[1] = 1;
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->unknown_02CC = 0;
this->SetState(0, 1);
break;
case 99:
case AM_OUTOFSIGHT:
this->render.accountId = 0xFFFFFFFF;
this->unknown_02B8 = 0;
this->render.unknown_00A4Bytes[0] = 0;
@ -2454,7 +2456,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
}
case 110: {
case AM_STATUS_CHANGE: {
const bool on = (static_cast<std::int64_t>(e) << 32 | static_cast<std::uint32_t>(d)) != 0;
switch (static_cast<std::int64_t>(c) << 32 | static_cast<std::uint32_t>(b)) {
case EFST_PROVOKE:

View file

@ -1,4 +1,5 @@
#include "Contents/Actors/GroundScope.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Skills/SkillId.h"
#include "Client/Mode/CGameMode.h"
@ -185,20 +186,20 @@ void CGroundScope::Render(int argument) {
// FUNCTION: fn_24299
void CGroundScope::SendMsg(CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int, int, int, int) {
switch (static_cast<std::int64_t>(a) << 32 | static_cast<std::uint32_t>(message)) {
case 14:
case AM_SETPOS:
this->m_cellX = b;
this->m_cellY = d;
return;
case 22:
case AM_SETMASTERGID:
this->unknown_0158 = b;
return;
case 115:
case AM_SETTIME:
this->m_lastingTime = b;
return;
case 117:
case AM_SET_SKILL:
this->m_size = this->SkillScopeType(b) + 2;
this->m_skillId = b;
this->m_angleSpeed = this->m_size != 0 ? 0.5f / static_cast<float>(this->m_size) : 0.0f;

View file

@ -1,4 +1,5 @@
#include "Contents/Actors/MercenaryAI.h"
#include "Contents/Actors/ActorEnums.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
@ -380,11 +381,11 @@ int AiHomunGetV(lua_State* state) {
double result = 0.0;
switch (property) {
case 0:
case V_OWNER:
result = static_cast<double>(g_session.m_aid);
break;
case 1:
case V_POSITION:
case 13:
if (actor) {
if (aid != g_session.m_aid) {
@ -447,7 +448,7 @@ int AiHomunGetV(lua_State* state) {
case 2:
return 1;
case 3:
case V_MOTION:
if (!actor) {
result = -1.0;
} else {
@ -455,7 +456,7 @@ int AiHomunGetV(lua_State* state) {
}
break;
case 4: {
case V_ATTACKRANGE: {
int range = *reinterpret_cast<const int*>(&g_session.unknown_5620[4]);
if (!actor || range == 0) {
result = -1.0;
@ -465,7 +466,7 @@ int AiHomunGetV(lua_State* state) {
break;
}
case 5:
case V_TARGET:
if (!actor) {
result = -1.0;
} else {
@ -473,7 +474,7 @@ int AiHomunGetV(lua_State* state) {
}
break;
case 6:
case V_SKILLATTACKRANGE:
case 14: {
std::uint32_t skillId = static_cast<std::uint32_t>(lua_tonumber(state, 3));
CSkillInfo skill = g_session.LookupHomunSkill(skillId);
@ -492,7 +493,7 @@ int AiHomunGetV(lua_State* state) {
return 1;
}
case 7:
case V_HOMUNTYPE:
if (!actor) {
result = -1.0;
} else {
@ -500,7 +501,7 @@ int AiHomunGetV(lua_State* state) {
}
break;
case 8:
case V_HP:
if (aid == g_session.m_aid) {
result = static_cast<double>(g_session.unknown_5568);
} else if (!g_session.IsHomunAid(aid)) {
@ -510,7 +511,7 @@ int AiHomunGetV(lua_State* state) {
}
break;
case 9:
case V_SP:
if (aid == g_session.m_aid) {
result = static_cast<double>(*reinterpret_cast<const int*>(&g_session.unknown_5570[0]));
} else if (!g_session.IsHomunAid(aid)) {
@ -520,7 +521,7 @@ int AiHomunGetV(lua_State* state) {
}
break;
case 10:
case V_MAXHP:
if (aid == g_session.m_aid) {
result = static_cast<double>(g_session.unknown_556C);
} else if (!g_session.IsHomunAid(aid)) {
@ -530,7 +531,7 @@ int AiHomunGetV(lua_State* state) {
}
break;
case 11:
case V_MAXSP:
if (aid == g_session.m_aid) {
result = static_cast<double>(*reinterpret_cast<const int*>(&g_session.unknown_5570[4]));
} else if (!g_session.IsHomunAid(aid)) {
@ -564,11 +565,11 @@ int AiMercenaryGetV(lua_State* state) {
double result = 0.0;
switch (property) {
case 0:
case V_OWNER:
result = static_cast<double>(g_session.m_aid);
break;
case 1:
case V_POSITION:
case 13:
if (actor) {
if (aid != g_session.m_aid) {
@ -632,7 +633,7 @@ int AiMercenaryGetV(lua_State* state) {
case 2:
return 1;
case 3:
case V_MOTION:
if (!actor) {
result = -1.0;
} else {
@ -640,7 +641,7 @@ int AiMercenaryGetV(lua_State* state) {
}
break;
case 4: {
case V_ATTACKRANGE: {
int range = *reinterpret_cast<const int*>(&g_session.unknown_5690[0]);
if (!actor || range == 0) {
result = -1.0;
@ -650,7 +651,7 @@ int AiMercenaryGetV(lua_State* state) {
break;
}
case 5:
case V_TARGET:
if (!actor || actor->render.unknown_0070 == 3) {
result = -1.0;
} else {
@ -658,7 +659,7 @@ int AiMercenaryGetV(lua_State* state) {
}
break;
case 6:
case V_SKILLATTACKRANGE:
case 14: {
std::uint32_t skillId = static_cast<std::uint32_t>(lua_tonumber(state, 3));
CSkillInfo skill = g_session.LookupMercSkill(skillId);
@ -677,7 +678,7 @@ int AiMercenaryGetV(lua_State* state) {
return 1;
}
case 8:
case V_HP:
if (aid == g_session.m_aid) {
result = static_cast<double>(g_session.unknown_5568);
} else if (!g_session.IsMercenaryAid(aid)) {
@ -687,7 +688,7 @@ int AiMercenaryGetV(lua_State* state) {
}
break;
case 9:
case V_SP:
if (aid == g_session.m_aid) {
result = static_cast<double>(*reinterpret_cast<const int*>(&g_session.unknown_5570[0]));
} else if (!g_session.IsMercenaryAid(aid)) {
@ -697,7 +698,7 @@ int AiMercenaryGetV(lua_State* state) {
}
break;
case 10:
case V_MAXHP:
if (aid == g_session.m_aid) {
result = static_cast<double>(g_session.unknown_556C);
} else if (!g_session.IsMercenaryAid(aid)) {
@ -707,7 +708,7 @@ int AiMercenaryGetV(lua_State* state) {
}
break;
case 11:
case V_MAXSP:
if (aid == g_session.m_aid) {
result = static_cast<double>(*reinterpret_cast<const int*>(&g_session.unknown_5570[4]));
} else if (!g_session.IsMercenaryAid(aid)) {
@ -717,7 +718,7 @@ int AiMercenaryGetV(lua_State* state) {
}
break;
case 12:
case V_MERTYPE:
if (!actor) {
result = -1.0;
} else {
@ -874,21 +875,21 @@ int AiGetMsg(lua_State* state) {
lua_pushnumber(state, message.type);
lua_settable(state, -3);
switch (message.type) {
case 1:
case 4:
case 5:
case MOVE_CMD:
case ATTACK_AREA_CMD:
case PATROL_CMD:
AiSetTableNumber(state, 2, message.x);
AiSetTableNumber(state, 3, message.y);
break;
case 3:
case ATTACK_OBJECT_CMD:
AiSetTableNumber(state, 2, message.target);
break;
case 7:
case SKILL_OBJECT_CMD:
AiSetTableNumber(state, 2, message.level);
AiSetTableNumber(state, 3, message.skill);
AiSetTableNumber(state, 4, message.target);
break;
case 8:
case SKILL_AREA_CMD:
AiSetTableNumber(state, 2, message.level);
AiSetTableNumber(state, 3, message.skill);
AiSetTableNumber(state, 4, message.x);
@ -925,21 +926,21 @@ int AiGetResMsg(lua_State* state) {
lua_pushnumber(state, message.type);
lua_settable(state, -3);
switch (message.type) {
case 1:
case 4:
case 5:
case MOVE_CMD:
case ATTACK_AREA_CMD:
case PATROL_CMD:
AiSetTableNumber(state, 2, message.x);
AiSetTableNumber(state, 3, message.y);
break;
case 3:
case ATTACK_OBJECT_CMD:
AiSetTableNumber(state, 2, message.target);
break;
case 7:
case SKILL_OBJECT_CMD:
AiSetTableNumber(state, 2, message.level);
AiSetTableNumber(state, 3, message.skill);
AiSetTableNumber(state, 4, message.target);
break;
case 8:
case SKILL_AREA_CMD:
AiSetTableNumber(state, 2, message.level);
AiSetTableNumber(state, 3, message.skill);
AiSetTableNumber(state, 4, message.x);

View file

@ -0,0 +1,25 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_ACTORS_PETENUMS_H
#define RAGNAROK_SOURCE_CONTENTS_ACTORS_PETENUMS_H
enum PETTALKACTION : int {
PM_FEEDING = 0,
PM_HUNTING = 1,
PM_DANGER = 2,
PM_DEAD = 3,
PM_NORMAL = 4,
PM_PERFORMANCE_S = 5,
PM_LEVELUP = 6,
PM_PERFORMANCE1 = 7,
PM_PERFORMANCE2 = 8,
PM_PERFORMANCE3 = 9,
PM_CONNENCT = 10,
};
enum PETHUNGER : int {
PET_HUNGRY = 1,
PET_SATISFIED = 2,
PET_ENOUGH = 3,
PET_FULL = 4,
};
#endif

View file

@ -1,4 +1,6 @@
#include "Contents/Actors/Pc.h"
#include "Contents/Actors/ActorEnums.h"
#include "Network/Packets/NoticeEnums.h"
#include "Contents/Effects/EffectTypes.h"
#include "Contents/Skills/SkillUnitId.h"
@ -391,18 +393,18 @@ void CGrannyPc::SetState(int state, int resetPosition) {
const SpawnArrow spawnArrow = reinterpret_cast<SpawnArrow>(&CGameMode::SpawnArrowEffect);
switch (state) {
case 8:
case ST_BEGIN_SKILL:
this->RegisterPos();
this->SetAction(0x60, 6, 1);
this->render.isMotionFinished = true;
break;
case 6:
case ST_SIT:
this->RegisterPos();
this->SetAction(0x10, 4, 1);
this->render.isMotionFinished = true;
this->render.curMotion = this->unknown_0430;
break;
case 1:
case ST_MOVE:
this->unknown_0178 = 0;
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
@ -410,7 +412,7 @@ void CGrannyPc::SetState(int state, int resetPosition) {
this->unknown_0430 = 0;
CGameActor::SetState(1, resetPosition);
break;
case 0:
case ST_STAND:
CGameActor::SetState(0, resetPosition);
this->render.curMotion = this->unknown_0430;
if (current == 4 || current == 2 || this->unknown_02C8 != 0 || current == 8) {
@ -418,7 +420,7 @@ void CGrannyPc::SetState(int state, int resetPosition) {
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->unknown_02CC = 0;
break;
case 7:
case ST_SKILL:
if (current == 6) {
return;
}
@ -441,7 +443,7 @@ void CGrannyPc::SetState(int state, int resetPosition) {
}
this->unknown_0378 = 6.0f;
break;
case 2: {
case ST_ATTACK: {
this->unknown_0178 = 0;
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
@ -461,7 +463,7 @@ void CGrannyPc::SetState(int state, int resetPosition) {
}
break;
}
case 9: {
case ST_ATTACK2: {
this->unknown_0178 = 0;
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
@ -507,9 +509,9 @@ int CPlayer::AngleToDirection(float angle) {
// FUNCTION: fn_22663
bool CPlayer::IsSpecialState(int state) const {
switch (state) {
case 2:
case 5:
case 6:
case ST_ATTACK:
case ST_PICKUP:
case ST_SIT:
case 62:
case 63:
case 64:
@ -1662,7 +1664,7 @@ int CPc::GetMonsterTransformJob() {
__declspec(noinline) int CPc::JobActionBase(int state) {
int base = 0;
switch (state) {
case 8:
case ST_BEGIN_SKILL:
base = 96;
switch (this->GetEffectiveJob(-1)) {
case JT_DO_SUMMONER:
@ -1672,13 +1674,13 @@ __declspec(noinline) int CPc::JobActionBase(int state) {
break;
}
break;
case 6:
case ST_SIT:
base = 16;
break;
case 0:
case ST_STAND:
base = 32;
break;
case 7:
case ST_SKILL:
switch (this->GetEffectiveJob(-1)) {
case JT_CRUSADER:
case JT_BARD:
@ -2895,8 +2897,8 @@ bool CPlayer::OnProcess() {
void CPlayer::UpdatePendingAction() {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
switch (this->unknown_0508) {
case 1:
case 5: {
case PT_ATTACK:
case PT_ATTACK_2: {
CGameActor* target = static_cast<CGameActor*>(mode->scene->GetGameActorByAID(this->unknown_051C));
if (target == nullptr) {
break;
@ -2972,7 +2974,7 @@ void CPlayer::UpdatePendingAction() {
}
return;
}
case 3: {
case PT_SKILL: {
CGameActor* target;
if (this->unknown_051C == g_session.m_aid) {
target = this;
@ -3018,7 +3020,7 @@ void CPlayer::UpdatePendingAction() {
this->SendMsg(nullptr, 91, 0, cellX, cellX >> 31, cellY, cellY >> 31, 0, 0, 0, 0, 0, 0, 0, 0);
return;
}
case 4: {
case PT_GROUNDSKILL: {
int groundX = this->unknown_0534;
int groundY = this->unknown_0538;
int column;
@ -3052,7 +3054,7 @@ void CPlayer::UpdatePendingAction() {
this->SendMsg(nullptr, 91, 0, groundX, groundX >> 31, groundY, groundY >> 31, 0, 0, 0, 0, 0, 0, 0, 0);
return;
}
case 2: {
case PT_PICKUPITEM: {
CItem* item = mode->scene->GetItemByAID(this->unknown_051C);
if (item == nullptr) {
break;
@ -3089,7 +3091,7 @@ void CPlayer::UpdatePendingAction() {
this->SendMsg(nullptr, 91, 0, itemX, itemX >> 31, itemY, itemY >> 31, 0, 0, 0, 0, 0, 0, 0, 0);
return;
}
case 6: {
case PT_TOUCH_SKILL: {
CGameActor* skill = static_cast<CGameActor*>(mode->scene->GetSkillByAID(this->unknown_051C));
if (skill == nullptr) {
break;
@ -3845,7 +3847,7 @@ void CPlayer::SendMsg(
) {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
switch (static_cast<std::int64_t>(a) << 32 | static_cast<std::uint32_t>(message)) {
case 0x42: {
case AM_REQ_GROUND_SKILL: {
PlayerSkillRequest request;
request.skill = this->unknown_052C;
request.x = this->unknown_0534;
@ -3873,20 +3875,20 @@ void CPlayer::SendMsg(
}
break;
}
case 0x2A:
case AM_REQ_SKILL:
mode->SendMsg(0x45, this->unknown_052C, this->unknown_051C, this->unknown_0530, 0);
break;
case 0x28: {
case AM_REQ_ATTACK_REPEAT: {
CRenderObject* target = mode->scene->GetGameActorByAID(this->unknown_051C);
if (target == nullptr || static_cast<CGameActor*>(target)->unknown_0314 != 7) {
mode->SendMsg(0x89, 7, this->unknown_051C, 0, 0);
}
break;
}
case 0x1D:
case AM_REQ_ATTACK:
mode->SendMsg(0x89, 0, this->unknown_051C, 0, 0);
break;
case 0x1F:
case AM_REQ_SIT:
if (!StateFlag01(this->stateFlags)) {
if (this->render.unknown_0070 == 0) {
mode->SendMsg(0x89, 2, this->unknown_051C, 0, 0);
@ -3895,7 +3897,7 @@ void CPlayer::SendMsg(
}
}
break;
case 0x11:
case AM_REQ_MOVE:
this->SendMsg(nullptr, 0xD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if (this->render.unknown_0070 != 0x4B) {
if (this->IsSpecialState(this->render.unknown_0070)) {
@ -3910,14 +3912,14 @@ void CPlayer::SendMsg(
}
}
break;
case 0x5B:
case AM_REQ_MOVE_PRIMITIVE:
g_unknown173AD3F = false;
if (timeGetTime() > this->unknown_0528 + 350) {
this->unknown_0528 = timeGetTime();
mode->SendMsg(0x8A, b, d, 0, 0);
}
break;
case 0x10: {
case AM_REQ_CHANGE_DIR: {
const std::uint32_t state = this->render.unknown_0070;
if (state != 0 && state != 4 && state != 6) {
break;
@ -3978,13 +3980,13 @@ void CPlayer::SendMsg(
mode->SendMsg(0x8B, CPlayer::AngleToDirection(this->render.angle), motion, 0, 0);
break;
}
case 0x09:
case AM_PREMOVE:
this->unknown_050C = 1;
this->unknown_0504 = timeGetTime();
reinterpret_cast<int&>(this->unknown_04F8) = b;
this->unknown_04FC = d;
break;
case 0x00: {
case AM_MOVE: {
this->unknown_050C = 0;
const int* route = reinterpret_cast<const int*>(b);
this->routeStartTick = route[0];
@ -4008,15 +4010,15 @@ void CPlayer::SendMsg(
g_navigationManager.CheckArrival(this->unknown_0158[5], *reinterpret_cast<const int*>(this->unknown_0170));
break;
}
case 0x08:
case AM_FREEZE:
this->SetState(0, 1);
break;
case 0x0D:
case AM_CANCELATTACK:
this->unknown_0514 = 0;
this->unknown_0508 = 0;
mode->SendMsg(0x1A, 0, 0, 0, 0);
break;
case 0x0F: {
case AM_ATTACKCLICKUP: {
const int attackMode = this->unknown_0508;
if (attackMode != 1 && attackMode != 5) {
if (attackMode == 3) {
@ -4036,10 +4038,10 @@ void CPlayer::SendMsg(
}
break;
}
case 0x5A:
case AM_SET_SKILL_USE_LEVEL:
this->unknown_0530 = b;
break;
case 0x41:
case AM_PROCEEDGROUNDSKILL:
if (this->render.unknown_0070 != 6 &&
(!StateFlag01(this->stateFlags) || (b == 0x89 && c == 0) || (b == 0xD4 && c == 0) || (b == 0x211 && c == 0) ||
(b == 0x212 && c == 0))) {
@ -4050,7 +4052,7 @@ void CPlayer::SendMsg(
this->unknown_051C = 0;
}
break;
case 0x29:
case AM_PROCEEDSKILL:
if (this->render.unknown_0070 != 6 &&
(!StateFlag01(this->stateFlags) || (d == 0x89 && e == 0) || (d == 0xD4 && e == 0) || (d == 0x211 && e == 0) ||
(d == 0x212 && e == 0) || (d == 0x250 && e == 0))) {
@ -4071,7 +4073,7 @@ void CPlayer::SendMsg(
this->unknown_04FC = -1;
}
break;
case 0x0A:
case AM_PROCEEDATTACK:
if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) {
CRenderObject* target = mode->scene->GetGameActorByAID(b);
if (target != nullptr) {
@ -4087,13 +4089,13 @@ void CPlayer::SendMsg(
}
}
break;
case 0x12:
case AM_PROCEEDPICKUPITEM:
if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) {
this->unknown_0508 = 2;
this->unknown_051C = b;
}
break;
case 0x67:
case AM_PROCEEDTOUCHSKILL:
if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) {
const int* skill = reinterpret_cast<const int*>(d);
this->unknown_0508 = 6;
@ -4384,18 +4386,18 @@ void CPc::SetState(int state, int resetPosition) {
const SpawnArrow spawnArrow = reinterpret_cast<SpawnArrow>(&CGameMode::SpawnArrowEffect);
switch (state) {
case 8:
case ST_BEGIN_SKILL:
this->RegisterPos();
this->SetAction(action, 6, 1);
this->render.isMotionFinished = true;
break;
case 6:
case ST_SIT:
this->RegisterPos();
this->SetAction(action, 4, 1);
this->render.isMotionFinished = true;
this->render.curMotion = this->unknown_043C;
break;
case 1:
case ST_MOVE:
this->unknown_0178 = 0;
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
@ -4403,7 +4405,7 @@ void CPc::SetState(int state, int resetPosition) {
this->unknown_043C = 0;
CGameActor::SetState(1, resetPosition);
break;
case 0:
case ST_STAND:
CGameActor::SetState(0, resetPosition);
if (g_session.m_aid == this->render.accountId) {
switch (g_session.m_job) {
@ -4420,9 +4422,9 @@ void CPc::SetState(int state, int resetPosition) {
}
this->render.curMotion = this->unknown_043C;
switch (current) {
case 2:
case 4:
case 8:
case ST_ATTACK:
case ST_DAMAGE:
case ST_BEGIN_SKILL:
case 0x34:
case 0x35:
case 0x36:
@ -4456,7 +4458,7 @@ void CPc::SetState(int state, int resetPosition) {
}
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->unknown_02CC = 0;
break;
case 7:
case ST_SKILL:
if (this->render.unknown_0114 == 1 || this->render.unknown_0070 == 6) {
return;
}
@ -4482,7 +4484,7 @@ void CPc::SetState(int state, int resetPosition) {
}
this->unknown_0378 = 6.0f;
break;
case 2: {
case ST_ATTACK: {
this->unknown_0178 = 0;
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
@ -4552,7 +4554,7 @@ void CPc::SetState(int state, int resetPosition) {
}
break;
}
case 9: {
case ST_ATTACK2: {
this->unknown_0178 = 0;
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
@ -4769,18 +4771,18 @@ void CPc::SendMsg(
) {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
switch (*reinterpret_cast<const std::int64_t*>(&message)) {
case 100:
case AM_SET_HEAD_DIR:
if (this->render.unknown_0070 == 0 || this->render.unknown_0070 == 6) {
this->render.curMotion = b;
}
break;
case 35:
case AM_REMOVEGAGE:
if (this->unknown_0490) {
g_windowMgr.Schedule(this->unknown_0490);
this->unknown_0490 = nullptr;
}
break;
case 34:
case AM_UPDATEGAGE:
if (!this->unknown_0490) {
this->unknown_0490 = new UIPcGage();
this->unknown_0490->SetSize(60, 5);
@ -4790,7 +4792,7 @@ void CPc::SendMsg(
static_cast<UIPcGage*>(this->unknown_0490)->SetLimits(0, 0);
this->unknown_0490->Move(this->render.screenX - 30, ScaleByScreenHeight(12) + this->render.screenY);
break;
case 3: {
case AM_STANDENTRY: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z);
this->render.position.y =
@ -4812,13 +4814,13 @@ void CPc::SendMsg(
this->SetGuildInfo(entry->guildId, entry->guildVersion);
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -4827,7 +4829,7 @@ void CPc::SendMsg(
}
break;
}
case 124: {
case AM_STANDENTRY2: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
this->unknown_04D0 = entry->unknown_0078;
mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z);
@ -4852,13 +4854,13 @@ void CPc::SendMsg(
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
this->unknown_04CC = entry->unknown_0074;
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -4883,7 +4885,7 @@ void CPc::SendMsg(
this->SetBodyPaletteName();
break;
}
case 4: {
case AM_INITSTANDENTRY: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
this->render.accountId = entry->aid;
CGameMode* gameMode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
@ -4908,13 +4910,13 @@ void CPc::SendMsg(
this->SetGuildInfo(entry->guildId, entry->guildVersion);
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -4927,7 +4929,7 @@ void CPc::SendMsg(
this->ShowPartyMemberEffect(entry->aid);
break;
}
case 121: {
case AM_INITSTANDENTRY2: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
this->unknown_04D0 = entry->unknown_0078;
this->render.accountId = entry->aid;
@ -4954,13 +4956,13 @@ void CPc::SendMsg(
this->SetGuildInfo(entry->guildId, entry->guildVersion);
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -4974,7 +4976,7 @@ void CPc::SendMsg(
this->unknown_04CC = entry->unknown_0074;
break;
}
case 6: {
case AM_INITMOVEENTRY: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->render.accountId = entry->aid;
*reinterpret_cast<int*>(&this->unknown_0170[4]) = entry->speed;
@ -5005,7 +5007,7 @@ void CPc::SendMsg(
this->ShowPartyMemberEffect(entry->aid);
break;
}
case 122: {
case AM_INITMOVEENTRY2: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->unknown_04D0 = entry->unknown_007C;
this->render.accountId = entry->aid;
@ -5039,7 +5041,7 @@ void CPc::SendMsg(
this->unknown_04CC = entry->unknown_0078;
break;
}
case 5: {
case AM_MOVEENTRY: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->unknown_04D0 = entry->unknown_007C;
this->render.accountId = entry->aid;
@ -5065,7 +5067,7 @@ void CPc::SendMsg(
this->unknown_04CC = entry->unknown_0078;
break;
}
case 123: {
case AM_MOVEENTRY2: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->unknown_04D0 = entry->unknown_007C;
this->render.accountId = entry->aid;
@ -5097,7 +5099,7 @@ void CPc::SendMsg(
this->unknown_0494 = d;
this->unknown_0498 = b;
break;
case 101: {
case AM_MAKE_BIRD: {
if (this->unknown_037C[0] != 0) {
break;
}
@ -5191,18 +5193,18 @@ void CGrannyPc::SendMsg(
) {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
switch (*reinterpret_cast<const std::int64_t*>(&message)) {
case 100:
case AM_SET_HEAD_DIR:
if (this->render.unknown_0070 == 0 || this->render.unknown_0070 == 6) {
this->render.curMotion = b;
}
break;
case 35:
case AM_REMOVEGAGE:
if (this->unknown_0478) {
g_windowMgr.Schedule(this->unknown_0478);
this->unknown_0478 = nullptr;
}
break;
case 34:
case AM_UPDATEGAGE:
if (!this->unknown_0478) {
this->unknown_0478 = new UIPcGage();
this->unknown_0478->SetSize(60, 5);
@ -5212,7 +5214,7 @@ void CGrannyPc::SendMsg(
static_cast<UIPcGage*>(this->unknown_0478)->SetLimits(0, 0);
this->unknown_0478->Move(this->render.screenX - 30, ScaleByScreenHeight(12) + this->render.screenY);
break;
case 3: {
case AM_STANDENTRY: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z);
this->render.position.y =
@ -5234,13 +5236,13 @@ void CGrannyPc::SendMsg(
this->SetGuildInfo(entry->guildId, entry->guildVersion);
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -5249,7 +5251,7 @@ void CGrannyPc::SendMsg(
}
break;
}
case 124: {
case AM_STANDENTRY2: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z);
this->render.position.y =
@ -5271,13 +5273,13 @@ void CGrannyPc::SendMsg(
this->SetGuildInfo(entry->guildId, entry->guildVersion);
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -5297,8 +5299,8 @@ void CGrannyPc::SendMsg(
this->SetBodyPaletteName();
break;
}
case 4:
case 121: {
case AM_INITSTANDENTRY:
case AM_INITSTANDENTRY2: {
PcStandEntry* entry = reinterpret_cast<PcStandEntry*>(b);
this->render.accountId = entry->aid;
CGameMode* gameMode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
@ -5323,13 +5325,13 @@ void CGrannyPc::SendMsg(
this->SetGuildInfo(entry->guildId, entry->guildVersion);
this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C);
switch (entry->state) {
case 0:
case PCSTATE_STAND:
this->SetState(0, 1);
break;
case 1:
case PCSTATE_DEAD:
this->SetState(3, 1);
break;
case 2:
case PCSTATE_SIT:
this->SetState(6, 1);
break;
default:
@ -5342,7 +5344,7 @@ void CGrannyPc::SendMsg(
this->ShowPartyMemberEffect(entry->aid);
break;
}
case 6: {
case AM_INITMOVEENTRY: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->render.accountId = entry->aid;
*reinterpret_cast<int*>(&this->unknown_0170[4]) = entry->speed;
@ -5373,7 +5375,7 @@ void CGrannyPc::SendMsg(
this->ShowPartyMemberEffect(entry->aid);
break;
}
case 122: {
case AM_INITMOVEENTRY2: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->render.accountId = entry->aid;
*reinterpret_cast<int*>(&this->unknown_0170[4]) = entry->speed;
@ -5407,8 +5409,8 @@ void CGrannyPc::SendMsg(
this->ShowPartyMemberEffect(entry->aid);
break;
}
case 5:
case 123: {
case AM_MOVEENTRY:
case AM_MOVEENTRY2: {
PcMoveEntry* entry = reinterpret_cast<PcMoveEntry*>(b);
this->render.accountId = entry->aid;
*reinterpret_cast<int*>(&this->unknown_0170[4]) = entry->speed;
@ -5458,7 +5460,7 @@ bool CGrannyPc::ProcessState() {
g_modeMgr.GetGameMode();
switch (this->render.unknown_0070) {
case 8: {
case ST_BEGIN_SKILL: {
this->ProcessMotion();
const int frames = static_cast<int>(this->GetElapsedFrames());
if (this->hitTargetAid != 0 && frames % 34 == 0) {
@ -5469,25 +5471,25 @@ bool CGrannyPc::ProcessState() {
}
return true;
}
case 7:
case ST_SKILL:
this->ProcessMotion();
if (this->render.isMotionFinished) {
this->SetState(0, 1);
}
return true;
case 2:
case ST_ATTACK:
this->ProcessMotion();
this->GetElapsedFrames();
if (this->render.isMotionFinished) {
this->SetState(0, 1);
}
return true;
case 3:
case ST_DEAD:
this->render.unknown_00C8 = 0;
this->render.unknown_00D8 = 0;
this->render.unknown_00DC = 0;
this->render.isMotionFreezed = false;
case 6:
case ST_SIT:
this->ProcessMotion();
return true;
default:
@ -5509,7 +5511,7 @@ bool CPc::ProcessState() {
g_modeMgr.GetGameMode();
switch (this->render.unknown_0070) {
case 8: {
case ST_BEGIN_SKILL: {
this->ProcessMotion();
const int frames = static_cast<int>(this->GetElapsedFrames());
if (this->hitTargetAid != 0 && frames % 34 == 0) {
@ -5520,8 +5522,8 @@ bool CPc::ProcessState() {
}
return true;
}
case 7:
case 45:
case ST_SKILL:
case ST_AB_SPECIAL:
case 62:
case 63:
case 64:
@ -5545,19 +5547,19 @@ bool CPc::ProcessState() {
this->SetState(0, 1);
}
return true;
case 2:
case ST_ATTACK:
this->ProcessMotion();
this->GetElapsedFrames();
if (this->render.isMotionFinished) {
this->SetState(0, 1);
}
return true;
case 3:
case ST_DEAD:
this->render.unknown_00C8 = 0;
this->render.unknown_00D8 = 0;
this->render.unknown_00DC = 0;
this->render.isMotionFreezed = false;
case 6:
case ST_SIT:
case 60:
case 61:
case 66:

View file

@ -1,4 +1,5 @@
#include "Contents/Actors/Npc.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Combat/CombatTypes.h"
#include "Contents/Skills/SkillId.h"
#include "Contents/Actors/GrannyGameActor.h"
@ -349,16 +350,16 @@ void CRenderObject::ProcessMotion() {
int motion;
float progress;
switch (this->render.unknown_006C) {
case 0:
case MT_LOOP:
this->render.curMotion =
static_cast<int>(frame / this->render.speed) % static_cast<int>(action->FrameCount(this->render.previousAnimation));
return;
case 1:
case MT_ONETIME:
count = static_cast<int>(action->FrameCount(this->render.previousAnimation));
progress = frame / this->render.speed;
motion = static_cast<int>(progress);
break;
case 2: {
case MT_STATIC: {
if (this->render.unknown_0070 != 2) {
return;
}
@ -1325,7 +1326,7 @@ void CGameActor::SetState(int state, int resetPosition) {
}
switch (state) {
case 0xd:
case ST_AUTOCOUNTER:
if (g_session.IsPlayerJobId(this->GetEffectiveJob(-1))) {
const std::int64_t weapon = this->GetWeapon();
IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->unknown_0260, weapon);
@ -1336,7 +1337,7 @@ void CGameActor::SetState(int state, int resetPosition) {
this->render.isMotionFreezed = true;
}
break;
case 4: {
case ST_DAMAGE: {
if (this->render.unknown_00C8 != 0 || this->render.unknown_00D8 != 0 || this->render.unknown_00DC != 0) {
return;
}
@ -1357,12 +1358,12 @@ void CGameActor::SetState(int state, int resetPosition) {
}
break;
}
case 7:
case ST_SKILL:
if (this->render.unknown_0070 == 6) {
return;
}
case 2:
case 9:
case ST_ATTACK:
case ST_ATTACK2:
this->SetAction(action, 3, this->unknown_0404 == 1 ? 2 : 1);
if (this->render.unknown_0070 != 9 && this->render.unknown_0070 != 2) {
if (this->hitTargetAid == g_session.m_aid) {
@ -1383,7 +1384,7 @@ void CGameActor::SetState(int state, int resetPosition) {
this->unknown_0378 = static_cast<float>(this->GetAttackMotion());
this->RegisterPos();
break;
case 3:
case ST_DEAD:
this->render.unknown_00C8 = 0;
this->render.unknown_00D8 = 0;
this->render.unknown_00DC = 0;
@ -1397,46 +1398,46 @@ void CGameActor::SetState(int state, int resetPosition) {
this->render.isMotionFreezed = false;
this->SetAction(action, 4, 1);
break;
case 0:
case ST_STAND:
this->SetAction(action, 4, 0);
if (!IsObfuscatedMessage(this->render.accountId)) {
this->render.isMotionFinished = true;
}
this->RegisterPos();
break;
case 1:
case ST_MOVE:
if (this->unknown_0184 == 0) {
this->SetAction(action, 6, 0);
}
this->UnRegisterPos();
break;
case 5:
case ST_PICKUP:
this->unknown_0178 = 0;
this->render.isMotionFreezed = false;
case 0xb:
case ST_ATTACKWAIT:
this->SetAction(action, 6, 1);
break;
case 0xc:
case ST_THROW:
this->SetAction(action, 3, 1);
this->RegisterPos();
break;
case 0x10:
case ST_DANCE:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 1, 3, 0, 0, 1, 99999999, 1);
break;
case 0x11:
case ST_SING:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 1, 3, action, 1, 1, 99999999, 1);
break;
case 0x12:
case ST_READYSHOT:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 0, 0, action, 0, 1, 3000, 0);
break;
case 0x1c:
case ST_THROW2:
this->render.unknown_00C2 = 10;
this->SetAnimationSequence(action, 0, action, 1, action, 2, action, 3, action, 4, 1, 1000, 0);
break;
case 0x13:
case ST_READYJUMP:
if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) == true) {
this->render.unknown_00C2 = 10;
this->SetAnimationSequence(action, 0, action, 0, action, 0, action, 1, action, 1, 1, 3000, 0);
@ -1453,51 +1454,51 @@ void CGameActor::SetState(int state, int resetPosition) {
this->LaunchEffect(0x19b, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
}
break;
case 0x14:
case ST_LANDJUMP:
this->render.unknown_00C2 = 10;
this->SetAnimationSequence(action, 1, action, 1, action, 1, action, 1, 8, 5, 1, 3000, 0);
break;
case 0x15:
case ST_R_STORM:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 0, 0, action, 0, 1, 2000, 0);
this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x1e:
case ST_A_STORM:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 1, 1, action, 1, 1, 2000, 0);
break;
case 0x16:
case ST_R_DOWN:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 2, 2, action, 2, 1, 2000, 0);
this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x21:
case ST_SG_DOWN:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 2, 2, action, 2, 1, 1000, 0);
break;
case 0x1f:
case ST_A_DOWN:
this->render.unknown_00C2 = 5;
this->SetAnimationSequence(0x50, 3, 0x50, 5, 0x50, 7, 0x50, 8, 0x50, 2, 1, 500, 0);
break;
case 0x17:
case ST_R_TURN:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 3, 3, action, 3, 1, 2000, 0);
this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x22:
case ST_SG_TURN:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 3, 3, action, 3, 1, 1000, 0);
break;
case 0x20:
case ST_A_TURN:
this->render.unknown_00C2 = 5;
this->SetAnimationSequence(action, 4, action, 5, action, 6, action, 7, action, 2, 1, 500, 0);
break;
case 0x18:
case ST_R_COUNTER:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 4, 4, action, 4, 1, 2000, 0);
this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x1a: {
case ST_A_COUNTER: {
this->render.unknown_00C2 = 4;
int frame0;
int frame1;
@ -1521,16 +1522,16 @@ void CGameActor::SetState(int state, int resetPosition) {
this->SetAnimationSequence(action, frame0, action, frame1, action, frame2, action, frame3, action, frame4, 1, 500, 0);
break;
}
case 0x19:
case ST_R_DODGE:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 1, 1, action, 1, 1, 2000, 0);
this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f);
break;
case 0x1b:
case ST_A_JUMPKICK:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 5, 5, action, 5, 1, 3000, 0);
break;
case 0x24:
case ST_NINJASKILL2:
this->render.unknown_00C2 = 6;
this->SetFrameSequence(action, 2, 5, action, 5, 1, 1000, 0);
break;
@ -1540,7 +1541,7 @@ void CGameActor::SetState(int state, int resetPosition) {
break;
case 0x38:
this->render.isMotionFinished = false;
case 0x23:
case ST_NINJASKILL1:
this->render.unknown_00C2 = 6;
this->SetFrameSequence(action, 0, 1, action, 1, 1, 500, 0);
break;
@ -1549,7 +1550,7 @@ void CGameActor::SetState(int state, int resetPosition) {
this->render.unknown_00C2 = 6;
this->SetFrameSequence(action, 5, 5, action, 5, 1, 500, 0);
break;
case 0x25: {
case ST_NINJAREADY: {
this->render.unknown_00C2 = 10;
int random = rand() % 2;
random = random < 0 ? 0 : random;
@ -1557,7 +1558,7 @@ void CGameActor::SetState(int state, int resetPosition) {
this->SetFrameSequence(action, frame, frame, action, frame, 1, 500, 0);
break;
}
case 0x26: {
case ST_GUNSKILL1: {
this->render.unknown_00C2 = 6;
int random = rand() % 2;
random = random < 0 ? 0 : random;
@ -1568,11 +1569,11 @@ void CGameActor::SetState(int state, int resetPosition) {
}
break;
}
case 0x28:
case ST_GUNSKILL3:
this->render.unknown_00C2 = 6;
this->SetFrameSequence(action, 0, 2, action, 2, 1, 500, 0);
break;
case 0x29: {
case ST_GUNREADY: {
this->render.unknown_00C2 = 10;
int random = rand() % 2;
random = random < 0 ? 0 : random;
@ -1580,19 +1581,19 @@ void CGameActor::SetState(int state, int resetPosition) {
this->SetFrameSequence(action, frame, frame, action, frame, 1, 500, 0);
break;
}
case 0x2a:
case ST_GUNREADY2:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 0, 0, action, 0, 1, 500, 0);
break;
case 0x2b:
case ST_MADOSKILL:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 5, 5, action, 5, 1, 500, 0);
break;
case 0x2c:
case ST_MADOSKILL2:
this->render.unknown_00C2 = 10;
this->SetFrameSequence(action, 4, 4, action, 4, 1, 500, 0);
break;
case 0x2d:
case ST_AB_SPECIAL:
case 0x34:
case 0x35:
case 0x36:
@ -1616,7 +1617,7 @@ void CGameActor::SetState(int state, int resetPosition) {
this->render.unknown_00C2 = 6;
this->SetFrameSequence(action, 0, 3, action, 3, 1, 9999999, 1);
break;
case 0x27:
case ST_GUNSKILL2:
case 0x30:
this->render.unknown_00C2 = 6;
this->SetFrameSequence(action, 4, 5, action, 5, 1, 500, 0);
@ -2740,7 +2741,7 @@ void CCharacterNpc::SendMsg(
) {
CharacterNpcViewInfo* info = reinterpret_cast<CharacterNpcViewInfo*>(b);
switch (static_cast<std::int64_t>(a) << 32 | static_cast<std::uint32_t>(message)) {
case 4:
case AM_INITSTANDENTRY:
this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0);
this->render.visible = IsVisibleJob(info->job) ? 1 : 0;
this->SetGuildInfo(info->unknown_0060, info->unknown_0064);
@ -2750,15 +2751,15 @@ void CCharacterNpc::SendMsg(
this->unknown_0440 = reinterpret_cast<CGameObject*>(new CCharacterRender(0, 0));
FillCharacterNpcRenderPrimary(this, info);
return;
case 3:
case AM_STANDENTRY:
this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0);
if (this->unknown_0440 == nullptr) {
return;
}
FillCharacterNpcRenderPrimary(this, info);
return;
case 6:
case 0x7a:
case AM_INITMOVEENTRY:
case AM_INITMOVEENTRY2:
this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0);
if (this->unknown_0440 != nullptr) {
return;
@ -2766,8 +2767,8 @@ void CCharacterNpc::SendMsg(
this->unknown_0440 = reinterpret_cast<CGameObject*>(new CCharacterRender(0, 0));
FillCharacterNpcRenderSecondary(this, info);
return;
case 5:
case 0x7b:
case AM_MOVEENTRY:
case AM_MOVEENTRY2:
this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0);
if (this->unknown_0440 == nullptr) {
return;
@ -2959,16 +2960,16 @@ void CRenderObject::UpdateTlvertex(const float* matrix) {
int CGameActor::ActionBase(int state) {
int base = 16;
switch (state) {
case 0:
case ST_STAND:
base = 0;
break;
case 1:
case ST_MOVE:
base = 8;
break;
case 4:
case ST_DAMAGE:
base = 24;
break;
case 3:
case ST_DEAD:
base = 32;
break;
}
@ -3288,15 +3289,15 @@ CActRes* CRenderObject::GetActRes() {
int CGameActor::WeaponActionBase(int weaponType) {
int base = 0;
switch (weaponType) {
case 0:
case ST_STAND:
base = 0;
break;
case 1:
case ST_MOVE:
base = 8;
break;
case 2:
case 43:
case 44:
case ST_ATTACK:
case ST_MADOSKILL:
case ST_MADOSKILL2:
case 52:
case 60:
case 62:
@ -3308,20 +3309,20 @@ int CGameActor::WeaponActionBase(int weaponType) {
case 79:
base = 80;
break;
case 3:
case ST_DEAD:
base = 64;
break;
case 4:
case ST_DAMAGE:
base = 48;
break;
case 5:
case 20:
case 25:
case ST_PICKUP:
case ST_LANDJUMP:
case ST_R_DODGE:
base = 24;
break;
case 9:
case 18:
case 32:
case ST_ATTACK2:
case ST_READYSHOT:
case ST_A_TURN:
case 49:
case 53:
case 54:
@ -3332,39 +3333,39 @@ int CGameActor::WeaponActionBase(int weaponType) {
case 77:
base = 88;
break;
case 11:
case ST_ATTACKWAIT:
base = 32;
break;
case 12:
case 19:
case 28:
case 40:
case 42:
case ST_THROW:
case ST_READYJUMP:
case ST_THROW2:
case ST_GUNSKILL3:
case ST_GUNREADY2:
case 50:
case 51:
case 58:
base = 40;
break;
case 13:
case ST_AUTOCOUNTER:
base = IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->unknown_0260, this->GetWeapon()) ? 88 : 80;
break;
case 16:
case 17:
case 21:
case 22:
case 23:
case 24:
case 27:
case 30:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 41:
case 45:
case ST_DANCE:
case ST_SING:
case ST_R_STORM:
case ST_R_DOWN:
case ST_R_TURN:
case ST_R_COUNTER:
case ST_A_JUMPKICK:
case ST_A_STORM:
case ST_SG_DOWN:
case ST_SG_TURN:
case ST_NINJASKILL1:
case ST_NINJASKILL2:
case ST_NINJAREADY:
case ST_GUNSKILL1:
case ST_GUNSKILL2:
case ST_GUNREADY:
case ST_AB_SPECIAL:
case 47:
case 48:
case 55:
@ -3380,7 +3381,7 @@ int CGameActor::WeaponActionBase(int weaponType) {
case 81:
base = 96;
break;
case 26:
case ST_A_COUNTER:
switch (this->GetEffectiveJob(-1)) {
case JT_LINKER:
case JT_LINKER_B:

View file

@ -1,4 +1,5 @@
#include "Contents/Actors/Skill.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Skills/SkillId.h"
#include "Contents/Skills/SkillUnitId.h"
@ -347,7 +348,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
switch (static_cast<std::int64_t>(a) << 32 | static_cast<std::uint32_t>(message)) {
case 7: {
case AM_CHAT: {
const char* text = reinterpret_cast<const char*>(b);
if (std::strlen(text) == 0) {
return;
@ -370,7 +371,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
balloon->Move(this->render.screenX - this->unknown_0288 / 2, this->render.screenY - g_renderer->viewport.height * 110 / 480);
return;
}
case 0x25: {
case AM_SKILL: {
const SkillHitMessage* hit = reinterpret_cast<const SkillHitMessage*>(b);
const int skillId = hit->skillId;
const int unknown_0014 = hit->unknown_0014;
@ -493,7 +494,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
}
return;
}
case 0x2D: {
case AM_SKILLSTANDENTRY: {
const SkillUnitMessage* unit = reinterpret_cast<const SkillUnitMessage*>(b);
this->range = unit->range;
this->skillAid = unit->aid;
@ -900,7 +901,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
return;
}
}
case 0x2F:
case AM_SETJOB:
this->SetActorJob(b);
switch (this->GetEffectiveJob(-1)) {
case UNT_WARP_WAITING: {
@ -927,7 +928,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
this->m_model->playback = 1;
}
return;
case 0x35:
case AM_DISAPPEAR:
if (this->GetEffectiveJob(-1) == UNT_CANE_OF_EVIL_EYE) {
CEffect* effect = g_effectMgr->Find(this->render.accountId, 0x903);
if (effect != nullptr) {
@ -938,7 +939,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int
actions->OnSkillObjectRemove(this->GetEffectiveJob(-1), this);
}
return;
case 0x77:
case AM_SKILL_UPDATE:
if (this->render.enabled) {
return;
}

View file

@ -1,4 +1,5 @@
#include "Render/DeviceContext/DCSurface.h"
#include "UI/Window/UIEnums.h"
#include "UI/Window/UINewSelectCharWnd.h"
#include "Contents/CashEmotionMgr.h"
#include "Contents/Configuration/ServiceConfiguration.h"
@ -1689,7 +1690,7 @@ void UICashEmotionListChildWnd_Abstract::OnWheel(int delta) {
// FUNCTION: fn_09345
int UICashEmotionListChildWnd_Abstract::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 7:
case UM_SCROLLVERT:
this->scrollPosition += argument1;
if (this->scrollPosition < 0) {
this->scrollPosition = 0;
@ -1701,7 +1702,7 @@ int UICashEmotionListChildWnd_Abstract::SendMsg(UIWindow* sender, int message, s
this->scrollBar->Invalidate();
this->SendMsg(sender, 60, 0, 0, 0, 0);
break;
case 60:
case UM_REFRESH:
this->Invalidate();
if (this->parent) {
this->parent->SendMsg(sender, 60, 0, 0, 0, 0);
@ -2400,7 +2401,7 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
this->RefreshCurrentList();
return 0;
case 34:
case UM_SETINFO:
this->m_placement = reinterpret_cast<CashEmotionListWndInfo*>(argument1);
if (this->m_placement) {
if (!this->m_placement->IsValid()) {
@ -2410,7 +2411,7 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
}
return 0;
case 6:
case UM_COMMAND:
switch (argument1) {
case 189:
if (this->m_searchEdit) {
@ -2433,7 +2434,7 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
}
return 0;
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(87);
return 0;
@ -2527,7 +2528,7 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
g_cashEmotionMgr->unknown_01C4 = argument1;
return this->SetPeriod(argument1);
case 60:
case UM_REFRESH:
this->Invalidate();
return 0;
}
@ -2855,7 +2856,7 @@ int UICashEmotionMiniWnd::SendMsg(
std::pair<int, int> entry;
switch (message) {
case 60:
case UM_REFRESH:
this->Invalidate();
return 0;
@ -2864,7 +2865,7 @@ int UICashEmotionMiniWnd::SendMsg(
entry.second = static_cast<int>(argument2);
break;
case 6:
case UM_COMMAND:
if (argument1 == 1) {
this->Previous();
} else if (argument1 == 2) {
@ -3118,7 +3119,7 @@ int UICashEmotionPack::SendMsg(
UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4
) {
switch (message) {
case 60:
case UM_REFRESH:
this->Invalidate();
if (this->parent) {
this->parent->SendMsg(sender, 60, 0, 0, 0, 0);
@ -3224,7 +3225,7 @@ int UICashEmotionPack_Purchase::SendMsg(
UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4
) {
switch (message) {
case 60:
case UM_REFRESH:
this->Invalidate();
if (this->parent) {
this->parent->SendMsg(sender, 60, 0, 0, 0, 0);
@ -3339,7 +3340,7 @@ int UICashEmotionPack_Search_UnPurchased::SendMsg(
UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4
) {
switch (message) {
case 60:
case UM_REFRESH:
this->Invalidate();
if (this->parent) {
this->parent->SendMsg(this, 60, 0, 0, 0, 0);
@ -3541,12 +3542,12 @@ int UICashEmotionPiece::SendMsg(
UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4
) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 189 && this->parent) {
this->parent->SendMsg(this, 174, this->m_packId, this->m_emotionId, 0, 0);
}
return 0;
case 60:
case UM_REFRESH:
this->Invalidate();
if (this->parent) {
this->parent->SendMsg(this, 60, 0, 0, 0, 0);

View file

@ -1,3 +1,4 @@
#include "Network/Packets/NoticeEnums.h"
#include "Client/Mode/CGameMode.h"
#include "Contents/Combat/CombatTypes.h"
#include "Contents/Items/InventoryType.h"
@ -363,7 +364,7 @@ void ReceiveFriendAddResult(const unsigned char* data) {
char buffer[128];
int message;
switch (packet->result) {
case 0: {
case FRIEND_ADD_SUCCEED: {
std::sprintf(buffer, LookupMessage(821), name);
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(buffer), 0xFFFF00, 0, 0, 0);
@ -376,13 +377,13 @@ void ReceiveFriendAddResult(const unsigned char* data) {
g_session.RefreshWindow02C8();
return;
}
case 1:
case FRIEND_ADD_FALSE:
message = 822;
break;
case 2:
case FRIEND_ADD_ME_OVERSIZE:
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(819)), 0xFF, 0, 0, 0);
return;
case 3:
case FRIEND_ADD_OTHER_OVERSIZE:
message = 820;
break;
case 4:
@ -1192,19 +1193,19 @@ EquipSlots CSession::GetEquipSlots(int location) {
case EQP_COSTUME_HEAD_MID:
mask = 0x200;
break;
case 0xC00:
case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID:
mask = 0x300;
break;
case EQP_COSTUME_HEAD_LOW:
mask = 1;
break;
case 0x1400:
case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_LOW:
mask = 0x101;
break;
case 0x1800:
case EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW:
mask = 0x201;
break;
case 0x1C00:
case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW:
mask = 0x301;
break;
case EQP_COSTUME_GARMENT:

View file

@ -17,8 +17,6 @@ enum e_damage_type : int {
DMG_SPLASH_ENDURE = 14,
};
#endif
enum spirit_charm_types : int {
CHARM_TYPE_WATER = 1,
CHARM_TYPE_LAND = 2,
@ -83,3 +81,5 @@ enum e_size : int {
SZ_MEDIUM = 1,
SZ_BIG = 2,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Client/Input/InputCharset.h"
#include "Contents/Configuration/ServiceEnums.h"
#include "Client/Input/LanguageTC.h"
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Archive/PakRegistry.h"
@ -197,12 +198,12 @@ void InitializeServiceStrings() {
LoadEtcInfo();
switch (g_serviceType) {
case 0:
case ServiceKorea:
case 1:
case 2:
case 3:
case 4:
case 5:
case ServiceJapan:
case ServiceChina:
case ServiceTaiwan:
case ServiceThai:
case 6:
case 7:
case 8:
@ -211,9 +212,9 @@ void InitializeServiceStrings() {
case 11:
case 12:
case 13:
case 14:
case 15:
case 17:
case ServiceRussia:
case ServiceVietnam:
case ServiceChile:
case 18:
case 19:
case 20:
@ -307,17 +308,17 @@ void InitializeServiceStrings() {
void LoadLoadingScreens(int count) {
if (count == 0) {
switch (g_serviceType) {
case 0:
case ServiceKorea:
count = 7;
break;
case 1:
case 15:
case ServiceVietnam:
count = 12;
break;
case 3:
case ServiceChina:
count = 4;
break;
case 5:
case ServiceThai:
case 7:
count = 8;
break;
@ -390,27 +391,27 @@ void InitializeLanguage() {
static CLanguageArabic arabicCharset;
switch (g_serviceType) {
case 0:
case ServiceKorea:
g_language = 0;
g_textCodePage = 949;
g_serverLanguage = &defaultCharset;
break;
case 2:
case ServiceJapan:
g_language = 2;
g_textCodePage = 932;
g_serverLanguage = &defaultCharset;
break;
case 3:
case ServiceChina:
g_language = 3;
g_serverLanguage = &traditionalChineseCharset;
g_textCodePage = 936;
break;
case 4:
case ServiceTaiwan:
g_language = 4;
g_serverLanguage = &traditionalChineseCharset;
g_textCodePage = 950;
break;
case 5:
case ServiceThai:
g_language = 5;
g_serverLanguage = &thaiCharset;
g_textCodePage = 874;
@ -434,19 +435,19 @@ void InitializeLanguage() {
g_textCodePage = 1252;
g_serverLanguage = &defaultCharset;
break;
case 14:
case ServiceRussia:
g_language = 1;
g_inlineCharset = 0;
g_textCodePage = 1251;
g_serverLanguage = &defaultCharset;
break;
case 15:
case ServiceVietnam:
g_language = 7;
g_inlineCharset = 0;
g_textCodePage = 1258;
g_serverLanguage = &defaultCharset;
break;
case 17:
case ServiceChile:
g_language = 1;
g_inlineCharset = 0;
g_textCodePage = 1145;

View file

@ -0,0 +1,15 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_CONFIGURATION_SERVICEENUMS_H
#define RAGNAROK_SOURCE_CONTENTS_CONFIGURATION_SERVICEENUMS_H
enum ServiceType : int {
ServiceKorea = 0,
ServiceJapan = 2,
ServiceChina = 3,
ServiceTaiwan = 4,
ServiceThai = 5,
ServiceRussia = 14,
ServiceVietnam = 15,
ServiceChile = 17,
};
#endif

View file

@ -0,0 +1,94 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTPRIMID_H
#define RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTPRIMID_H
enum EFFECTPRIMID : int {
PP_2DTEXTURE = 0,
PP_2DTEXTUREORBIT = 1,
PP_2DQUAD = 2,
PP_2DFLASH = 3,
PP_2DCIRCLE = 4,
PP_3DPARTICLE = 5,
PP_3DPARTICLEGRAVITY = 6,
PP_3DPARTICLEORBIT = 7,
PP_3DPARTICLESPLINE = 8,
PP_3DQUADHORN = 9,
PP_3DSPLINE = 10,
PP_3DSPIRAL = 11,
PP_3DCIRCLE = 12,
PP_3DCYLINDER = 13,
PP_3DSPHERE = 14,
PP_3DTEXTURE = 15,
PP_3DCROSSTEXTURE = 16,
PP_3DCYLINDERHALF = 18,
PP_3DFLASH = 19,
PP_3DLINE = 20,
PP_3DPARTICLE_NOMASTER = 21,
PP_3DTEXTURE_NOMASTER = 22,
PP_3DCASTING = 23,
PP_3DCASTING_2 = 24,
PP_3DCASTING_3 = 25,
PP_MAPPARTICLE = 27,
PP_GI_3 = 34,
PP_GRANDCROSS2 = 37,
PP_LINELINK = 38,
PP_SAKURA = 40,
PP_SHIELDBOOMERANG = 42,
PP_INTIMIDATE = 43,
PP_TEIHIT2 = 45,
PP_BOTTOM = 47,
PP_BOTTOM2 = 48,
PP_BOTTOMOUT = 49,
PP_POKJUK = 52,
PP_THROWITEM = 53,
PP_CHEMICALPROTECTION = 54,
PP_CHEMICAL2 = 55,
PP_CHEMICAL3 = 56,
PP_FIRSTAID = 58,
PP_PARTICLE_UP = 59,
PP_GUARD = 61,
PP_WIND = 62,
PP_RECT_UP = 64,
PP_3DCASTING_4 = 65,
PP_FOREST = 66,
PP_ASURACASTING = 68,
PP_HITLINE = 70,
PP_BLIND = 71,
PP_MAGNUM2 = 73,
PP_SLASH1 = 75,
PP_SAINTWING = 76,
PP_SPHEREWIND = 77,
PP_COLORPAPER = 78,
PP_GHOST = 84,
PP_SUPERANGEL = 85,
PP_RECT_UP2 = 90,
PP_SPHEREWIND2 = 91,
PP_RAINBOW = 93,
PP_PEONG = 94,
PP_EFFECTTEXTURE2 = 95,
PP_PEONGUP = 96,
PP_TANJI2 = 97,
PP_DOUBLEGUMGANG = 99,
PP_HITLINE3 = 100,
PP_ELECTRIC = 101,
PP_ELECTRIC2 = 102,
PP_HALFSPHERE = 104,
PP_ATTACKENERGY2 = 106,
PP_3DCASTING_5 = 107,
PP_FLOWERCAST = 108,
PP_SOULLINK = 109,
PP_HEAL_LOW = 110,
PP_SOULPARTICLE = 111,
PP_HERMODE = 114,
PP_SHIELDBOOMERANG3 = 116,
PP_3DQUADHORN2 = 117,
PP_ACIDDEMON = 118,
PP_SMA = 120,
PP_SMA2 = 121,
PP_TWILIGHT = 123,
PP_KOUENKA = 124,
PP_STIN4 = 125,
PP_BUBBLE_DROP = 127,
PP_EFFECTTEXTURE_ANI = 128,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Contents/Effects/EffectPrimitiveMotion.h"
#include "Contents/Effects/EffectPrimId.h"
#include "Client/Application/ErrorDialog.h"
#include "Render/DeviceContext/DCSurface.h"
#include "Client/Mode/CGameMode.h"
@ -7988,12 +7989,12 @@ bool CEffectPrim::OnProcess() {
}
switch (this->state.count) {
case 0:
case PP_2DTEXTURE:
if (this->state.slots[0].life < 98 && g_updateTick == 0) {
return true;
}
break;
case 16:
case PP_3DCROSSTEXTURE:
if (this->state.slots[0].life != 99 && g_updateTick == 0) {
return true;
}
@ -8005,14 +8006,14 @@ bool CEffectPrim::OnProcess() {
case 32:
case 35:
case 60:
case 68:
case PP_ASURACASTING:
case 99:
case 104:
case 105:
case 106:
case 108:
case PP_FLOWERCAST:
case 109:
case 111:
case PP_SOULPARTICLE:
case 130:
case 131:
case 132:
@ -8038,17 +8039,17 @@ bool CEffectPrim::OnProcess() {
}
switch (this->state.count) {
case 0:
case 2:
case PP_2DTEXTURE:
case PP_2DQUAD:
if (!this->Move2DPrimitive()) {
return false;
}
break;
case 15:
case 16:
case PP_3DTEXTURE:
case PP_3DCROSSTEXTURE:
this->MoveEffectPrimitive();
break;
case 1: {
case PP_2DTEXTUREORBIT: {
this->state.orgPos.x = this->state.deltaPos2.x + this->state.master->state.tlvertX;
this->state.orgPos.y = this->state.deltaPos2.y + this->state.master->state.tlvertY;
this->state.radiusSpeed = this->state.radiusAccel + this->state.radiusSpeed;
@ -8076,7 +8077,7 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 3: {
case PP_2DFLASH: {
this->render.position.x = this->state.deltaPos2.x + this->state.master->state.tlvertX;
this->render.position.y = this->state.deltaPos2.y + this->state.master->state.tlvertY;
@ -8103,7 +8104,7 @@ bool CEffectPrim::OnProcess() {
this->state.arcAngle = this->state.widthSpeed + this->state.arcAngle;
this->state.ProcessAlpha();
} break;
case 4: {
case PP_2DCIRCLE: {
this->render.position.x = this->state.deltaPos2.x + this->state.master->state.tlvertX;
this->render.position.y = this->state.deltaPos2.y + this->state.master->state.tlvertY;
this->state.radiusSpeed = this->state.radiusAccel + this->state.radiusSpeed;
@ -8117,7 +8118,7 @@ bool CEffectPrim::OnProcess() {
this->state.ProcessAlpha();
} break;
case 5:
case PP_3DPARTICLE:
if (!this->Prim3DParticle()) {
return false;
}
@ -8127,17 +8128,17 @@ bool CEffectPrim::OnProcess() {
return false;
}
break;
case 6:
case PP_3DPARTICLEGRAVITY:
if (!this->Prim3DParticleGravity()) {
return false;
}
break;
case 7:
case PP_3DPARTICLEORBIT:
if (!this->Prim3DParticleOrbit()) {
return false;
}
break;
case 8:
case PP_3DPARTICLESPLINE:
this->Prim3DParticleSpline();
break;
case 9:
@ -8173,13 +8174,13 @@ bool CEffectPrim::OnProcess() {
this->render.position.z = this->state.deltaPos.z + this->state.orgPos.z;
this->state.ProcessAlpha();
} break;
case 12:
case PP_3DCIRCLE:
this->Prim3DCircle();
break;
case 13:
case PP_3DCYLINDER:
this->Prim3DCylinder();
break;
case 14: {
case PP_3DSPHERE: {
this->state.orgPos.x = this->state.master->render.position.x + this->state.deltaPos2.x;
this->state.orgPos.y = this->state.master->render.position.y + this->state.deltaPos2.y;
this->state.orgPos.z = this->state.master->render.position.z + this->state.deltaPos2.z;
@ -8191,10 +8192,10 @@ bool CEffectPrim::OnProcess() {
this->state.longitude = this->state.longSpeed + this->state.longitude;
this->state.ProcessAlpha();
} break;
case 18:
case PP_3DCYLINDERHALF:
this->Prim3DCylinderHalf();
break;
case 19: {
case PP_3DFLASH: {
this->render.position.y = this->state.deltaPos2.y + this->state.master->state.tlvertY;
this->render.position.x = this->state.deltaPos2.x + this->state.master->state.tlvertX;
@ -8221,8 +8222,8 @@ bool CEffectPrim::OnProcess() {
this->state.heightSize = this->state.heightSpeed + this->state.heightSize;
this->state.ProcessAlpha();
} break;
case 10:
case 11: {
case PP_3DSPLINE:
case PP_3DSPIRAL: {
this->state.orgPos.x = this->state.master->render.position.x + this->state.deltaPos2.x;
this->state.orgPos.y = this->state.master->render.position.y + this->state.deltaPos2.y;
this->state.orgPos.z = this->state.master->render.position.z + this->state.deltaPos2.z;
@ -8248,12 +8249,12 @@ bool CEffectPrim::OnProcess() {
case 20:
this->render.position.y = this->render.position.y + 5.0f;
break;
case 21:
case PP_3DPARTICLE_NOMASTER:
if (!this->Prim3DParticleNoMaster()) {
return false;
}
break;
case 22:
case PP_3DTEXTURE_NOMASTER:
if (!this->Prim3DTextureNoMaster()) {
return false;
}
@ -8323,16 +8324,16 @@ bool CEffectPrim::OnProcess() {
case 25:
this->UpdateFireWall();
break;
case 65:
case PP_3DCASTING_4:
this->Prim3DCasting4();
break;
case 107:
case PP_3DCASTING_5:
this->Prim3DCasting5();
break;
case 108:
case PP_FLOWERCAST:
this->PrimFlowerCast();
break;
case 118:
case PP_ACIDDEMON:
this->PrimAcidDemon();
break;
case 73: {
@ -8382,7 +8383,7 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 68:
case PP_ASURACASTING:
this->PrimAsuraCasting();
break;
case 147:
@ -8515,7 +8516,7 @@ bool CEffectPrim::OnProcess() {
case 135:
this->PrimTrailShift();
break;
case 102:
case PP_ELECTRIC2:
this->PrimElectric2();
break;
case 146:
@ -8525,7 +8526,7 @@ bool CEffectPrim::OnProcess() {
case 110:
this->PrimPulsingColumns();
break;
case 61:
case PP_GUARD:
this->PrimGuard();
break;
case 104: {
@ -8632,7 +8633,7 @@ bool CEffectPrim::OnProcess() {
slot.vecTNow.z = g_sinTable[angle];
}
} break;
case 76:
case PP_SAINTWING:
this->PrimSaintWing();
break;
case 77: {
@ -8656,7 +8657,7 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 91:
case PP_SPHEREWIND2:
this->PrimSphereWind2();
break;
case 78: {
@ -8703,7 +8704,7 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 62:
case PP_WIND:
this->PrimWind();
break;
case 63:
@ -8774,13 +8775,13 @@ bool CEffectPrim::OnProcess() {
case 130:
this->PrimDriftingSquares();
break;
case 27:
case PP_MAPPARTICLE:
this->PrimMapParticle();
break;
case 115:
this->PrimParticleSpread();
break;
case 111:
case PP_SOULPARTICLE:
this->PrimSoulParticle();
break;
case 155:
@ -8835,10 +8836,10 @@ bool CEffectPrim::OnProcess() {
case 151:
this->PrimSpiralFade();
break;
case 96:
case PP_PEONGUP:
this->PrimPeongUp();
break;
case 94:
case PP_PEONG:
this->PrimPeong();
break;
case 80:
@ -8907,7 +8908,7 @@ bool CEffectPrim::OnProcess() {
case 31:
this->PrimWaveSpin();
break;
case 34:
case PP_GI_3:
this->PrimGI3();
break;
case 36: {
@ -9080,7 +9081,7 @@ bool CEffectPrim::OnProcess() {
case 137:
this->PrimHeightRamp();
break;
case 66:
case PP_FOREST:
this->PrimForest();
break;
case 129:
@ -9303,7 +9304,7 @@ bool CEffectPrim::OnProcess() {
case 90:
this->PrimFadingColumns();
break;
case 43:
case PP_INTIMIDATE:
this->PrimIntimidate();
break;
case 44:
@ -9448,7 +9449,7 @@ bool CEffectPrim::OnProcess() {
case 122:
this->PrimSTIN3();
break;
case 125:
case PP_STIN4:
this->PrimSTIN4();
break;
case 126: {
@ -9502,7 +9503,7 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 120:
case PP_SMA:
this->PrimSMA();
break;
case 121:
@ -9583,7 +9584,7 @@ bool CEffectPrim::OnProcess() {
return false;
}
break;
case 38:
case PP_LINELINK:
this->PrimLineLink();
break;
case 69: {
@ -9635,10 +9636,10 @@ bool CEffectPrim::OnProcess() {
case 33:
this->PrimFieldFireflies();
break;
case 123:
case PP_TWILIGHT:
this->PrimTwilight();
break;
case 52:
case PP_POKJUK:
this->PrimPokJuk();
break;
case 35:
@ -9733,10 +9734,10 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 40:
case PP_SAKURA:
this->PrimSakura();
break;
case 124:
case PP_KOUENKA:
this->PrimKouenka();
break;
case 46: {
@ -9759,7 +9760,7 @@ bool CEffectPrim::OnProcess() {
this->ShiftSegment();
this->AnimMotion();
} break;
case 84:
case PP_GHOST:
this->PrimGhost();
break;
case 152:
@ -9771,7 +9772,7 @@ bool CEffectPrim::OnProcess() {
case 168:
this->FollowMasterAndAdvance();
break;
case 85:
case PP_SUPERANGEL:
this->PrimSuperAngel();
break;
case 81: {
@ -9801,19 +9802,19 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 42:
case PP_SHIELDBOOMERANG:
this->PrimShieldBoomerang();
break;
case 116:
case PP_SHIELDBOOMERANG3:
this->PrimShieldBoomerang3();
break;
case 97:
case PP_TANJI2:
this->PrimTanji2();
break;
case 87:
this->PrimBubbleSwirl();
break;
case 127:
case PP_BUBBLE_DROP:
this->PrimBubbleDrop();
break;
case 89: {
@ -9891,7 +9892,7 @@ bool CEffectPrim::OnProcess() {
case 166:
this->PrimFramePhase();
break;
case 58:
case PP_FIRSTAID:
this->PrimFirstAid();
break;
case 98: {
@ -9915,16 +9916,16 @@ bool CEffectPrim::OnProcess() {
}
}
} break;
case 53:
case PP_THROWITEM:
this->PrimThrowItem();
break;
case 54:
case PP_CHEMICALPROTECTION:
this->PrimChemical();
break;
case 55:
case PP_CHEMICAL2:
this->PrimChemical2();
break;
case 56:
case PP_CHEMICAL3:
this->PrimChemical3();
break;
case 154:
@ -10019,16 +10020,16 @@ bool CEffectPrim::OnProcess() {
case 172:
this->PrimPoison();
break;
case 45:
case PP_TEIHIT2:
this->PrimTeiHit2();
break;
case 59:
case PP_PARTICLE_UP:
this->PrimParticleUp();
break;
case 136:
this->PrimRandomSpin();
break;
case 47:
case PP_BOTTOM:
this->PrimBottom();
break;
case 156:
@ -10040,13 +10041,13 @@ bool CEffectPrim::OnProcess() {
case 160:
this->PrimGlowFollow();
break;
case 95:
case PP_EFFECTTEXTURE2:
this->PrimEffectTexture2();
break;
case 141:
this->PrimRiseFollow();
break;
case 128:
case PP_EFFECTTEXTURE_ANI:
this->PrimEffectTexture_Ani();
break;
case 140:
@ -10085,10 +10086,10 @@ bool CEffectPrim::OnProcess() {
}
}
break;
case 48:
case PP_BOTTOM2:
this->PrimBottom2();
break;
case 49:
case PP_BOTTOMOUT:
this->PrimBottomOut();
break;
case 51: {

View file

@ -1,3 +1,4 @@
#include "Contents/Effects/EffectPrimId.h"
#include "Contents/Effects/RagEffect.h"
#include "Contents/Configuration/ServiceOptions.h"
#include "Contents/Effects/EffectPrimitiveState.h"
@ -179,14 +180,14 @@ void CEffectPrim::Render(int argument) {
}
switch (this->state.count) {
case 0:
case 1:
case PP_2DTEXTURE:
case PP_2DTEXTUREORBIT:
this->Render2DPrimitive();
break;
case 2:
case PP_2DQUAD:
this->Render2DDiamond();
break;
case 3: {
case PP_2DFLASH: {
const float firstCos = ClientCosine(static_cast<int>(this->state.longitude - this->state.arcAngle));
const float firstSin = ClientSine(static_cast<int>(this->state.longitude - this->state.arcAngle));
const float secondCos = ClientCosine(static_cast<int>(this->state.longitude + this->state.arcAngle));
@ -220,20 +221,20 @@ void CEffectPrim::Render(int argument) {
g_renderer->queues.SubmitTriangle(triangle, 1, g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd);
break;
}
case 4:
case PP_2DCIRCLE:
this->Render2DCircle();
break;
case 5:
case 6:
case 7:
case 8:
case 21:
case 40:
case PP_3DPARTICLE:
case PP_3DPARTICLEGRAVITY:
case PP_3DPARTICLEORBIT:
case PP_3DPARTICLESPLINE:
case PP_3DPARTICLE_NOMASTER:
case PP_SAKURA:
case 46:
case 51:
case 84:
case 85:
case 124:
case PP_GHOST:
case PP_SUPERANGEL:
case PP_KOUENKA:
this->RenderSegmentSprites2(wtm);
break;
case 167:
@ -248,14 +249,14 @@ void CEffectPrim::Render(int argument) {
case 168:
this->RenderGroundSprite(wtm);
break;
case 9:
case 117:
case PP_3DQUADHORN:
case PP_3DQUADHORN2:
this->RenderPyramid(wtm);
break;
case 15:
case PP_3DTEXTURE:
this->DrawEffectPrimitive15(wtm);
break;
case 22: {
case PP_3DTEXTURE_NOMASTER: {
float x;
float y;
float reciprocalDepth;
@ -314,16 +315,16 @@ void CEffectPrim::Render(int argument) {
g_renderer->queues.SubmitTriangle(second, static_cast<std::uint16_t>(this->state.renderFlag), g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd);
break;
}
case 16:
case PP_3DCROSSTEXTURE:
this->RenderCrossPlanes(wtm);
break;
case 12:
case PP_3DCIRCLE:
this->RenderRecordRings(wtm);
break;
case 13:
case PP_3DCYLINDER:
this->RenderArcBand(wtm);
break;
case 104:
case PP_HALFSPHERE:
this->RenderHalfSphere(wtm);
break;
case 146:
@ -344,32 +345,32 @@ void CEffectPrim::Render(int argument) {
case 137:
this->RenderArcWalls(wtm);
break;
case 121:
case PP_SMA2:
this->RenderSMA2(wtm);
break;
case 73:
case PP_MAGNUM2:
this->RenderMagnum2(wtm);
break;
case 61:
case PP_GUARD:
this->RenderSphereCage(wtm);
break;
case 105:
this->RenderCone(wtm);
break;
case 106:
case PP_ATTACKENERGY2:
this->RenderAttackEnergy2(wtm);
break;
case 76:
case PP_SAINTWING:
this->RenderSaintWing(wtm);
break;
case 77:
case 91:
case PP_SPHEREWIND:
case PP_SPHEREWIND2:
this->RenderSphereWind(wtm);
break;
case 78:
case PP_COLORPAPER:
this->RenderColorPaper(wtm);
break;
case 62:
case PP_WIND:
this->RenderRiseArc(wtm);
break;
case 26:
@ -386,35 +387,35 @@ void CEffectPrim::Render(int argument) {
case 148:
this->RenderGroundSquareBlend(wtm);
break;
case 114:
case PP_HERMODE:
this->RenderHermode(wtm);
break;
case 68:
case PP_ASURACASTING:
case 147:
this->RenderHaloLayers(wtm);
break;
case 131:
this->RenderRipple(wtm);
break;
case 70:
case PP_HITLINE:
this->RenderHitLine(wtm);
break;
case 100:
case PP_HITLINE3:
this->RenderHitLine3(wtm);
break;
case 103:
this->RenderStackedRings(wtm);
break;
case 101:
case PP_ELECTRIC:
this->RenderLightningArc(wtm);
break;
case 135:
this->RenderJitterSweeps(wtm);
break;
case 102:
case PP_ELECTRIC2:
this->RenderLightningTube(wtm);
break;
case 27:
case PP_MAPPARTICLE:
this->RenderGroundBubbles(wtm);
break;
case 29:
@ -427,7 +428,7 @@ void CEffectPrim::Render(int argument) {
case 130:
this->RenderFacingQuads(wtm);
break;
case 111:
case PP_SOULPARTICLE:
case 115:
this->RenderSoulParticle(wtm);
break;
@ -438,28 +439,28 @@ void CEffectPrim::Render(int argument) {
case 157:
this->RenderGlowSquare(wtm);
break;
case 109:
case PP_SOULLINK:
this->RenderSoulLink(wtm);
break;
case 151:
this->RenderLaunchEffects(wtm);
break;
case 96:
case PP_PEONGUP:
this->RenderPeongUp(wtm);
break;
case 94:
case PP_PEONG:
this->RenderPeong(wtm);
break;
case 35: {
this->RenderOrbitIcons(wtm, 1.0f, 100, 100, 255);
break;
}
case 99:
case PP_DOUBLEGUMGANG:
this->RenderDoubleGumGang(wtm);
break;
case 23:
case 24:
case 25:
case PP_3DCASTING:
case PP_3DCASTING_2:
case PP_3DCASTING_3:
case 30:
case 31:
case 41:
@ -467,38 +468,38 @@ void CEffectPrim::Render(int argument) {
case 57:
case 60:
case 63:
case 65:
case 107:
case 108:
case PP_3DCASTING_4:
case PP_3DCASTING_5:
case PP_FLOWERCAST:
case 113:
case 118:
case PP_ACIDDEMON:
case 139:
this->Render3DCasting(wtm);
break;
case 36:
case 110:
case PP_HEAL_LOW:
case 169:
this->Render3DCasting_LowPolygon(wtm);
break;
case 34:
case PP_GI_3:
this->Render3DCasting2(wtm);
break;
case 37:
case PP_GRANDCROSS2:
this->RenderGrandCross2(wtm);
break;
case 75:
case PP_SLASH1:
this->RenderSlash1(wtm);
break;
case 64:
case PP_RECT_UP:
this->RenderRectUp(wtm);
break;
case 90:
case PP_RECT_UP2:
this->RenderRectUp2(wtm);
break;
case 132:
this->RenderColorPanel(wtm);
break;
case 43:
case PP_INTIMIDATE:
this->RenderOrbitSquare(wtm);
break;
case 44:
@ -510,13 +511,13 @@ void CEffectPrim::Render(int argument) {
break;
case 119:
case 122:
case 125:
case PP_STIN4:
this->RenderFloorSquare2(wtm);
break;
case 126:
this->RenderRotatedRing(wtm);
break;
case 120:
case PP_SMA:
this->RenderSMA3(wtm);
break;
case 98:
@ -532,18 +533,18 @@ void CEffectPrim::Render(int argument) {
this->RenderTwinFacingSquares(wtm);
break;
case 33:
case 42:
case 45:
case 47:
case 49:
case 53:
case 58:
case 59:
case PP_SHIELDBOOMERANG:
case PP_TEIHIT2:
case PP_BOTTOM:
case PP_BOTTOMOUT:
case PP_THROWITEM:
case PP_FIRSTAID:
case PP_PARTICLE_UP:
case 87:
case 97:
case 116:
case 123:
case 127:
case PP_TANJI2:
case PP_SHIELDBOOMERANG3:
case PP_TWILIGHT:
case PP_BUBBLE_DROP:
this->RenderFieldPanel(wtm);
break;
case 156:
@ -553,8 +554,8 @@ void CEffectPrim::Render(int argument) {
this->RenderSpinSquares(wtm);
break;
case 82:
case 95:
case 128:
case PP_EFFECTTEXTURE2:
case PP_EFFECTTEXTURE_ANI:
case 140:
this->RenderTeiFacingSlots(wtm);
break;
@ -570,7 +571,7 @@ void CEffectPrim::Render(int argument) {
case 134:
this->RenderBladeTrail(wtm);
break;
case 54:
case PP_CHEMICALPROTECTION:
this->RenderChemical(wtm);
break;
case 89:
@ -594,10 +595,10 @@ void CEffectPrim::Render(int argument) {
case 166:
this->RenderFoldingRibbon(wtm);
break;
case 55:
case PP_CHEMICAL2:
this->RenderFloorRect(wtm);
break;
case 56:
case PP_CHEMICAL3:
this->RenderGroundBar(wtm);
break;
case 154:
@ -609,7 +610,7 @@ void CEffectPrim::Render(int argument) {
case 74:
this->RenderHalfSphere2(wtm);
break;
case 71:
case PP_BLIND:
this->RenderBlind(wtm);
break;
case 72:
@ -646,16 +647,16 @@ void CEffectPrim::Render(int argument) {
}
break;
}
case 52:
case PP_POKJUK:
this->RenderTrailSquares(wtm);
break;
case 38:
case PP_LINELINK:
this->RenderTube(wtm);
break;
case 69:
this->RenderPentaRing(wtm);
break;
case 66:
case PP_FOREST:
this->RenderPentagon(wtm);
break;
case 129: {
@ -697,23 +698,23 @@ void CEffectPrim::Render(int argument) {
case 142:
this->RenderStandingPanels(wtm);
break;
case 93:
case PP_RAINBOW:
this->RenderRainbow(wtm);
break;
case 81:
this->RenderBeam(wtm);
break;
case 48:
case PP_BOTTOM2:
this->RenderColorPlane(wtm);
break;
case 10:
case 11:
case PP_3DSPLINE:
case PP_3DSPIRAL:
this->RenderRecordQuads(wtm);
break;
case 14:
case PP_3DSPHERE:
this->RenderSphere(wtm);
break;
case 19: {
case PP_3DFLASH: {
const float firstCos = ClientCosine(static_cast<int>(this->state.longitude - this->state.arcAngle));
const float firstSin = ClientSine(static_cast<int>(this->state.longitude - this->state.arcAngle));
const float secondCos = ClientCosine(static_cast<int>(this->state.longitude + this->state.arcAngle));
@ -747,7 +748,7 @@ void CEffectPrim::Render(int argument) {
g_renderer->queues.SubmitTriangle(triangle, 1, g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd);
break;
}
case 20: {
case PP_3DLINE: {
float position[3] = {this->render.position.x, this->render.position.y, this->render.position.z};
RenderVertex top{0, 0, 0, 0, 0, 0xFF000000u, 0, 0};
g_renderer->viewport.Project(position, wtm.values, top);

View file

@ -1,4 +1,6 @@
#include "Contents/Skills/SkillUnitId.h"
#include "Client/Mode/GameModeEnums.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Effects/MsgEffect.h"
#include "Client/Mode/CGameMode.h"
@ -92,8 +94,8 @@ vector2d& vector2d::Normalize() {
// FUNCTION: fn_24270
bool CMsgEffect::UsesMsgEffect(int type) {
switch (type) {
case 3:
case 18:
case MET_CART:
case MET_BIRD:
case 27:
case 31:
return true;
@ -199,15 +201,15 @@ bool CMsgEffect::OnProcess() {
this->FollowOwner();
switch (this->m_type) {
case 0xD:
case 0xE:
case 0xF:
case 0x10:
case 0x11:
case 0x12:
case 0x15:
case 0x16:
case 0x19:
case MET_MISS:
case MET_NUMBER:
case MET_CRITICAL_EFFECT:
case MET_NUMBER_CRITICAL:
case MET_LUCKY_EFFECT:
case MET_BIRD:
case MET_NUMBER_HALF:
case MET_NUMBER_TOTAL:
case MET_BLUE_EFFECT:
break;
default:
if (this->m_type != 0x72) {
@ -218,7 +220,7 @@ bool CMsgEffect::OnProcess() {
float elapsed;
switch (this->m_type) {
case 0x10:
case MET_NUMBER_CRITICAL:
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
MsgEffectDrift(this, elapsed);
@ -253,8 +255,8 @@ bool CMsgEffect::OnProcess() {
return true;
}
case 0xE:
case 0x15:
case MET_NUMBER:
case MET_NUMBER_HALF:
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
MsgEffectDrift(this, elapsed);
@ -266,7 +268,7 @@ bool CMsgEffect::OnProcess() {
this->SetColor(static_cast<int>(250.0f - elapsed * 3.4f), -1, -1, -1);
return !(elapsed > 70.0f);
case 0x18: {
case MET_GUARD: {
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
if (this->render.curMotion == 0) {
@ -284,7 +286,7 @@ bool CMsgEffect::OnProcess() {
return !(elapsed > 10.0f);
}
case 0xD:
case MET_MISS:
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
this->render.position.y = this->m_baseY - elapsed * 0.54f;
@ -293,7 +295,7 @@ bool CMsgEffect::OnProcess() {
this->GetActRes();
return !(elapsed > 80.0f);
case 0x16: {
case MET_NUMBER_TOTAL: {
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
this->render.position.y = this->m_baseY - elapsed * 0.1f;
@ -310,7 +312,7 @@ bool CMsgEffect::OnProcess() {
return !(elapsed > 120.0f);
}
case 0x19: {
case MET_BLUE_EFFECT: {
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
this->render.curMotion = 0;
@ -338,7 +340,7 @@ bool CMsgEffect::OnProcess() {
return !(elapsed > 120.0f);
}
case 0xF: {
case MET_CRITICAL_EFFECT: {
elapsed = MsgEffectElapsedFrames(this);
this->render.previousAnimation = this->render.animation;
MsgEffectDrift(this, elapsed);
@ -374,10 +376,10 @@ bool CMsgEffect::OnProcess() {
return true;
}
case 0:
case 1:
case 2:
case 0x11: {
case MET_JUST_ANIMATE:
case MET_EMOTION:
case MET_MVP:
case MET_LUCKY_EFFECT: {
CActRes* action = this->GetActRes();
elapsed = MsgEffectElapsedFrames(this);
const int frames = static_cast<int>(action->FrameCount(this->render.previousAnimation));
@ -405,7 +407,7 @@ bool CMsgEffect::OnProcess() {
return false;
}
case 6: {
case MET_ICEBREAKEFFECT: {
elapsed = MsgEffectElapsedFrames(this);
CActRes* action = this->GetActRes();
const int frames = static_cast<int>(action->FrameCount(this->render.previousAnimation));
@ -417,13 +419,13 @@ bool CMsgEffect::OnProcess() {
return false;
}
case 4:
case 5:
case 7:
case 8:
case 9:
case 10:
case 0x1A:
case MET_PKEFFECT:
case MET_ICEEFFECT:
case MET_CURSE_EFFECT:
case MET_SLEEP_EFFECT:
case MET_STUN_EFFECT:
case MET_SILENCE_EFFECT:
case MET_CURSOR_EFFECT:
case 0x25:
case 0x26: {
elapsed = MsgEffectElapsedFrames(this);
@ -433,8 +435,8 @@ bool CMsgEffect::OnProcess() {
return true;
}
case 0xB:
case 0xC:
case MET_ANGELUS_EFFECT:
case MET_CRUSIS_EFFECT:
if (this->m_owner == nullptr) {
return true;
}
@ -444,7 +446,7 @@ bool CMsgEffect::OnProcess() {
}
return true;
case 0x12:
case MET_BIRD:
if (this->unknown_01B4 != 0 && this->m_owner != nullptr) {
CRenderObject* owner = static_cast<CRenderObject*>(this->m_owner);
this->Face(owner->render.position.x, owner->render.position.z);
@ -1200,15 +1202,15 @@ bool CSkill::OnProcess() {
// FUNCTION: fn_24289
void CMsgEffect::FollowOwner() {
switch (this->m_type) {
case 0xD:
case 0xE:
case 0xF:
case 0x10:
case 0x11:
case 0x15:
case 0x16:
case 0x18:
case 0x19:
case MET_MISS:
case MET_NUMBER:
case MET_CRITICAL_EFFECT:
case MET_NUMBER_CRITICAL:
case MET_LUCKY_EFFECT:
case MET_NUMBER_HALF:
case MET_NUMBER_TOTAL:
case MET_GUARD:
case MET_BLUE_EFFECT:
if (this->m_owner != nullptr) {
CRenderObject* owner = static_cast<CRenderObject*>(this->m_owner);
const float x = owner->render.position.x;
@ -1221,8 +1223,8 @@ void CMsgEffect::FollowOwner() {
this->render.unknown_0124 = 0x200;
break;
case 4:
case 0xB:
case MET_PKEFFECT:
case MET_ANGELUS_EFFECT:
if (this->m_owner != nullptr) {
const CRenderObject* owner = static_cast<CRenderObject*>(this->m_owner);
this->render.position.x = owner->render.position.x;
@ -1232,7 +1234,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 0xC:
case MET_CRUSIS_EFFECT:
if (this->m_owner != nullptr) {
const CRenderObject* owner = static_cast<CRenderObject*>(this->m_owner);
this->render.position.x = owner->render.position.x;
@ -1242,7 +1244,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 5:
case MET_ICEEFFECT:
if (this->m_owner != nullptr) {
const CRenderObject* owner = static_cast<CRenderObject*>(this->m_owner);
this->render.position.x = owner->render.position.x;
@ -1291,11 +1293,11 @@ void CMsgEffect::FollowOwner() {
}
break;
case 1:
case 2:
case 8:
case 9:
case 10:
case MET_EMOTION:
case MET_MVP:
case MET_SLEEP_EFFECT:
case MET_STUN_EFFECT:
case MET_SILENCE_EFFECT:
case 0x25:
case 0x26:
if (this->m_owner != nullptr) {
@ -1311,7 +1313,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 7:
case MET_CURSE_EFFECT:
if (this->m_owner != nullptr) {
const CRenderObject* owner = static_cast<CRenderObject*>(this->m_owner);
this->render.position.x = owner->render.position.x;
@ -1376,7 +1378,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 3:
case MET_CART:
if (this->m_owner != nullptr) {
CWorld* scene = static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene;
const float dist = static_cast<CRenderObject*>(this->m_owner)->CalcDist(this->render.position.x, this->render.position.z);
@ -1403,7 +1405,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 0x12:
case MET_BIRD:
if (this->m_owner != nullptr && this->unknown_01B4 == 0) {
CWorld* scene = static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene;
const float dist = static_cast<CRenderObject*>(this->m_owner)->CalcDist(this->render.position.x, this->render.position.z);
@ -1453,7 +1455,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 0x1A:
case MET_CURSOR_EFFECT:
if (this->m_owner == nullptr) {
break;
}
@ -1471,7 +1473,7 @@ void CMsgEffect::FollowOwner() {
}
break;
case 6:
case MET_ICEBREAKEFFECT:
break;
}
}
@ -1490,12 +1492,12 @@ bool CSummonActorEffect::OnProcess() {
// FUNCTION: fn_24293
void CMsgEffect::Render(int argument) {
switch (this->m_type) {
case 13:
case 14:
case 15:
case 16:
case 21:
case 22:
case MET_MISS:
case MET_NUMBER:
case MET_CRITICAL_EFFECT:
case MET_NUMBER_CRITICAL:
case MET_NUMBER_HALF:
case MET_NUMBER_TOTAL:
case 114:
if (!g_msgEffectShowSpecial) {
return;
@ -1513,7 +1515,7 @@ void CMsgEffect::Render(int argument) {
void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int, int, int, int) {
const vector3d* position = reinterpret_cast<const vector3d*>(b);
switch (static_cast<std::int64_t>(a) << 32 | static_cast<std::uint32_t>(message)) {
case 29:
case AM_REQ_ATTACK:
if (this->m_type == 18) {
this->m_velocity.x = (position->x - this->render.position.x) / 10.0f;
this->m_velocity.y = (position->y - this->render.position.y) / 10.0f;
@ -1533,18 +1535,18 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
case 49:
case AM_MSGMASTER_DEAD:
this->m_owner = nullptr;
switch (this->m_type) {
case 6:
case 13:
case 14:
case 15:
case 16:
case 17:
case 21:
case 22:
case 25:
case MET_ICEBREAKEFFECT:
case MET_MISS:
case MET_NUMBER:
case MET_CRITICAL_EFFECT:
case MET_NUMBER_CRITICAL:
case MET_LUCKY_EFFECT:
case MET_NUMBER_HALF:
case MET_NUMBER_TOTAL:
case MET_BLUE_EFFECT:
break;
default:
@ -1553,15 +1555,15 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
return;
case 53:
case AM_DISAPPEAR:
this->m_finished = 1;
return;
case 50:
case AM_SET_MASTER_POINTER:
this->m_owner = sender;
switch (this->m_type) {
case 3:
case 18:
case MET_CART:
case MET_BIRD:
case 27:
case 31:
if (sender != nullptr) {
@ -1572,7 +1574,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
break;
case 6:
case MET_ICEBREAKEFFECT:
if (sender != nullptr) {
const CRenderObject* owner = static_cast<const CRenderObject*>(sender);
this->render.position.x = owner->render.position.x;
@ -1583,11 +1585,11 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
return;
case 22:
case AM_SETMASTERGID:
this->m_type = d;
this->m_value = b;
switch (d) {
case 3:
case MET_CART:
case 31:
this->render.unknown_00A2 = 0;
this->render.unknown_0080 = 0;
@ -1595,23 +1597,23 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->render.unknown_0054 = 1.0f;
break;
case 4:
case MET_PKEFFECT:
this->SetColor(0x7F, 0xFF, 0, 0);
break;
case 7:
case MET_CURSE_EFFECT:
this->SetColor(0x7F, -1, -1, -1);
this->render.unknown_00A2 = 0;
this->render.unknown_0080 = 5;
break;
case 5:
case 6:
case MET_ICEEFFECT:
case MET_ICEBREAKEFFECT:
this->render.unknown_00A2 = 0;
this->render.unknown_0080 = 5;
break;
case 18:
case MET_BIRD:
this->render.unknown_00A2 = 0;
this->render.unknown_0080 = 0;
break;
@ -1625,18 +1627,18 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
return;
case 64: {
case AM_SETPOS2: {
int offset = 0;
switch (this->m_type) {
case 13:
case MET_MISS:
this->m_baseX = this->render.position.x;
return;
case 22:
case MET_NUMBER_TOTAL:
offset = 15;
case 14:
case 16:
case 21:
case MET_NUMBER:
case MET_NUMBER_CRITICAL:
case MET_NUMBER_HALF:
this->SetSpriteName(ResourceMgr::Instance(), FormatOwnedString("%s.spr", g_session.m_damageResourceName.c_str()).c_str());
this->SetActionName(ResourceMgr::Instance(), FormatOwnedString("%s.act", g_session.m_damageResourceName.c_str()).c_str());
this->render.animation = 0;
@ -1648,9 +1650,9 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->m_baseY = this->render.position.y;
break;
case 15:
case 17:
case 18:
case MET_CRITICAL_EFFECT:
case MET_LUCKY_EFFECT:
case MET_BIRD:
case 19:
case 20:
return;
@ -1688,7 +1690,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
return;
}
case 14: {
case AM_SETPOS: {
this->render.visible = 1;
this->render.unknown_008C = timeGetTime();
if ((static_cast<std::int64_t>(e) << 32 | static_cast<std::uint32_t>(d)) != 0) {
@ -1706,24 +1708,24 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
}
switch (this->m_type) {
case 3:
case MET_CART:
case 27:
case 31:
break;
case 6:
case MET_ICEBREAKEFFECT:
this->render.position.x = position->x;
this->render.position.y = position->y;
this->render.position.z = position->z;
break;
case 11:
case 12:
case MET_ANGELUS_EFFECT:
case MET_CRUSIS_EFFECT:
this->render.curMotion = 1;
this->render.visible = 0;
break;
case 13:
case MET_MISS:
this->render.position.x = position->x;
this->render.position.y = position->y;
this->render.position.z = position->z;
@ -1736,8 +1738,8 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->render.unknown_0080 = static_cast<std::uint32_t>(-5);
break;
case 15:
case 25:
case MET_CRITICAL_EFFECT:
case MET_BLUE_EFFECT:
this->render.position.x = position->x;
this->render.position.y = position->y;
this->render.position.z = position->z;
@ -1760,7 +1762,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c,
this->m_baseY = this->render.position.y;
break;
case 24:
case MET_GUARD:
this->render.position.x = position->x;
this->render.position.y = position->y;
this->render.position.z = position->z;

View file

@ -1,4 +1,5 @@
#include "Contents/Effects/Particle.h"
#include "UI/Window/WindowId.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/Actors/RenderObject.h"
@ -541,7 +542,7 @@ void CEZ2STRParticle::RenderScreen(EZeffectClip* clip, EZeffectTransform* transf
if (this->m_attachToWindow == true) {
switch (this->m_windowId) {
case 361:
case WID_RUNESYSTEMWND:
case 10022:
case 10023:
case 10026:

View file

@ -1,4 +1,5 @@
#include "Contents/Effects/RagEffect.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Actors/Pc.h"
#include "Contents/MapSkyMgr.h"
#include "Contents/Skills/ClientSkills.h"
@ -15084,7 +15085,7 @@ void CRagEffect::SendMsg(
const std::int64_t third = static_cast<std::int64_t>(thirdHigh) << 32 | static_cast<std::uint32_t>(thirdLow);
switch (message) {
case 14:
case AM_SETPOS:
if (first != 0) {
const float* position = reinterpret_cast<const float*>(static_cast<std::intptr_t>(first));
this->state.deltaPos[0] = position[0];
@ -15098,10 +15099,10 @@ void CRagEffect::SendMsg(
this->state.deltaPos2[2] = position[2];
}
break;
case 24:
case AM_MASTER_DEAD:
this->state.parent = nullptr;
break;
case 25:
case AM_CHILD_DEAD:
if (first == 0) {
if (sender == nullptr) {
break;
@ -15119,7 +15120,7 @@ void CRagEffect::SendMsg(
this->state.primList.erase(this->state.primList.begin(), this->state.primList.end());
}
break;
case 44:
case AM_SETCOUNT:
if (first == 0xFFFF) {
if (second == 130) {
this->render.position.x = 200.0f;
@ -15170,7 +15171,7 @@ void CRagEffect::SendMsg(
}
}
break;
case 46: {
case AM_SETPARAM: {
const float* param = reinterpret_cast<const float*>(static_cast<std::intptr_t>(first));
this->state.param[0] = param[0];
this->state.param[1] = param[1];
@ -15178,7 +15179,7 @@ void CRagEffect::SendMsg(
this->state.param[3] = param[3];
break;
}
case 80:
case AM_SET_DURATION:
this->SetStateDuration(static_cast<int>(first));
break;
case 127:

View file

@ -1,4 +1,5 @@
#include "Contents/Effects/SpriteParticle.h"
#include "Contents/Actors/ActorEnums.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/Actors/GameActor.h"
@ -77,17 +78,17 @@ void CSpriteParticle::UpdateFrame() {
}
switch (this->loopMode) {
case 0:
case MT_LOOP:
if (this->frame >= frameCount) {
this->frame = 0;
}
break;
case 1:
case MT_ONETIME:
if (this->frame >= frameCount) {
this->life = -1.0f;
}
break;
case 2:
case MT_STATIC:
if (this->frame >= frameCount) {
this->frame = static_cast<int>(frameCount) - 1;
}

View file

@ -1,4 +1,5 @@
#include "Contents/Effects/ViolentQuakeEffect.h"
#include "Contents/Effects/EffectTypes.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
@ -58,7 +59,7 @@ void CViolentQuakeEffect::Close() {
// FUNCTION: fn_07533
void CViolentQuakeEffect::Open() {
switch (this->id) {
case 1760: {
case EF_UNK_1760: {
CEZ2STRParticle* emitter = static_cast<CEZ2STRParticle*>(CreateEZ2STRParticle(reinterpret_cast<const vector3d*>(this->position), 5));
emitter->Load(FormatOwnedString("violentquake\\violentquake\\violentquake_%02d.str", std::max(rand() % 3, 0) + 1));
emitter->unknown_00D0 = 0.0f;
@ -68,7 +69,7 @@ void CViolentQuakeEffect::Open() {
this->AddEvent(0, "effect\\AG_VIOLENT_QUAKE.wav", 0, 0);
break;
}
case 1798:
case EF_UNK_1798:
this->InitAllBloom();
break;
}

View file

@ -1,4 +1,5 @@
#include "Contents/EntryQueueMgr.h"
#include "Network/Packets/NoticeEnums.h"
#include "Client/Session.h"
#include "Contents/MessageTable.h"
@ -119,7 +120,7 @@ void CEntryQueueMgr::SetCharacterName(const EntryQueueName& name) {
void CEntryQueueMgr::OnApplyResult(const EntryQueueApplyResult* packet) {
int message;
switch (packet->result) {
case 1: {
case BG_APPLY_ACCEPT: {
if (!g_windowMgr.CloseWindow(209)) {
g_windowMgr.EnsureWindow(209);
}
@ -137,31 +138,31 @@ void CEntryQueueMgr::OnApplyResult(const EntryQueueApplyResult* packet) {
this->ready = 1;
return;
}
case 2:
case BG_APPLY_QUEUE_FINISHED:
message = 0x834;
break;
case 3:
case BG_APPLY_INVALID_NAME:
message = 0x835;
break;
case 4:
case BG_APPLY_INVALID_APP:
message = 0x836;
break;
case 5:
case BG_APPLY_PLAYER_COUNT:
message = 0x837;
break;
case 6:
case BG_APPLY_PLAYER_LEVEL:
message = 0x838;
break;
case 7:
case BG_APPLY_DUPLICATE:
message = 0x839;
break;
case 8:
case BG_APPLY_RECONNECT:
message = 0x83A;
break;
case 9:
case BG_APPLY_PARTYGUILD_LEADER:
message = 0x83C;
break;
case 10:
case BG_APPLY_PLAYER_CLASS:
message = 0x83B;
break;
case 15:

View file

@ -0,0 +1,95 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_HOTKEYS_INTERFACEHOTKEY_H
#define RAGNAROK_SOURCE_CONTENTS_HOTKEYS_INTERFACEHOTKEY_H
enum InterfaceHotkey : int {
HK_BASICINFOWND_MINI = 0,
HK_EQUIPWND_ONOFF = 1,
HK_SKILLWND_ONOFF = 2,
HK_QUESTWND_ONOFF = 3,
HK_FRIENDWND_ONOFF = 4,
HK_PARTYWND_ONOFF = 5,
HK_CHATWND_MAKE = 6,
HK_CARTWND_ONOFF = 7,
HK_MAPWND_ONOFF = 8,
HK_ITEMWND_ONOFF = 9,
HK_GUILDWND_ONOFF = 10,
HK_EMOTIONWND_ONOFF = 11,
HK_SITORSTAND = 12,
HK_MINIMAP_ONOFF = 13,
HK_MACROWND_ONOFF = 14,
HK_EXEWND_ONOFF = 15,
HK_ALLWND_OFF = 16,
HK_SKILLBAR_ONOFF = 17,
HK_CHATWND_ONOFF = 18,
HK_CHATWND_ZOOM = 19,
HK_GAGE_ONOFF = 20,
HK_SNAPSHOT = 21,
HK_MEMORIALWND_ONOFF = 22,
HK_PETWND_ONOFF = 23,
HK_HOMUNWND_ONOFF = 24,
HK_MERWND_ONOFF = 25,
HK_HOMUN_FOLLOW = 26,
HK_MER_FOLLOW = 27,
HK_FRIEND_OPTIONWND = 28,
HK_PARTY_OPTIONWND = 29,
HK_BATTLEFIELDWND = 30,
HK_FIRST_HIDDEN = 30,
HK_CHATMODE_ONOFF = 31,
HK_BASICINFOWND_BTN_ONOFF = 32,
HK_PARTY_RECRUIT = 33,
HK_PARTY_BOOKING_LIST = 34,
HK_GROUND_CURSOR_ONOFF = 35,
HK_EXMACRO_SETUPWND = 36,
HK_CASHSHOPWND = 37,
HK_REPLAY_ONOFF = 38,
HK_REPLAY_STARTSTOP = 39,
HK_REPLAY_SPEEDP = 40,
HK_REPLAY_SPEEDN = 41,
HK_NAVIGATION_ONOFF = 42,
HK_BUTTONS_RELOCATE = 43,
HK_CLANWND_ONOFF = 44,
HK_MENUICON_HIDE = 45,
HK_BANK = 46,
HK_STATUSWND_ONOFF = 47,
HK_SHORTCUTWND_ROTATE = 48,
HK_ACHIEVEMENT = 49,
HK_SINGLEMAP_ONOFF = 50,
HK_MAIL_ONOFF = 51,
HK_SWAP_EQUIPMENT = 52,
HK_TWITTERWND = 53,
HK_TIPBOXWND_ONOFF = 54,
HK_CHANGE_SKILLBAR = 55,
HK_COSEQUIPWND_ONOFF = 56,
HK_PARTYBOARDWND_ONOFF = 57,
HK_HUNTINGQUEST_INFO_ONOFF = 58,
HK_UNKNOWN_62 = 62,
HK_UNKNOWN_64 = 64,
HK_UNKNOWN_65 = 65,
HK_UNKNOWN_66 = 66,
HK_UNKNOWN_67 = 67,
};
enum MacroHotkey : int {
HK_MACRO_1 = 0,
HK_MACRO_2 = 1,
HK_MACRO_3 = 2,
HK_MACRO_4 = 3,
HK_MACRO_5 = 4,
HK_MACRO_6 = 5,
HK_MACRO_7 = 6,
HK_MACRO_8 = 7,
HK_MACRO_9 = 8,
HK_MACRO_10 = 9,
HK_FLAG_1 = 10,
HK_FLAG_2 = 11,
HK_FLAG_3 = 12,
HK_FLAG_4 = 13,
HK_FLAG_5 = 14,
HK_FLAG_6 = 15,
HK_FLAG_7 = 16,
HK_FLAG_8 = 17,
HK_FLAG_9 = 18,
HK_FLAG_10 = 19,
};
#endif

View file

@ -1,26 +1,11 @@
#include "Contents/Hotkeys/UserHotkeyMgr.h"
#include "Contents/Hotkeys/HotkeyInfo.h"
#include "Contents/Hotkeys/InterfaceHotkey.h"
#include "Network/TextEncoding.h"
#include <new>
namespace {
enum InterfaceHotkey {
HK_BATTLEFIELDWND = 30,
HK_PARTY_RECRUIT = 33,
HK_PARTY_BOOKING_LIST = 34,
HK_EXMACRO_SETUPWND = 36,
HK_BUTTONS_RELOCATE = 43,
HK_MENUICON_HIDE = 45,
HK_TWITTERWND = 53,
HK_HUNTINGQUEST_INFO_ONOFF = 58,
HK_UNKNOWN_62 = 62,
HK_UNKNOWN_64 = 64,
HK_UNKNOWN_65 = 65,
HK_UNKNOWN_66 = 66,
HK_UNKNOWN_67 = 67,
HK_FIRST_HIDDEN = HK_BATTLEFIELDWND,
};
// INLINED
bool HiddenInterfaceIndex(int index) {

View file

@ -35,6 +35,215 @@ enum item_itemid : int {
HD_Etel_Bradium = 1000369,
Etel_Carnium = 1000370,
HD_Etel_Carnium = 1000371,
ITEMID_RED_POTION = 501,
Orange_Potion = 502,
ITEMID_YELLOW_POTION = 503,
ITEMID_WHITE_POTION = 504,
ITEMID_BLUE_POTION = 505,
Green_Potion = 506,
Red_Herb = 507,
Yellow_Herb = 508,
White_Herb = 509,
Blue_Herb = 510,
Green_Herb = 511,
ITEMID_APPLE = 512,
Banana = 513,
Grape = 514,
Carrot = 515,
Sweet_Potato = 516,
Meat = 517,
Honey = 518,
Milk = 519,
Leaflet_Of_Hinal = 520,
Leaflet_Of_Aloe = 521,
Fruit_Of_Mastela = 522,
ITEMID_HOLY_WATER = 523,
Royal_Jelly = 526,
Monster = 528,
Candy = 529,
Candy_Striper = 530,
Apple_Juice = 531,
Banana_Juice = 532,
Grape_Juice = 533,
Carrot_Juice = 534,
ITEMID_PUMPKIN = 535,
Ice_Cream = 536,
ITEMID_PET_FOOD = 537,
Well_Baked_Cookie = 538,
Piece_Of_Cake = 539,
Falcon = 540,
Pecopeco = 541,
Festive_Cookie = 542,
Festive_Rainbow_Cake = 543,
Fish_Slice = 544,
ITEMID_RED_SLIM_POTION = 545,
ITEMID_YELLOW_SLIM_POTION = 546,
ITEMID_WHITE_SLIM_POTION = 547,
Cheese = 548,
Nice_Sweet_Potato = 549,
Popped_Rice = 550,
Shusi = 551,
KETUPAT = 552,
Bun = 553,
Mojji = 554,
Rice_Cake = 555,
Long_Rice_Cake = 556,
Hash_Rice_Cake = 557,
Chocolate = 558,
HandMade_Chocolate = 559,
HandMade_Chocolate_ = 560,
White_Chocolate = 561,
Pizza = 562,
Pizza_01 = 563,
Rice_Ball = 564,
Vita500_Bottle = 565,
Tomyumkung = 566,
Prawn = 567,
Lemon = 568,
Novice_Potion = 569,
Lucky_Candy = 570,
Lucky_Candy_Cane = 571,
Lucky_Cookie = 572,
Chocolate_Drink = 573,
Egg = 574,
Piece_Of_Cake_ = 575,
Prickly_Fruit = 576,
Grain = 577,
Strawberry = 578,
Delicious_Fish = 579,
Bread = 580,
Mushroom = 581,
Orange = 582,
KETUPAT_ = 583,
Fish_Ball_Soup = 584,
Wurst = 585,
Mother = 586,
Cute_Strawberry_Choco = 596,
Lovely_Choco_Tart = 597,
Light_Red_Pot = 598,
Light_Orange_Pot = 599,
Yggdrasilberry = 607,
Center_Potion = 645,
Awakening_Potion = 656,
Berserk_Potion = 657,
Inspector_Certificate = 662,
Korea_Rice_Cake = 663,
Magical_Carnation = 680,
Realgar_Wine = 682,
Exorcize_Herb = 683,
Durian = 684,
RAMADAN = 685,
ITEMID_BLOODY_RED = 990,
ITEMID_CRYSTAL_BLUE = 991,
ITEMID_WIND_OF_VERDURE = 992,
ITEMID_YELLOW_LIVE = 993,
Light_Yellow_Pot = 11500,
Light_White_Pot = 11501,
Light_Blue_Pot = 11502,
Siege_White_Potion = 11503,
Siege_Blue_Potion = 11504,
Woe_Violet_Potion = 11547,
Woe_White_Potion = 11548,
Woe_Blue_Potion = 11549,
TE_White_Potion = 11557,
TE_White_Slim_Potion = 11558,
White_Potion_B = 11565,
Yellow_Potion_B = 11566,
Novice_Potion_B = 11567,
Red_Slim_Potion_B = 11568,
Orange_Potion_B = 11569,
Red_Potion_B = 11570,
Green_Potion_B = 11571,
Blue_Potion_B = 11572,
White_Slim_Potion_B = 11573,
Yellow_Slim_Potion_B = 11574,
Rice_Ball_B = 11577,
Candy_Striper_B = 11578,
Candy_B = 11580,
Piece_Of_Cake_B = 11581,
Well_Baked_Cookie_B = 11582,
Chocolate_Drink_B = 11583,
White_Chocolate_B = 11584,
HandMade_Chocolate_B = 11585,
HandMade_Chocolate_B_ = 11586,
Chocolate_B = 11587,
Girl_Bunch_Of_Flower = 11701,
Speed_Up_Potion = 12016,
Slow_Down_Potion = 12017,
Fire_Cracker = 12018,
Giftbox_China = 12023,
Giggling_Box = 12027,
Box_Of_Thunder = 12028,
Gloomy_Box = 12029,
Box_Of_Grudge = 12030,
Sleepy_Box = 12031,
Box_Of_Storm = 12032,
Box_Of_Sunlight = 12033,
Painting_Box = 12034,
Resist_Fire = 12118,
Resist_Water = 12119,
Resist_Earth = 12120,
Resist_Wind = 12121,
Sesame_Pastry = 12122,
Honey_Pastry = 12123,
Rainbow_Cake = 12124,
Lucky_Potion = 12131,
Plain_Rice_Cake = 12195,
Hearty_Rice_Cake = 12196,
Salty_Rice_Cake = 12197,
Lucky_Rice_Cake = 12198,
Assumptio_5_Scroll = 12218,
Cacao99 = 12234,
Choco_Lump = 12237,
New_Year_Rice_Cake_1 = 12238,
New_Year_Rice_Cake_2 = 12239,
Str_Dish10_M = 12250,
Agi_Dish10_M = 12251,
Int_Dish10_M = 12252,
Dex_Dish10_M = 12253,
Luk_Dish10_M = 12254,
Vit_Dish10_M = 12255,
Inspector_Certificate_ = 12262,
Spray_Of_Flowers = 12310,
Large_Spray_Of_Flowers = 12311,
Goddess_Bless = 12315,
Angel_Bless = 12316,
Powder_Snow = 12317,
Little_Heart = 12318,
J_Firecracker = 12326,
ITEMID_ANCILLA = 12333,
Manuk = 12342,
Manuks_Courage = 12343,
Pinguicula = 12344,
Luciola = 12345,
Tiny_Waterbottle = 12353,
Mora_Berry = 12574,
RWC_Cele_Fire = 12696,
RWC_Cele_Fire2 = 12697,
No100_Firecracker = 12788,
J_Aspersio_5_Scroll = 12928,
Light_Center_Pot = 14509,
Light_Awakening_Pot = 14510,
Light_Berserk_Pot = 14511,
Fire_Cracker_Love = 14546,
Fire_Cracker_Wday = 14547,
Fire_Cracker_Vday = 14548,
Fire_Cracker_Bday = 14549,
Fire_Cracker_Xmas = 14550,
Tyr = 14601,
Center_Potion_B = 22542,
Berserk_Potion_B = 22543,
Awakening_Potion_B = 22544,
Speed_Up_Potion_B = 22545,
Slow_Down_Potion_B = 22546,
Sesame_Pastry_B = 22551,
Honey_Pastry_B = 22552,
Rainbow_Cake_B = 22553,
HALLOWEEN_G_BOX = 22669,
Bath_Foam_A = 100147,
Bath_Foam_B = 100148,
Bath_Foam_C = 100149,
Aroma_Oil = 100150,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Contents/Items/ItemInfo.h"
#include "Contents/Items/ItemId.h"
#include "Client/Session.h"
#include "Client/Input/InputCharset.h"
#include "File/File.h"
@ -543,10 +544,10 @@ bool IsNumericText(const char* text) {
// FUNCTION: fn_06604
bool ITEM_INFO::IsElementalStone() const {
switch (std::atoi(this->itemId.c_str())) {
case 994:
case 995:
case 996:
case 997:
case ITEMID_FLAME_HEART:
case ITEMID_MISTIC_FROZEN:
case ITEMID_ROUGH_WIND:
case ITEMID_GREAT_NATURE:
return true;
default:
return false;

View file

@ -1,4 +1,5 @@
#include "Client/Replay.h"
#include "Contents/Items/ItemType.h"
#include "Contents/Items/ItemInfo.h"
#include "Contents/Items/ItemNaming.h"
#include "Contents/Configuration/ServiceConfiguration.h"
@ -26,15 +27,15 @@ std::map<int, std::vector<const char*>> g_bookItemNames;
// FUNCTION: fn_06597
bool Equipment(const ITEM_INFO& item) {
switch (item.unknown_0000[0]) {
case 4:
case 5:
case 8:
case 9:
case 11:
case 12:
case 13:
case 14:
case 15:
case TYPE_ARMOR:
case TYPE_WEAPON:
case TYPE_BOW:
case TYPE_BOTHHAND:
case TYPE_ARMORTM:
case TYPE_ARMORTB:
case TYPE_ARMORMB:
case TYPE_ARMORTMB:
case TYPE_GUN:
case 21:
return true;
default:

View file

@ -0,0 +1,24 @@
#ifndef RAGNAROK_SOURCE_CONTENTS_ITEMS_ITEMTYPE_H
#define RAGNAROK_SOURCE_CONTENTS_ITEMS_ITEMTYPE_H
enum ITEMTYPE : int {
TYPE_HEAL = 0,
TYPE_SCHANGE = 1,
TYPE_SPECIAL = 2,
TYPE_EVENT = 3,
TYPE_ARMOR = 4,
TYPE_WEAPON = 5,
TYPE_BOW = 8,
TYPE_BOTHHAND = 9,
TYPE_ARROW = 10,
TYPE_ARMORTM = 11,
TYPE_ARMORTB = 12,
TYPE_ARMORMB = 13,
TYPE_ARMORTMB = 14,
TYPE_GUN = 15,
TYPE_AMMO = 16,
TYPE_THROWWEAPON = 17,
TYPE_CASH_POINT_ITEM = 18,
};
#endif

View file

@ -1,4 +1,5 @@
#include "Network/Packets/NoticeEnums.h"
#include "Contents/Items/ItemType.h"
#include "Contents/Combat/CombatTypes.h"
#include "Contents/Messenger/ClientMessenger.h"
#include "Utility/EncryptedName.h"
@ -1992,7 +1993,7 @@ int GetEquipLocationIndex(const int& mask) {
index = 3;
break;
case EQP_HAND_R:
case 0x22:
case (EQP_HAND_R | EQP_HAND_L):
index = 4;
break;
case EQP_GARMENT:
@ -2004,7 +2005,7 @@ int GetEquipLocationIndex(const int& mask) {
case EQP_SHOES:
index = 6;
break;
case 0x101:
case (EQP_HEAD_TOP | EQP_HEAD_LOW):
index = 1;
break;
case EQP_HEAD_TOP:
@ -2016,26 +2017,26 @@ int GetEquipLocationIndex(const int& mask) {
case EQP_HEAD_MID:
index = 11;
break;
case 0x201:
case (EQP_HEAD_MID | EQP_HEAD_LOW):
index = 1;
break;
case 0x300:
case (EQP_HEAD_TOP | EQP_HEAD_MID):
index = 10;
break;
case 0x301:
case (EQP_HEAD_TOP | EQP_HEAD_MID | EQP_HEAD_LOW):
index = 1;
break;
case EQP_COSTUME_HEAD_TOP:
case 0xC00:
case 0x1400:
case 0x1C00:
case (EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID):
case (EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_LOW):
case (EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW):
index = 20;
break;
case EQP_COSTUME_HEAD_LOW:
index = 22;
break;
case EQP_COSTUME_HEAD_MID:
case 0x1800:
case (EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW):
index = 21;
break;
case EQP_COSTUME_GARMENT:
@ -5690,15 +5691,15 @@ void CSession::ClearAllItems1784() {
void CSession::KeepEquipment() {
for (auto entry = this->m_inventoryItems.begin(); entry != this->m_inventoryItems.end();) {
switch (entry->unknown_0000[0]) {
case 4:
case 5:
case 8:
case 9:
case 11:
case 12:
case 13:
case 14:
case 15:
case TYPE_ARMOR:
case TYPE_WEAPON:
case TYPE_BOW:
case TYPE_BOTHHAND:
case TYPE_ARMORTM:
case TYPE_ARMORTB:
case TYPE_ARMORMB:
case TYPE_ARMORTMB:
case TYPE_GUN:
++entry;
break;
default:
@ -5723,15 +5724,15 @@ void CSession::ClearTradeItems() {
void CSession::RemoveEquipment() {
for (auto entry = this->m_inventoryItems.begin(); entry != this->m_inventoryItems.end();) {
switch (entry->unknown_0000[0]) {
case 4:
case 5:
case 8:
case 9:
case 11:
case 12:
case 13:
case 14:
case 15:
case TYPE_ARMOR:
case TYPE_WEAPON:
case TYPE_BOW:
case TYPE_BOTHHAND:
case TYPE_ARMORTM:
case TYPE_ARMORTB:
case TYPE_ARMORMB:
case TYPE_ARMORTMB:
case TYPE_GUN:
entry = this->m_inventoryItems.erase(entry);
break;
default:

View file

@ -1,4 +1,5 @@
#include "Contents/Messenger/MessengerMember.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/Mouse.h"
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Contents/MessageTable.h"
@ -530,12 +531,12 @@ void UIFriendOptionWnd::Paint() {
// FUNCTION: fn_07683
int UIFriendOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a) {
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(68);
break;
case 213:
case ID_CHECK:
if (this->option0Box == sender) {
g_session.m_autoOpenWhisperWindow = static_cast<int>(b);
} else if (this->option2Box == sender) {
@ -546,7 +547,7 @@ int UIFriendOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
break;
}
return 0;
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<FriendOptionWndInfo*>(a);
if (!this->saved->IsValid()) {
this->saved->Reset();
@ -1392,7 +1393,7 @@ void UIMessengerGroupWnd::UpdateGauges() {
// FUNCTION: fn_07718
int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 0x22:
case UM_SETINFO:
this->saved = reinterpret_cast<MessengerGroupWndInfo*>(a);
if (!this->saved->IsValid()) {
this->saved->Reset();
@ -1401,7 +1402,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
this->SendMsg(nullptr, 0xE, 7, this->saved->width, this->saved->height, 0);
this->Move(this->saved->x, this->saved->y);
return 0;
case 0x17: {
case UM_REFRESHITEM: {
this->members.clear();
for (int index = 0; index < 40; ++index) {
this->gauges[index]->Move(-100, -100);
@ -1515,7 +1516,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
this->LayoutButtons();
return 0;
}
case 0x31:
case UM_MAKEMENU:
this->menuItems.clear();
if (g_windowMgr.unknown_0210) {
g_windowMgr.CloseWindow(0x12);
@ -1565,7 +1566,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
);
}
return 0;
case 0x30: {
case UM_MENU_SELECTED: {
if (this->menuItems.begin() == this->menuItems.end()) {
return 0;
}
@ -1578,14 +1579,14 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
return 0;
}
switch (this->menuItems[a].value) {
case 0:
case 0x13:
case MENUID_EXPEL:
case MENUID_DELETE_WHISPER_NAME:
this->SendMsg(nullptr, 6, 0xEB, 0, 0, 0);
return 0;
case 3:
case MENUID_QUERYINFO:
this->SendMsg(nullptr, 6, 0xE9, 0, 0, 0);
return 0;
case 5:
case MENUID_INVITE_IN_PARTY:
if (this->selected != -1) {
MessengerMember target = this->MemberAtIndex(this->selected);
if (target.valid) {
@ -1593,16 +1594,16 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
}
return 0;
case 6:
case MENUID_SEND_MSG:
this->SendMsg(nullptr, 6, 0xE7, 0, 0, 0);
return 0;
case 7:
case MENUID_TALKONLYTWO:
this->SendMsg(nullptr, 6, 0xE8, 0, 0, 0);
return 0;
case 9:
case MENUID_LEAVE:
this->SendMsg(nullptr, 6, 0xEC, 0, 0, 0);
return 0;
case 0x14:
case MENUID_MAKE_WHISPER_WINDOW:
this->SendMsg(nullptr, 0x47, 0, 0, 0, 0);
return 0;
case 0x2B:
@ -1642,14 +1643,14 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
return 0;
}
case 6:
case UM_COMMAND:
switch (a) {
case 0xE7:
if (!g_session.m_lockMouse && this->selected != -1) {
MessengerMember member = this->MemberAtIndex(this->selected);
}
return 0;
case 0xE8:
case ID_TALK:
if (!g_session.m_lockMouse && this->selected != -1) {
MessengerMember member = this->MemberAtIndex(this->selected);
if (member.valid && !(member.name == g_session.DecodePlayerName())) {
@ -1666,7 +1667,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
}
return 0;
case 0xE9:
case ID_FRIEND_INFO:
if (!g_session.m_lockMouse && this->selected != -1) {
MessengerMember member = this->MemberAtIndex(this->selected);
if (member.valid) {
@ -1674,7 +1675,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
}
return 0;
case 0xEA:
case ID_PARTY_SETTING:
if (!g_session.m_lockMouse) {
if (g_windowMgr.unknown_042C) {
g_windowMgr.CloseWindow(0xD0);
@ -1703,7 +1704,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
}
return 0;
case 0xEB:
case ID_DELETE_FRIEND:
if (!g_session.m_lockMouse && this->selected != -1) {
MessengerMember member = this->MemberAtIndex(this->selected);
if (member.valid) {
@ -1719,10 +1720,10 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
}
return 0;
case 0xC9:
case ID_CLOSE:
g_windowMgr.CloseWindow(0x45);
return 0;
case 0xEC:
case ID_LEAVE:
if (!g_session.m_lockMouse && this->selected != -1) {
MessengerMember member = this->MemberAtIndex(this->selected);
if (member.valid && member.name == g_session.DecodePlayerName()) {
@ -1732,7 +1733,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
}
return 0;
case 0xD7: {
case ID_RADIOBTN: {
UIWindow* clicked = sender;
if (b) {
clicked = this->tabs[b - 1];
@ -1790,7 +1791,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
return 0;
}
case 0xCA:
case ID_MINI:
this->iconIndex = 1;
this->iconModeButtons[1]->Enable(1);
this->iconModeButtons[0]->Enable(0);
@ -1882,9 +1883,9 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
return 0;
}
return 0;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->scrollTop;
if (message == 9) {
this->scrollTop = previous - this->visibleRows + 1;
@ -1899,7 +1900,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
return this->scrollTop - previous;
}
case 0xE:
case UM_RESIZE:
if (a == 7) {
int width = static_cast<int>(b);
int height = static_cast<int>(c);

View file

@ -1,4 +1,5 @@
#include "Client/Session.h"
#include "Contents/Actors/PetEnums.h"
#include "Contents/MessageTable.h"
#include <cstdlib>
@ -9,27 +10,27 @@
// FUNCTION: fn_23805
const char* CSession::GetPetTalkActionName(int action) {
switch (action) {
case 0:
case PM_FEEDING:
return "feeding";
case 1:
case PM_HUNTING:
return "hunting";
case 2:
case PM_DANGER:
return "danger";
case 3:
case PM_DEAD:
return "dead";
case 4:
case PM_NORMAL:
return "stand";
case 10:
case PM_CONNENCT:
return "connect";
case 6:
case PM_LEVELUP:
return "levelup";
case 7:
case PM_PERFORMANCE1:
return "perfor_1";
case 8:
case PM_PERFORMANCE2:
return "perfor_2";
case 9:
case PM_PERFORMANCE3:
return "perfor_3";
case 5:
case PM_PERFORMANCE_S:
return "perfor_s";
default:
return "normal";
@ -55,16 +56,16 @@ void CSession::GetPetTalkText(int job, int hungerState, int action, char* text)
const char* hunger;
switch (hungerState) {
case 1:
case PET_HUNGRY:
hunger = "bit_hungry";
break;
case 2:
case PET_SATISFIED:
hunger = "noting";
break;
case 3:
case PET_ENOUGH:
hunger = "full";
break;
case 4:
case PET_FULL:
hunger = "so_full";
break;
default:

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CGameMode.h"
#include "Contents/Combat/CombatTypes.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/Actors/GameActor.h"
#include "Contents/Actors/RenderObject.h"
@ -350,25 +351,25 @@ void CSkillAction_SS_FOUR_CHARM::OnSkillEffect(int level, CGameActor* source, CG
EffectLists* effects;
switch (source->charmType) {
case 1:
case CHARM_TYPE_WATER:
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_ice_bottom"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_ice"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
break;
case 2:
case CHARM_TYPE_LAND:
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_earth_bottom"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_earth"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
break;
case 3:
case CHARM_TYPE_FIRE:
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_fire_bottom"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_fire"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
break;
case 4:
case CHARM_TYPE_WIND:
effects = g_effectMgr;
effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("four_charm_wind_bottom"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0);
effects = g_effectMgr;

View file

@ -1,4 +1,5 @@
#include "Contents/Sound/SoundMaker.h"
#include "Contents/Actors/ActorEnums.h"
#include "Contents/Jobs/JobId.h"
#include "Contents/Actors/ActorStateFlags.h"
@ -548,18 +549,18 @@ void CBlurPC::SendMsg(
) {
if (a == 0) {
switch (message) {
case 0:
case BM_RGB:
this->SetColor(180, b, d, f);
this->unknown_04FC = 0x8000000;
return;
case 1:
case BM_ALPHA:
this->render.color &= (b << 24) + 0xFFFFFF;
this->unknown_04FC = d << 24;
return;
case 2:
case BM_MOTIONY:
this->unknown_04F8 = *reinterpret_cast<const float*>(&b);
return;
case 3:
case BM_MOTION_FREEZE:
this->render.isMotionFreezed = 1;
return;
}
@ -609,18 +610,18 @@ void CHalluNPC::SendMsg(
) {
if (a == 0) {
switch (message) {
case 0:
case BM_RGB:
this->SetColor(180, b, d, f);
this->unknown_0444 = 0x8000000;
return;
case 1:
case BM_ALPHA:
this->render.color &= (b << 24) + 0xFFFFFF;
this->unknown_0444 = d << 24;
return;
case 2:
case BM_MOTIONY:
this->unknown_0440 = *reinterpret_cast<const float*>(&b);
return;
case 3:
case BM_MOTION_FREEZE:
this->render.isMotionFreezed = 1;
return;
}
@ -636,18 +637,18 @@ void CHalluPC2::SendMsg(
) {
if (a == 0) {
switch (message) {
case 0:
case BM_RGB:
this->SetColor(180, 255, 55, 55);
this->unknown_04FC = 0x8000000;
return;
case 1:
case BM_ALPHA:
this->render.color &= (b << 24) + 0xFFFFFF;
this->unknown_04FC = d << 24;
return;
case 2:
case BM_MOTIONY:
this->unknown_04F8 = *reinterpret_cast<const float*>(&b);
return;
case 3:
case BM_MOTION_FREEZE:
this->render.isMotionFreezed = 1;
return;
}
@ -663,18 +664,18 @@ void CHalluPC::SendMsg(
) {
if (a == 0) {
switch (message) {
case 0:
case BM_RGB:
this->SetColor(180, b, d, f);
this->unknown_04FC = 0x8000000;
return;
case 1:
case BM_ALPHA:
this->render.color &= (b << 24) + 0xFFFFFF;
this->unknown_04FC = d << 24;
return;
case 2:
case BM_MOTIONY:
this->unknown_04F8 = *reinterpret_cast<const float*>(&b);
return;
case 3:
case BM_MOTION_FREEZE:
this->render.isMotionFreezed = 1;
return;
}
@ -1642,7 +1643,7 @@ void CNpc::SetState(int state, int) {
}
switch (state) {
case 0:
case ST_STAND:
this->render.isLieOnGround = false;
this->render.unknown_00A4Bytes[1] = 1;
this->SetAction(0, 4, 0);
@ -1693,7 +1694,7 @@ void CNpc::SetState(int state, int) {
this->RegisterPos();
}
break;
case 1:
case ST_MOVE:
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
}
@ -1704,7 +1705,7 @@ void CNpc::SetState(int state, int) {
}
this->UnRegisterPos();
break;
case 2:
case ST_ATTACK:
if (this->bodyState != 1 && this->bodyState != 2) {
this->render.isMotionFreezed = false;
}
@ -1725,7 +1726,7 @@ void CNpc::SetState(int state, int) {
this->RegisterPos();
this->LaunchAttackProjectile(this->hitTargetAid, this->render.speed * this->unknown_0378);
break;
case 3:
case ST_DEAD:
this->render.unknown_00C8 = 0;
this->render.unknown_00D8 = 0;
this->render.unknown_00DC = 0;
@ -1745,7 +1746,7 @@ void CNpc::SetState(int state, int) {
this->UnRegisterPos();
}
break;
case 4:
case ST_DAMAGE:
if (this->render.unknown_00C8 != 0 || this->render.unknown_00D8 != 0 || this->render.unknown_00DC != 0) {
return;
}
@ -1760,7 +1761,7 @@ void CNpc::SetState(int state, int) {
this->SetAction(24, 4, 1);
this->RegisterPos();
break;
case 7:
case ST_SKILL:
switch (this->unknown_0314) {
case 8:
case 10:
@ -1776,7 +1777,7 @@ void CNpc::SetState(int state, int) {
this->SetAction(96, 6, 1);
}
break;
case 10:
case ST_SLEEP:
if (this->bodyState == 2) {
this->SendMsg(nullptr, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/GameModeEnums.h"
#include "Client/Session.h"
#include "Contents/Actors/EffectActors.h"
#include "Resource/ResourceMgr.h"
@ -958,120 +959,120 @@ CMsgEffect* CGameMode::SpawnMsgEffect(int effectId, const vector3d* position, st
int animation = 0;
switch (effectId) {
case 0:
case MAKETYPE_MVP_EFFECT:
names[0] = "이팩트\\mvp.spr";
names[1] = "이팩트\\mvp.act";
type = 2;
break;
case 1:
case MAKETYPE_CART_EFFECT:
names[0] = "이팩트\\손수레.spr";
names[1] = "이팩트\\손수레.act";
type = 3;
break;
case 2:
case MAKETYPE_PK_EFFECT:
names[0] = "이팩트\\emotion.spr";
names[1] = "이팩트\\emotion.act";
animation = 8;
type = 4;
break;
case 3:
case MAKETYPE_ICE_EFFECT:
names[0] = "이팩트\\얼음땡.spr";
names[1] = "이팩트\\얼음땡.act";
type = 5;
break;
case 4:
case MAKETYPE_ICEBREAK_EFFECT:
names[0] = "이팩트\\얼음땡.spr";
names[1] = "이팩트\\얼음땡.act";
animation = 1;
type = 6;
break;
case 5:
case MAKETYPE_SMOKE_EFFECT:
names[0] = "이팩트\\smoke.spr";
names[1] = "이팩트\\smoke.act";
type = 6;
break;
case 6:
case MAKETYPE_CURSE_EFFECT:
names[0] = "이팩트\\Status-curse.spr";
names[1] = "이팩트\\Status-curse.act";
type = 7;
break;
case 7:
case MAKETYPE_SLEEP_EFFECT:
names[0] = "이팩트\\Status-sleep.spr";
names[1] = "이팩트\\Status-sleep.act";
type = 8;
break;
case 8:
case MAKETYPE_STUN_EFFECT:
names[0] = "이팩트\\Status-stun.spr";
names[1] = "이팩트\\Status-stun.act";
type = 9;
break;
case 9:
case MAKETYPE_SILENCE_EFFECT:
names[0] = "이팩트\\emotion.spr";
names[1] = "이팩트\\emotion.act";
animation = 10;
type = 10;
break;
case 10:
case MAKETYPE_ANGELUS_EFFECT:
names[0] = FormatOwnedString("%s.spr", g_session.Text80EC());
names[1] = FormatOwnedString("%s.act", g_session.Text80EC());
animation = 1;
type = 11;
break;
case 11:
case MAKETYPE_CRUSIS_EFFECT:
names[0] = FormatOwnedString("%s.spr", g_session.Text80EC());
names[1] = FormatOwnedString("%s.act", g_session.Text80EC());
animation = 2;
type = 12;
break;
case 12:
case MAKETYPE_CRITICAL_EFFECT:
names[0] = FormatOwnedString("%s.spr", g_session.Text80EC());
names[1] = FormatOwnedString("%s.act", g_session.Text80EC());
animation = 2;
type = 15;
break;
case 13:
case MAKETYPE_LUCKY_EFFECT:
names[0] = FormatOwnedString("%s.spr", g_session.Text80EC());
names[1] = FormatOwnedString("%s.act", g_session.Text80EC());
animation = 3;
type = 17;
break;
case 14:
case MAKETYPE_BIRD_EFFECT:
names[0] = "이팩트\\매.spr";
names[1] = "이팩트\\매.act";
type = 18;
break;
case 16:
case MAKETYPE_CART_EFFECT2:
names[0] = "이팩트\\손수레1.spr";
names[1] = "이팩트\\손수레1.act";
type = 3;
break;
case 17:
case MAKETYPE_CART_EFFECT3:
names[0] = "이팩트\\손수레2.spr";
names[1] = "이팩트\\손수레2.act";
type = 3;
break;
case 18:
case MAKETYPE_CART_EFFECT4:
names[0] = "이팩트\\손수레3.spr";
names[1] = "이팩트\\손수레3.act";
type = 3;
break;
case 19:
case MAKETYPE_CART_EFFECT5:
names[0] = "이팩트\\손수레4.spr";
names[1] = "이팩트\\손수레4.act";
type = 3;
break;
case 20:
case MAKETYPE_GUARD_EFFECT:
names[0] = FormatOwnedString("%s.spr", g_session.Text80EC());
names[1] = FormatOwnedString("%s.act", g_session.Text80EC());
animation = 1;
type = 24;
break;
case 21:
case MAKETYPE_CART_EFFECT6:
names[0] = "이팩트\\슈노손수레.spr";
names[1] = "이팩트\\슈노손수레.act";
type = 3;
break;
case 22:
case MAKETYPE_BLUE_EFFECT:
names[0] = FormatOwnedString("%s.spr", g_session.Text8104());
if (g_session.m_damageSkinIndex == 0) {
names[1] = "이팩트\\msg.act";
@ -1081,63 +1082,63 @@ CMsgEffect* CGameMode::SpawnMsgEffect(int effectId, const vector3d* position, st
animation = 2;
type = 25;
break;
case 23:
case MAKETYPE_BIRD_EFFECT2:
names[0] = "이팩트\\매2.spr";
names[1] = "이팩트\\매2.act";
type = 18;
break;
case 24:
case MAKETYPE_BIRD_EFFECT3:
names[0] = "이팩트\\매.spr";
names[1] = "이팩트\\베이비매.act";
type = 18;
break;
case 25:
case MAKETYPE_CART_EFFECT11:
names[0] = "이팩트\\손수레.spr";
names[1] = "이팩트\\베이비손수레.act";
type = 3;
break;
case 26:
case MAKETYPE_CART_EFFECT12:
names[0] = "이팩트\\손수레1.spr";
names[1] = "이팩트\\베이비손수레1.act";
type = 3;
break;
case 27:
case MAKETYPE_CART_EFFECT13:
names[0] = "이팩트\\손수레2.spr";
names[1] = "이팩트\\베이비손수레2.act";
type = 3;
break;
case 28:
case MAKETYPE_CART_EFFECT14:
names[0] = "이팩트\\손수레3.spr";
names[1] = "이팩트\\베이비손수레3.act";
type = 3;
break;
case 29:
case MAKETYPE_CART_EFFECT15:
names[0] = "이팩트\\손수레4.spr";
names[1] = "이팩트\\베이비손수레4.act";
type = 3;
break;
case 30:
case MAKETYPE_CART_EFFECT16:
names[0] = "이팩트\\슈노손수레.spr";
names[1] = "이팩트\\베이비슈노손수레.act";
type = 3;
break;
case 31:
case MAKETYPE_CURSOR_EFFECT:
names[0] = "cursors.spr";
names[1] = "cursors.act";
animation = 10;
type = 26;
break;
case 32:
case MAKETYPE_BIRD_EFFECT4:
names[0] = "몬스터\\demon_pungus.spr";
names[1] = "몬스터\\demon_pungus.act";
type = 18;
break;
case 33:
case MAKETYPE_BIRD_EFFECT5:
names[0] = "몬스터\\explosion.spr";
names[1] = "몬스터\\explosion.act";
type = 18;
break;
case 34:
case MAKETYPE_BIRD_EFFECT6:
names[0] = "몬스터\\lude.spr";
names[1] = "몬스터\\lude.act";
type = 18;

View file

@ -9,8 +9,6 @@ enum e_enchantgrade_result : int {
ENCHANTGRADE_UPGRADE_PROTECTED = 4,
};
#endif
enum pincode_state : int {
PINCODE_OK = 0,
PINCODE_ASK = 1,
@ -22,3 +20,30 @@ enum pincode_state : int {
PINCODE_PASSED = 7,
PINCODE_WRONG = 8,
};
enum LOGINREFUSEREASON : int {
REFUSE_INVALID_ID = 0,
REFUSE_INVALID_PASSWD = 1,
REFUSE_ID_EXPIRED = 2,
REFUSE_NOT_CONFIRMED = 4,
REFUSE_INVALID_VERSION = 5,
REFUSE_BLOCK_TEMPORARY = 6,
REFUSE_NONSAKRAY_ID_BLOCKED = 8,
REFUSE_BAN_BY_DBA = 9,
REFUSE_EMAIL_NOT_CONFIRMED = 10,
REFUSE_BAN_BY_GM = 11,
REFUSE_TEMP_BAN_FOR_DBWORK = 12,
REFUSE_SELF_LOCK = 13,
REFUSE_NOT_PERMITTED_GROUP = 14,
REFUSE_WAIT_FOR_SAKRAY_ACTIVE = 15,
REFUSE_DELETED_ACCOUNT = 99,
REFUSE_ALREADY_CONNECT = 100,
REFUSE_TEMP_BAN_HACKING_INVESTIGATION = 101,
REFUSE_TEMP_BAN_BUG_INVESTIGATION = 102,
REFUSE_TEMP_BAN_DELETING_CHAR = 103,
REFUSE_TEMP_BAN_DELETING_SPOUSE_CHAR = 104,
REFUSE_USER_PHONE_BLOCK = 105,
ACCEPT_LOGIN_USER_PHONE_BLOCK = 106,
};
#endif

View file

@ -74,8 +74,6 @@ enum _sp : int {
SP_UCRT = 252,
};
#endif
enum mail_inbox_type : int {
MAIL_INBOX_NORMAL = 0,
MAIL_INBOX_ACCOUNT = 1,
@ -294,6 +292,10 @@ enum e_refuse_enter_room : int {
ENTERROOM_FULL = 0,
ENTERROOM_WRONG_PASSWORD = 1,
ENTERROOM_KICKED = 2,
REFUSETYPE_ZENY = 4,
REFUSETYPE_LOWLEVEL = 5,
REFUSETYPE_HIGHLEVEL = 6,
REFUSETYPE_JOB = 7,
};
enum e_ack_remember_warppoint_result : int {
@ -342,3 +344,287 @@ enum e_searchstore_failure : int {
SSI_FAILED_LIMIT_SEARCH_TIME = 3,
SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE = 4,
};
enum PICKUPRESULT : int {
PICKUP_SUCCEED = 0,
PICKUP_FAILED = 1,
PICKUP_OVERWEIGHT = 2,
RECEIVE_ITEM = 3,
PICKUP_OVERCOUNT = 4,
PICKUP_OVERCOUNT_ONEITEM = 5,
PICKUP_REFUSED_TIME = 6,
};
enum BANREASON : int {
BAN_UNFAIR = 0,
BAN_SERVER_SHUTDOWN = 1,
BAN_ANOTHER_LOGIN = 2,
BAN_DETECTED_SPEEDHACK = 3,
BAN_PC_OVERFLOW = 4,
BAN_UNDER_AGE = 5,
BAN_NOT_SETTLED = 6,
BAN_ACCOUNT_BUSY = 7,
BAN_INFORMATION_REMAINED = 8,
BAN_IP_OVERFLOW = 9,
BAN_PAY_OUT = 10,
BAN_PAY_SUSPEND = 11,
BAN_PAY_CHANGE = 12,
BAN_PAY_WRONGIP = 13,
BAN_PAY_PNGAMEROOM = 14,
BAN_OP_FORCE = 15,
BAN_JAPAN_REFUSE1 = 16,
BAN_JAPAN_REFUSE2 = 17,
BAN_INFORMATION_REMAINED_ANOTHER_ACCOUNT = 18,
BAN_PC_IP_UNFAIR = 100,
BAN_PC_IP_COUNT_ALL = 101,
BAN_PC_IP_COUNT = 102,
BAN_GRAVITY_MEM_AGREE = 103,
BAN_GAME_MEM_AGREE = 104,
BAN_HAN_VALID = 105,
};
enum BASICSKILLTYPE : int {
ZCSK_ITEMEXCHANGE = 0,
ZCSK_EMOTION = 1,
ZCSK_SIT = 2,
ZCSK_CHAT = 3,
ZCSK_PARTY = 4,
ZCSK_SHOUT = 5,
ZCSK_PK = 6,
ZCSK_MANNERPOINT = 7,
ZCSK_JOINPARTY = 8,
};
enum PACKETOBJECTTYPE : int {
PC_TYPE = 0,
NPC_MOB_TYPE = 5,
NPC_HO_TYPE = 8,
NPC_MERSOL_TYPE = 9,
NPC_ELEMENTAL_TYPE = 10,
NPC_ABR_TYPE = 13,
NPC_BIONIC_TYPE = 14,
};
enum BOSS_INFO_TYPE : int {
BOSS_INFO_NOT = 0,
BOSS_INFO_ALIVE = 1,
BOSS_INFO_ALIVE_WITHMSG = 2,
BOSS_INFO_DEAD = 3,
};
enum SELLRESULT : int {
SELL_SUCCEED = 0,
SELL_FAIL = 1,
};
enum ROOMEXITTYPE : int {
ROOMEXITTYPE_EXIT = 0,
ROOMEXITTYPE_EXPEL = 1,
};
enum EXCHANGECONCLUDETYPE : int {
EXI_CONCLUDE_ME = 0,
EXI_CONCLUDE_OTHER = 1,
};
enum EXCHANGERESULT : int {
EXITEM_EXCHANGE_SUCCEED = 0,
EXITEM_EXCHANGE_FAILED = 1,
};
enum GROUPMAKERESULT : int {
GROUP_MAKE_SUCCEED = 0,
GROUP_MAKE_FAILED_SAMENAME = 1,
GROUP_MAKE_FAILED_ALEADY_GROUP_MEMBER = 2,
};
enum MANNERRESULT : int {
MP_SUCCESS = 0,
MP_SUCCESS_BY_ADMIN = 3,
MP_BYSELF = 4,
};
enum GUILDDISBANDRESULT : int {
DISRESULT_SUCCESS = 0,
DISRESULT_INVALIDKEY = 1,
DISRESULT_MEMBEREXIST = 2,
};
enum GUILD_MAKE_RESULT : int {
GM_SUCCESS = 0,
GM_ALREADY_MEMBER = 1,
GM_GUILD_EXIST = 2,
GM_NONE_ITEM = 3,
};
enum GUILDJOINRESULT : int {
REQJOINGUILD_ALREADY_OTHERGUILDM = 0,
REQJOINGUILD_REJECT = 1,
REQJOINGUILD_ACCEPT = 2,
REQJOINGUILD_OVERSIZE = 3,
};
enum GUILDALLYRESULT : int {
REQALLYGUILD_ALREADY_ALLIED = 0,
REQALLYGUILD_REJECT = 1,
REQALLYGUILD_ACCEPT = 2,
REQALLYGUILD_OVERSIZE = 3,
REQMYGUILD_OVERSIZE = 4,
};
enum ITEMIDENTIFYRESULT : int {
ITEMIDENTIFY_SUCCESS = 0,
ITEMIDENTIFY_FAIL = 1,
};
enum GUILDHOSTILERESULT : int {
RESULT_HOSTILE_SUCCESS = 0,
RESULT_HOSTILE_OVERSIZE = 1,
RESULT_HOSTILE_ALREADY_HOSTILE = 2,
};
enum MAPINFORESULT : int {
TELEPORT_IMPOSSIBLE_AREA = 0,
IMPOSSIBLE_AREA_SKILL = 2,
IMPOSSIBLE_AREA_USEITEM = 3,
};
enum DISCONNECTRESULT : int {
DISCONNECTABLE_STATE = 0,
NOTDISCONNECTABLE_STATE = 1,
};
enum ITEMREPAIRRESULT : int {
ITEMREPAIR_SUCCESS = 0,
ITEMREPAIR_FAIL = 1,
};
enum WEAPONREFINERESULT : int {
MSG_WEAPONREFINE_SUCCESS = 0,
MSG_WEAPONREFINE_FAIL = 1,
MSG_WEAPONREFINE_FAIL_LEVEL = 2,
MSG_WEAPONREFINE_FAIL_ITEM = 3,
};
enum GROUPMEMBERDELETETYPE : int {
GROUPMEMBER_DELETE_LEAVE = 0,
GROUPMEMBER_DELETE_EXPEL = 1,
};
enum HOMUNSTATECHANGE : int {
HO_PRE_INIT = 0,
HO_RELATIONSHIP_CHANGED = 1,
HO_FULLNESS_CHANGED = 2,
HO_ACCESSARY_CHANGED = 3,
};
enum WHISPER_TYPE : int {
WT_EXCLUDE_WHISPER = 0,
WT_INCLUDE_WHISPER = 1,
};
enum WHISPER_SETTING_RESULT : int {
WHISPER_SETTING_SUCCEED = 0,
WHIPSER_SETTING_FAILED = 1,
WHISPER_SETTING_FAILED_OVERCOUNT = 2,
};
enum LEGACYEQUIPRESULT : int {
ACK_REQ_EQUIP_FAILURE = 0,
ACK_REQ_EQUIP_SUCCESS = 1,
ACK_REQ_EQUIP_FAILURE_LEVEL = 2,
};
enum clif_equipitemack_flag : int {
ITEM_EQUIP_ACK_OK = 0,
ITEM_EQUIP_ACK_FAILLEVEL = 1,
ITEM_EQUIP_ACK_FAIL = 2,
};
enum e_additem_result : int {
ADDITEM_STACKLIMIT = 7,
};
enum e_purchase_result : int {
PURCHASE_SUCCEED = 0,
PURCHASE_FAIL_MONEY = 1,
PURCHASE_FAIL_WEIGHT = 2,
PURCHASE_FAIL_COUNT = 3,
PURCHASE_FAIL_EACHITEM_COUNT = 9,
};
enum FRIENDADDRESULT : int {
FRIEND_ADD_SUCCEED = 0,
FRIEND_ADD_FALSE = 1,
FRIEND_ADD_ME_OVERSIZE = 2,
FRIEND_ADD_OTHER_OVERSIZE = 3,
};
enum PCSTATE : int {
PCSTATE_STAND = 0,
PCSTATE_DEAD = 1,
PCSTATE_SIT = 2,
};
enum SOUND_ACT : int {
SOUND_ACT_PLAY = 0,
SOUND_ACT_REPEAT = 1,
SOUNT_ACT_STOP = 2,
};
enum EXP_SHARE : int {
EXP_NOTSHARED = 0,
EXP_SHARED = 1,
EXP_CHANGE_IMPOSSIBLE = 2,
};
enum e_CASHSHOP_ACK : int {
ERROR_TYPE_NONE = 0,
ERROR_TYPE_NPC = 1,
ERROR_TYPE_SYSTEM = 2,
ERROR_TYPE_INVENTORY_WEIGHT = 3,
ERROR_TYPE_EXCHANGE = 4,
ERROR_TYPE_ITEM_ID = 5,
ERROR_TYPE_MONEY = 6,
ERROR_TYPE_AMOUNT = 7,
};
enum out_ui_type : int {
OUT_UI_TIP = 5,
OUT_UI_QUEST = 6,
OUT_UI_ATTENDANCE = 7,
OUT_UI_ENCHANTGRADE = 8,
};
enum ITEMCOMPOSITION_RESULT : int {
ITEMCOMPOSITON_SUCCESS = 0,
ITEMCOMPOSITION_FAILURE = 1,
};
enum NOTIFYEFFECT : int {
LEVELUP_EFFECT = 0,
JOBLEVELUP_EFFECT = 1,
REFINING_FAIL_EFFECT = 2,
REFINING_SUCCESS_EFFECT = 3,
GAME_OVER_EFFECT = 4,
MAKEITEM_AM_SUCCESS_EFFECT = 5,
MAKEITEM_AM_FAIL_EFFECT = 6,
LEVELUP_EFFECT2 = 7,
JOBLEVELUP_EFFECT2 = 8,
LEVELUP_EFFECT3 = 9,
};
enum e_bg_queue_apply_ack : int {
BG_APPLY_ACCEPT = 1,
BG_APPLY_QUEUE_FINISHED = 2,
BG_APPLY_INVALID_NAME = 3,
BG_APPLY_INVALID_APP = 4,
BG_APPLY_PLAYER_COUNT = 5,
BG_APPLY_PLAYER_LEVEL = 6,
BG_APPLY_DUPLICATE = 7,
BG_APPLY_RECONNECT = 8,
BG_APPLY_PARTYGUILD_LEADER = 9,
BG_APPLY_PLAYER_CLASS = 10,
};
#endif

View file

@ -896,6 +896,189 @@ enum PacketId : std::int16_t {
ID_HC_ACK_CHANGE_CHARACTER_SLOT = 0xb70,
ID_HC_ACK_CHARINFO_PER_PAGE = 0xb72,
ID_ZC_REPUTE_OPEN = 0xb8e,
ID_AC_ACCEPT_LOGIN_V1 = 0x69,
ID_AC_REFUSE_LOGIN_V1 = 0x6a,
ID_HC_ACCEPT_MAKECHAR_V1 = 0x6d,
ID_HC_NOTIFY_ZONESVR_V1 = 0x71,
ID_ZC_ACCEPT_ENTER_V1 = 0x73,
ID_ZC_NOTIFY_ACT_008a = 0x8a,
ID_ZC_NPCACK_SERVERMOVE_0092 = 0x92,
ID_ZC_ACK_WHISPER_0098 = 0x98,
ID_ZC_ITEM_FALL_ENTRY = 0x9e,
ID_ZC_ITEM_PICKUP_ACK_00a0 = 0xa0,
ID_ZC_USE_ITEM_ACK = 0xa8,
ID_ZC_REQ_WEAR_EQUIP_ACK_00aa = 0xaa,
ID_ZC_REQ_TAKEOFF_EQUIP_ACK_00ac = 0xac,
ID_ZC_SPRITE_CHANGE = 0xc3,
ID_ZC_PC_PURCHASE_ITEMLIST_00c6 = 0xc6,
ID_ZC_PC_SELL_RESULT = 0xcb,
ID_ZC_ACK_DISCONNECT_CHARACTER = 0xcd,
ID_ZC_REQ_EXCHANGE_ITEM_00e5 = 0xe5,
ID_ZC_ACK_EXCHANGE_ITEM_00e7 = 0xe7,
ID_ZC_GROUP_LIST = 0xfb,
ID_ZC_ACK_REQ_JOIN_GROUP = 0xfd,
ID_ZC_REQ_JOIN_GROUP = 0xfe,
ID_ZC_GROUPINFO_CHANGE = 0x101,
ID_ZC_ADD_MEMBER_TO_GROUP = 0x104,
ID_ZC_NOTIFY_HP_TO_GROUPM_0106 = 0x106,
ID_ZC_NOTIFY_SKILL_0114 = 0x114,
ID_ZC_STATE_CHANGE_0119 = 0x119,
ID_ZC_USE_SKILL_011a = 0x11a,
ID_ZC_WARPLIST_011c = 0x11c,
ID_ZC_SKILL_ENTRY = 0x11f,
ID_ZC_ADD_ITEM_TO_CART_0124 = 0x124,
ID_ZC_PC_PURCHASE_ITEMLIST_FROMMC_0133 = 0x133,
ID_ZC_DELETEITEM_FROM_MCSTORE_0137 = 0x137,
ID_ZC_RECOVERY_013d = 0x13d,
ID_ZC_USESKILL_ACK_013e = 0x13e,
ID_ZC_SHOW_IMAGE_0145 = 0x145,
ID_ZC_ACK_GIVE_MANNER_POINT = 0x14a,
ID_ZC_GUILD_INFO_0150 = 0x150,
ID_ZC_GUILD_EMBLEM_IMG_0152 = 0x152,
ID_ZC_MEMBERMGR_INFO_0154 = 0x154,
ID_ZC_ACK_LEAVE_GUILD = 0x15a,
ID_ZC_BAN_LIST_0163 = 0x163,
ID_ZC_UPDATE_GDID_016c = 0x16c,
ID_ZC_UPDATE_CHARSTAT_016d = 0x16d,
ID_ZC_ITEMIDENTIFY_LIST = 0x177,
ID_ZC_ITEMCOMPOSITION_LIST = 0x17b,
ID_ZC_ADD_RELATED_GUILD = 0x185,
ID_ZC_ACK_REQ_DISCONNECT = 0x18b,
ID_ZC_ACK_REQNAME_BYGID_0194 = 0x194,
ID_ZC_ACK_REQNAMEALL_0195 = 0x195,
ID_ZC_NOTIFY_MAPPROPERTY = 0x199,
ID_ZC_NOTIFY_RANKING = 0x19a,
ID_ZC_PETEGG_LIST = 0x1a6,
ID_ZC_CHANGE_GUILD_01b4 = 0x1b4,
ID_ZC_GUILD_INFO2 = 0x1b6,
ID_ZC_ADD_ITEM_TO_STORE2 = 0x1c4,
ID_ZC_ADD_ITEM_TO_CART2 = 0x1c5,
ID_ZC_USE_ITEM_ACK2 = 0x1c8,
ID_ZC_AUTOSPELLLIST_01cd = 0x1cd,
ID_ZC_DEVOTIONLIST = 0x1cf,
ID_ZC_SPRITE_CHANGE2 = 0x1d7,
ID_ZC_ACK_ACCOUNTNAME = 0x1e0,
ID_ZC_REQ_COUPLE = 0x1e2,
ID_ZC_ADD_MEMBER_TO_GROUP2 = 0x1e9,
ID_ZC_REQ_BABY = 0x1f6,
ID_ZC_REPAIRITEMLIST_01fc = 0x1fc,
ID_ZC_REQ_ADD_FRIENDS = 0x207,
ID_ZC_ADD_FRIENDS_LIST = 0x209,
ID_ZC_STARSKILL = 0x20e,
ID_ZC_ACK_STATUS_GM = 0x214,
ID_ZC_BABYMSG = 0x216,
ID_ZC_PROPERTY_HOMUN_022e = 0x22e,
ID_ZC_STARPLACE = 0x253,
ID_ZC_NOTIFY_EFFECT3_0284 = 0x284,
ID_ZC_PC_CASH_POINT_UPDATE = 0x289,
ID_HC_ACK_CHANGE_CHARNAME_V1 = 0x290,
ID_ZC_READ_BOOK = 0x294,
ID_ZC_ITEM_PICKUP_ACK2 = 0x29a,
ID_ZC_MER_INIT = 0x29b,
ID_ZC_MER_SKILLINFO_LIST = 0x29d,
ID_ZC_MER_PAR_CHANGE = 0x2a2,
ID_ZC_DEL_QUEST = 0x2b4,
ID_ZC_ACTIVE_QUEST = 0x2b7,
ID_ZC_ITEM_PICKUP_PARTY_02b8 = 0x2b8,
ID_ZC_NPC_CHAT = 0x2c1,
ID_ZC_ITEM_PICKUP_ACK3 = 0x2d4,
ID_ZC_EQUIPWIN_MICROSCOPE_02d7 = 0x2d7,
ID_ZC_CONFIG = 0x2d9,
ID_ZC_BATTLEFIELD_NOTIFY_CAMPINFO = 0x2dd,
ID_ZC_BATTLEFIELD_NOTIFY_POINT = 0x2de,
ID_ZC_BATTLEFIELD_NOTIFY_POSITION = 0x2df,
ID_ZC_BATTLEFIELD_NOTIFY_HP_02e0 = 0x2e0,
ID_ZC_NOTIFY_ACT2 = 0x2e1,
ID_ZC_NOTIFY_FONT = 0x2ef,
ID_ZC_PROGRESS = 0x2f0,
ID_ZC_QUEST_NOTIFY_EFFECT = 0x446,
ID_ZC_REQ_GROUPINFO_CHANGE_V2 = 0x7d8,
ID_ZC_HO_PAR_CHANGE_07db = 0x7db,
ID_ZC_USESKILL_ACK2 = 0x7fb,
ID_ZC_PLAY_NPC_BGM_07fe = 0x7fe,
ID_ZC_PC_PURCHASE_ITEMLIST_FROMMC_0800 = 0x800,
ID_ZC_PARTY_BOOKING_ACK_REGISTER = 0x803,
ID_ZC_PARTY_BOOKING_ACK_SEARCH = 0x805,
ID_ZC_PARTY_BOOKING_ACK_DELETE = 0x807,
ID_ZC_PARTY_BOOKING_NOTIFY_INSERT = 0x809,
ID_ZC_PARTY_BOOKING_NOTIFY_UPDATE = 0x80a,
ID_ZC_PARTY_BOOKING_NOTIFY_DELETE = 0x80b,
ID_ZC_ADD_EXCHANGE_ITEM2 = 0x80f,
ID_ZC_OPEN_BUYING_STORE = 0x810,
ID_ZC_FAILED_OPEN_BUYING_STORE_TO_BUYER = 0x812,
ID_ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER = 0x81a,
ID_ZC_UPDATE_ITEM_FROM_BUYING_STORE = 0x81b,
ID_ZC_ITEM_DELETE_BUYING_STORE = 0x81c,
ID_ZC_SEARCH_STORE_INFO_ACK_0836 = 0x836,
ID_ZC_ACK_BAN_GUILD_SSO = 0x839,
ID_ZC_SE_CASHSHOP_OPEN_0845 = 0x845,
ID_ZC_ITEM_FALL_ENTRY4 = 0x84b,
ID_ZC_EQUIPWIN_MICROSCOPE_0859 = 0x859,
ID_ZC_SKILL_ENTRY3 = 0x8c7,
ID_ZC_PERSONAL_INFOMATION_08cb = 0x8cb,
ID_ZC_REQ_WEAR_EQUIP_ACK2 = 0x8d0,
ID_ZC_REQ_TAKEOFF_EQUIP_ACK2 = 0x8d1,
ID_ZC_FASTMOVE = 0x8d2,
ID_HC_ACK_CHANGE_CHARACTER_SLOT_V1 = 0x8d5,
ID_ZC_EFST_SET_ENTER_08ff = 0x8ff,
ID_ZC_EQUIPWIN_MICROSCOPE_0906 = 0x906,
ID_ZC_NOTIFY_NEWENTRY7 = 0x90f,
ID_ZC_NOTIFY_MOVEENTRY8 = 0x914,
ID_ZC_NOTIFY_STANDENTRY9 = 0x915,
ID_ZC_SELECTCART = 0x97f,
ID_ZC_MSG_STATE_CHANGE3 = 0x983,
ID_ZC_ITEM_PICKUP_ACK_V5 = 0x990,
ID_ZC_EQUIPWIN_MICROSCOPE_0997 = 0x997,
ID_HC_ACK_CHARINFO_PER_PAGE_V1 = 0x99d,
ID_ZC_SKILL_ENTRY4 = 0x99f,
ID_ZC_SKILL_ENTRY5 = 0x9ca,
ID_ZC_NPC_MARKET_OPEN_09d5 = 0x9d5,
ID_ZC_NOTIFY_MOVEENTRY10 = 0x9db,
ID_ZC_NOTIFY_NEWENTRY10 = 0x9dc,
ID_ZC_NOTIFY_STANDENTRY10 = 0x9dd,
ID_ZC_UPDATE_ITEM_FROM_BUYING_STORE2 = 0x9e6,
ID_ZC_ACK_READ_MAIL = 0x9eb,
ID_ZC_ALL_QUEST_LIST3 = 0x9f8,
ID_ZC_ADD_QUEST_EX = 0x9f9,
ID_ZC_UPDATE_MISSION_HUNT_EX = 0x9fa,
ID_ZC_PET_EVOLUTION_RESULT = 0x9fc,
ID_ZC_NOTIFY_MOVEENTRY11 = 0x9fd,
ID_ZC_NOTIFY_NEWENTRY11 = 0x9fe,
ID_ZC_NOTIFY_STANDENTRY11 = 0x9ff,
ID_ZC_ACK_ADD_ITEM_TO_MAIL = 0xa05,
ID_ZC_ADD_EXCHANGE_ITEM3 = 0xa09,
ID_ZC_ADD_ITEM_TO_STORE3 = 0xa0a,
ID_ZC_ADD_ITEM_TO_CART3 = 0xa0b,
ID_ZC_ITEM_PICKUP_ACK_V6 = 0xa0c,
ID_ZC_ACK_OPEN_ROULETTE = 0xa1a,
ID_ZC_SE_CASHSHOP_OPEN_0a2b = 0xa2b,
ID_ZC_EQUIPWIN_MICROSCOPE_0a2d = 0xa2d,
ID_ZC_ACK_CHANGE_TITLE = 0xa2f,
ID_ZC_ITEM_PICKUP_ACK_V7 = 0xa37,
ID_ZC_UI_OPEN_0a38 = 0xa38,
ID_ZC_ADD_MEMBER_TO_GROUP3 = 0xa43,
ID_ZC_ACK_MAIL_LIST2 = 0xa7d,
ID_ZC_ACK_BAN_GUILD_DELNAME = 0xa82,
ID_ZC_ACK_LEAVE_GUILD_DELNAME = 0xa83,
ID_ZC_GUILD_INFO3 = 0xa84,
ID_ZC_BAN_LIST2 = 0xa87,
ID_ZC_ADD_EXCHANGE_ITEM_0a96 = 0xa96,
ID_ZC_MEMBERMGR_INFO2 = 0xaa5,
ID_ZC_CHANGE_ITEM_OPTION_0ab9 = 0xab9,
ID_ZC_ACK_MAIL_LIST3 = 0xac2,
ID_ZC_ITEM_FALL_ENTRY5 = 0xadd,
ID_ZC_ALL_QUEST_LIST4 = 0xaff,
ID_ZC_EQUIPWIN_MICROSCOPE_0b03 = 0xb03,
ID_ZC_NPC_BARTER_MARKET_ITEMINFO_0b0e = 0xb0e,
ID_ZC_CHANGE_ITEM_OPTION_0b13 = 0xb13,
ID_ZC_PROPERTY_HOMUN_0b2f = 0xb2f,
ID_ZC_ADD_SKILL2 = 0xb31,
ID_ZC_SKILLINFO_LIST3 = 0xb32,
ID_ZC_SKILLINFO_UPDATE3 = 0xb33,
ID_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_0b56 = 0xb56,
ID_ZC_PROPERTY_HOMUN_0b76 = 0xb76,
ID_ZC_BATTLEFIELD_NOTIFY_HP_0baa = 0xbaa,
ID_ZC_NOTIFY_HP_TO_GROUPM_0bab = 0xbab,
};
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CMode.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Render/Renderer.h"
@ -78,27 +79,27 @@ void UIExchangeAcceptWnd::OnCreate(int width, int height) {
// FUNCTION: fn_12343
int UIExchangeAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
this->RecordResponse(static_cast<int>(a), b, c, d);
switch (a) {
case 184:
case ID_OK:
g_windowMgr.CloseWindow(32);
g_modeMgr.gameMode->SendMsg(50, 3, 0, 0, 0);
return 0;
case 185:
case ID_CANCEL:
g_windowMgr.CloseWindow(32);
g_modeMgr.gameMode->SendMsg(50, 4, 0, 0, 0);
return 0;
}
return 0;
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<NormalItemSlotWindow*>(a);
if (!reinterpret_cast<ExchangeAcceptWndInfo*>(this->saved)->IsValid()) {
reinterpret_cast<ExchangeAcceptWndInfo*>(this->saved)->Reset();
}
this->Move(this->saved->x, this->saved->y);
return 0;
case 50: {
case UM_SET_EXCHANGE_CHAR_NAME: {
std::string text = "(";
text += reinterpret_cast<const char*>(a);
text += ")";

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CMode.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/MessageTable.h"
#include "Client/Mode/ModeEvents.h"
@ -23,15 +24,15 @@ UIJoinPartyAcceptWnd::~UIJoinPartyAcceptWnd() = default;
// FUNCTION: fn_12353
int UIJoinPartyAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
this->RecordResponse(static_cast<int>(a), b, c, d);
switch (a) {
case 184:
case ID_OK:
g_windowMgr.CloseWindow(35);
g_modeMgr.gameMode->SendMsg(60, this->identity, 1, 0, 0);
break;
case 185:
case ID_CANCEL:
g_windowMgr.CloseWindow(35);
g_modeMgr.gameMode->SendMsg(60, this->identity, 0, 0, 0);
break;
@ -39,7 +40,7 @@ int UIJoinPartyAcceptWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
return 0;
case 56: {
case UM_SET_JOIN_PARTY_MSG: {
this->identity = static_cast<std::uint32_t>(a);
std::string text = "(";
text += reinterpret_cast<const char*>(b);

View file

@ -1,4 +1,5 @@
#include "Client/Input/InputCharset.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Render/Renderer.h"
@ -886,7 +887,7 @@ int UIComboBoxV2Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
// FUNCTION: fn_11550
int UIImgMenu::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 34: {
case UM_SETINFO: {
this->horizontal = argument1;
this->count = argument2;
std::string name(reinterpret_cast<const char*>(argument3));
@ -904,11 +905,11 @@ int UIImgMenu::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
return 0;
}
case 102:
case UM_SETID:
this->geometry.id = argument1;
return 0;
case 83:
case UM_SET_CALLER_WID:
this->unknown_00C8 = argument1;
return 0;
@ -916,7 +917,7 @@ int UIImgMenu::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
this->unknown_0090[argument1 - 1] = argument2 != 0;
return 0;
case 106:
case UM_SET_DISABLE:
this->unknown_0094[argument1 - 1] = argument2 != 0;
return 0;

View file

@ -1,4 +1,5 @@
#include "UI/CashShop/UICashShopWnd.h"
#include "UI/Window/UIEnums.h"
#include "Utility/EncryptedName.h"
#include "Client/Mode/CGameMode.h"
@ -763,7 +764,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
CSession& itemLists = g_session;
const CSession& lists = g_session;
switch (message) {
case 0x22:
case UM_SETINFO:
if (g_session.unknown_5912) {
if (g_session.m_hotkeyScript->Call("set_stoveshop_banner", "") == true) {
this->m_banner->CreateButtons();
@ -800,7 +801,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
this->Invalidate();
return 0;
case 0x17:
case UM_REFRESHITEM:
this->m_items.clear();
for (int index = 0; index < lists.GetList1788(this->m_selectedTab); ++index) {
ITEM_INFO item = g_session.GetItem1784At(this->m_selectedTab, index);
@ -817,17 +818,17 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
this->LayoutPage();
return 0;
case 0:
case UM_DEFPUSH:
if (sender == this->unknown_00E0) {
this->SendMsg(nullptr, 6, 0x141, 0, 0, 0);
}
return 0;
case 0x1F:
case UM_ADDITEM:
this->m_cart->SendMsg(sender, 0x1F, argument1, 1, 0, 0);
return 0;
case 0x26: {
case UM_DROP: {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
if (mode == nullptr) {
return 0;
@ -902,15 +903,15 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
return 0;
}
case 6:
case UM_COMMAND:
switch (argument1) {
case 0xC9:
case ID_CLOSE:
if (g_session.unknown_5912) {
g_modeMgr.GetGameMode()->SendMsg(0x14B, 5, 0, 0, 0);
}
g_windowMgr.CloseWindow(0x13E);
return 0;
case 0xD7: {
case ID_RADIOBTN: {
int selected = this->m_selectedTab;
for (std::map<int, UIWindow*>::iterator tab = this->m_tabButtons.begin(); tab != this->m_tabButtons.end(); ++tab) {
if (tab->first != 10 && tab->first != 8 && sender == tab->second) {
@ -937,7 +938,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
RegCloseKey(key);
return 0;
}
case 0xE0: {
case ID_BUY: {
std::vector<ITEM_INFO>& cartItems = this->m_cart->m_cartItems;
const int count = cartItems.size();
if (cartItems.empty()) {
@ -1000,18 +1001,18 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
GetRagConnection().Send(static_cast<short>(length), &packet);
return 0;
}
case 0x11C:
case ID_CHARGE:
ShellExecuteA(nullptr, "OPEN", LookupMessage(0xCE5), LookupMessage(0xCE5), nullptr, SW_SHOW);
return 0;
case 0x13C:
case ID_PREV_PAGE:
this->m_page = std::max(this->m_page - 1, 0);
this->LayoutPage();
return 0;
case 0x13D:
case ID_NEXT_PAGE:
this->m_page = std::min(this->m_page + 1, this->m_pageCount - 1);
this->LayoutPage();
return 0;
case 0x141: {
case ID_SEARCH: {
std::string query(this->unknown_00E0->Text());
if (query.size() != 0 && strcmp(query.c_str(), LookupMessage(0xCE6)) != 0) {
itemLists.ClearItems1784(10);
@ -1112,9 +1113,9 @@ int UICashShopWnd_Banner::SendMsg(UIWindow* sender, int message, std::intptr_t a
// FUNCTION: fn_09560
int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int count = this->m_cartItems.size();
if (count == 0) {
break;
@ -1153,7 +1154,7 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg
this->Invalidate();
break;
}
case 0x1F: {
case UM_ADDITEM: {
if (argument1 == 0) {
return -1;
}
@ -1230,7 +1231,7 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg
this->Invalidate();
return UIWindow::SendMsg(sender, message, argument1, quantity, argument3, argument4);
}
case 0x68: {
case UM_DECITEM: {
if (sender == nullptr) {
break;
}
@ -1267,19 +1268,19 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg
int UICashShopWnd_CartItem::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
if (message == 6) {
switch (argument1) {
case 0xD3:
case ID_DELETE:
if (this->parent != nullptr) {
this->parent->SendMsg(this, 0x68, atoi(this->m_item.itemId.c_str()), 0, 0, 0);
this->Invalidate();
}
break;
case 0x117:
case ID_UP:
if (this->parent != nullptr) {
this->parent->SendMsg(this, 0x1F, reinterpret_cast<std::intptr_t>(&this->m_item), 1, 0, 0);
}
this->Invalidate();
break;
case 0x118:
case ID_DOWN:
if (this->parent != nullptr) {
this->parent->SendMsg(this, 0x1F, reinterpret_cast<std::intptr_t>(&this->m_item), -1, 0, 0);
}

View file

@ -1,4 +1,5 @@
#include "UI/Chat/UINewChatWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/Mouse.h"
#include "Client/Mode/CMode.h"
@ -207,7 +208,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
this->FillSurface(0xFFFF00FF, &rectangle);
return 0;
}
case 0x16:
case UM_TAB:
if (a != this->m_currentTab) {
this->m_currentTab = a;
this->RefreshTabs(true);
@ -215,7 +216,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
this->RefreshTabs(false);
}
return 0;
case 0x46: {
case UM_DELETE_WHISPER_NAME: {
std::string name(reinterpret_cast<const char*>(a));
const int count = static_cast<int>(static_cast<UIWhisperEditCtrl*>(this->unknown_00C0)->history.size());
int index = 0;
@ -233,7 +234,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
return 0;
}
case 0x27:
case UM_COMBOBOX_SELECTED:
switch (this->unknown_00F0) {
case 1:
*reinterpret_cast<int*>(&g_session.unknown_5490[0x8]) = a;
@ -265,11 +266,11 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
default:
return 0;
}
case 0x36:
case UM_GET_EDIT_FOCUS:
g_windowMgr.SetFocus(static_cast<UIChatEditCtrl*>(this->m_chatEdit));
return 0;
case 0x25:
case 0x73:
case UM_ADDCHAT:
case UM_ADDCHAT2:
if (message != 0x73) {
std::vector<std::string> lines;
char name[25] = {};
@ -337,7 +338,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
}
return 0;
case 0x22:
case UM_SETINFO:
if (g_windowMgr.unknown_0030 < 0 || g_windowMgr.unknown_0034 < 0 || g_windowMgr.unknown_0030 > g_renderer->viewport.width - this->geometry.width
|| g_windowMgr.unknown_0034 > g_renderer->viewport.height - this->geometry.height) {
g_windowMgr.unknown_0030 = 0;
@ -348,9 +349,9 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
this->ResizeRows(g_windowMgr.unknown_004C);
this->Move(this->geometry.x, this->geometry.y);
return 0;
case 6:
case UM_COMMAND:
switch (a) {
case 0xC1:
case ID_OPTION:
if (UIWindow* window = g_windowMgr.EnsureWindow(0x84)) {
window->SendMsg(this, 6, 0xC1, this->m_currentTab, 1, 0);
}
@ -370,7 +371,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
case 0x166:
this->SendMsg(this, 0x75, this->m_currentTab, 0, 0, 0);
return 0;
case 0xEE: {
case ID_TALKTOWHOCOMBO: {
this->unknown_00F0 = 1;
if (g_windowMgr.unknown_0214 != nullptr) {
g_windowMgr.CloseWindow(0x1A);
@ -390,7 +391,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
menu->Move(x + 1, y - 0x2F);
return 0;
}
case 0xE1: {
case ID_WHISPERCOMBO: {
this->unknown_00F0 = 0;
if (g_windowMgr.unknown_0214 != nullptr) {
g_windowMgr.CloseWindow(0x1A);
@ -420,7 +421,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
menu->Move(x + 1, y - height + 1);
return 0;
}
case 0xB8: {
case ID_OK: {
if (!g_windowMgr.inputSuggestionsEnabled && g_windowMgr.chatModeChanged) {
return 0;
}
@ -498,7 +499,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
g_modeMgr.gameMode->SendMsg(0x2A, talkType, reinterpret_cast<int>(parts), 0, 0);
return 0;
}
case 0xD4:
case ID_HIS:
this->SendMsg(nullptr, 2, 0, 0, 0, 0);
return 0;
case 0x176: {
@ -540,7 +541,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
return 0;
}
case 0xCA: {
case ID_MINI: {
std::map<int, SubChatWndInfo>& names = g_session.m_noSubChatWnds;
if (names.size() <= 1) {
return 0;
@ -588,7 +589,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
default:
return 0;
}
case 0xE:
case UM_RESIZE:
if (a == 2 && static_cast<unsigned char>(g_windowMgr.unknown_03F4) != 0) {
const int top = this->m_inputOffsetY + 0x38;
if (c < top) {
@ -606,7 +607,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
}
return 0;
case 2:
case UM_TOGGLEPUSH:
if (static_cast<unsigned char>(g_windowMgr.unknown_03F4) != 0) {
const int step = a == 0 ? 1 : -1;
int rows = step;
@ -620,7 +621,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
}
return 0;
case 4: {
case UM_PAGEDOWNPUSH: {
UIListBox* tab = static_cast<UIListBox*>(this->m_tabs[this->m_currentTab]);
if (tab != nullptr && tab->verticalOverflow != 0) {
if (HIBYTE(GetKeyState(VK_CONTROL))) {
@ -631,7 +632,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
return 0;
}
case 3: {
case UM_PAGEUPPUSH: {
UIListBox* tab = static_cast<UIListBox*>(this->m_tabs[this->m_currentTab]);
if (tab != nullptr && tab->verticalOverflow != 0) {
if (HIBYTE(GetKeyState(VK_CONTROL))) {
@ -642,10 +643,10 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
return 0;
}
case 0xF:
case UM_CHANGESTATUS:
this->ResizeRows(a);
return 0;
case 0x10:
case UM_OPENCHATWND:
if (static_cast<unsigned char>(g_windowMgr.unknown_03F4) != 0 && this->geometry.unknown_0030 == 0) {
this->ResizeRows(1);
}

View file

@ -1,4 +1,5 @@
#include "UI/Clan/UIClanWnd.h"
#include "UI/Window/UIEnums.h"
#include "Contents/ClanInfo.h"
#include "Contents/MapInfoMgr.h"
#include "Contents/MessageTable.h"
@ -169,12 +170,12 @@ void UIClanInfoManageWnd::OnLBtnDown(int x, int y) {
// FUNCTION: fn_10633
int UIClanInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
if (a1 == 201) {
g_windowMgr.CloseWindow(237);
}
return 0;
case 60:
case UM_REFRESH:
this->LoadEmblem();
this->InvalidateChildren();
return 0;
@ -187,10 +188,10 @@ int UIClanInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1
// FUNCTION: fn_10634
int UIClanWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 60:
case UM_REFRESH:
this->InvalidateChildren();
return 0;
case 34:
case UM_SETINFO:
this->m_saved = reinterpret_cast<ClanWndInfo*>(a1);
if (!this->m_saved->IsValid()) {
this->m_saved->Reset();

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CMode.h"
#include "UI/Window/UIEnums.h"
#include "UI/Dialogs/UIEditctrlWnd.h"
#include "Client/Application/Launcher.h"
@ -247,9 +248,9 @@ void UIMiniMapWnd::ResetCursor(int, int) {
// FUNCTION: fn_13562
int UIEditctrlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 184: {
case ID_OK: {
std::string text = FormatOwnedString(g_miniMapMemoPath, g_applicationDirectory, g_session.m_navigationPlayerMap);
FILE* file = std::fopen(text.c_str(), "ab");
if (file) {
@ -264,12 +265,12 @@ int UIEditctrlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
}
return 0;
}
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(274);
return 0;
}
return 0;
case 0:
case UM_DEFPUSH:
if (this->edit == sender && this->edit->Length() > 0) {
this->SendMsg(this->edit, 6, 184, 0, 0, 0);
return 0;
@ -373,7 +374,7 @@ void UIMiniMapWnd::Paint() {
// FUNCTION: fn_13563
int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 194: {
const bool enabled = this->unknown_0120->geometry.unknown_0030 != 0;
@ -385,7 +386,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
}
case 200:
return 0;
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(273);
return 0;
case 356:
@ -452,7 +453,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
return 0;
}
case 34:
case UM_SETINFO:
this->m_saved = reinterpret_cast<MiniMapWndInfo*>(argument1);
if (!this->m_saved->IsValid()) {
this->m_saved->Reset();

View file

@ -1,4 +1,5 @@
#include "UI/Edit/UIEditBoxEx.h"
#include "UI/Window/UIEnums.h"
#include "Network/TextEncoding.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Lists/UIScrollBar.h"
@ -420,23 +421,23 @@ void CUIEditCtrlEx::HandleKeyDown(int key, std::intptr_t lparam) {
int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
int position;
switch (message) {
case 7:
case UM_SCROLLVERT:
position = this->scrollPosition + a;
break;
case 9:
case UM_SCROLLVERTPAGEUP:
position = this->unknown_01F0 + this->scrollPosition;
break;
case 10:
case UM_SCROLLVERTPAGEDOWN:
position = this->scrollPosition - this->unknown_01F0;
break;
case 0:
case UM_DEFPUSH:
if (reinterpret_cast<const unsigned char*>(&this->unknown_0184)[1] != 0 && HIBYTE(GetKeyState(VK_SHIFT))) {
g_serverLanguage->Insert("\r\n");
return 0;
}
UIWindow::SendMsg(sender, 0, a, b, c, d);
return 0;
case 18:
case UM_UPPUSH:
if (this->line > 0) {
if (this->unknown_01D4 == this->line - 1) {
g_serverLanguage->RetreatCursor(this->unknown_01D8);
@ -485,7 +486,7 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::
g_serverLanguage->Character(a, b);
this->selectedAll = 1;
return 3;
case 19:
case UM_DOWNPUSH:
if (this->lines.size() - 1 > static_cast<unsigned>(this->line)) {
if (this->unknown_01D4 == this->line + 1) {
g_serverLanguage->AdvanceCursor(this->unknown_01D8);

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
#include "Client/Input/InputCharset.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/Language.h"
#include "Contents/SkinMgr.h"
#include "Render/Text/FontCache.h"
@ -57,7 +58,7 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
unsigned char* const lineMove = reinterpret_cast<unsigned char*>(&this->unknown_0184);
switch (message) {
case 0:
case UM_DEFPUSH:
if (lineMove[1] == 0 || HIBYTE(GetKeyState(VK_SHIFT)) != 0 || lineMove[1] == 0) {
char newline[3] = {'\r', '\n', '\0'};
g_serverLanguage->Insert(newline);
@ -65,9 +66,9 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
this->UIWindow::SendMsg(sender, 0, a, b, c, d);
}
return 0;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->unknown_0158;
scrolling[0] = 1;
@ -97,7 +98,7 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
return this->unknown_0158 - previous;
}
case 18: {
case UM_UPPUSH: {
lineMove[0] = 0;
const unsigned count = this->unknown_0168.size();
@ -147,7 +148,7 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
lineMove[0] = 1;
break;
}
case 19: {
case UM_DOWNPUSH: {
lineMove[0] = 0;
const unsigned count = this->unknown_0168.size();
@ -392,7 +393,7 @@ void UIEditCtrl3::Resize(int width, int height) {
// FUNCTION: fn_10922
int UIWhisperEditCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 18:
case UM_UPPUSH:
if (this->history.size() != 0) {
if (this->historyIndex != 0) {
--this->historyIndex;
@ -401,7 +402,7 @@ int UIWhisperEditCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
this->OnBeginEdit();
}
break;
case 19:
case UM_DOWNPUSH:
if (this->history.size() != 0 && static_cast<std::size_t>(this->historyIndex) < this->history.size()) {
++this->historyIndex;
if (this->historyIndex == static_cast<int>(this->history.size())) {
@ -924,7 +925,7 @@ void UIChatEditCtrl::OnLBtnDown(int x, int y) {
// FUNCTION: fn_10909
int UIChatEditCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 18:
case UM_UPPUSH:
if (this->history.size() != 0) {
if (this->unknown_0140 == this->history.size()) {
this->pending = this->Text();
@ -937,7 +938,7 @@ int UIChatEditCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:
this->OnBeginEdit();
}
break;
case 19:
case UM_DOWNPUSH:
if (this->history.size() != 0 && this->unknown_0140 < this->history.size()) {
++this->unknown_0140;
this->SetText((this->unknown_0140 == this->history.size() ? this->pending : this->history[this->unknown_0140]).c_str());
@ -1033,10 +1034,10 @@ void UIWhisperEditCtrl::SetText(const char* value) {
// FUNCTION: fn_10916
int UIEditCtrl_OldList::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 18:
case UM_UPPUSH:
this->RecallHistory(-1);
return 0;
case 19:
case UM_DOWNPUSH:
this->RecallHistory(1);
return 0;
default:

View file

@ -1,4 +1,5 @@
#include "UI/Emotion/UIEmotionWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Session.h"
#include "Contents/CashEmotionMgr.h"
@ -116,12 +117,12 @@ int UIEmotionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
switch (message) {
case 0:
break;
case 6:
case UM_COMMAND:
switch (argument1) {
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(0x56);
break;
case 283:
case ID_OPEN_EMOTIONLIST:
if (static_cast<UICashEmotionListWnd*>(g_windowMgr.unknown_0384) == nullptr) {
g_windowMgr.EnsureWindow(0x57);
} else {

View file

@ -1,4 +1,5 @@
#include "UI/EntryQueue/UIEntryQueueWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
@ -464,7 +465,7 @@ void __stdcall Nullsub429() {
int UIEntryQueueWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
EntryQueueInfo* info = g_entryQueueMgr->current;
switch (message) {
case 6: {
case UM_COMMAND: {
int error;
switch (a) {
case 0:
@ -534,7 +535,7 @@ int UIEntryQueueWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
g_windowMgr.Confirm(LookupMessage(error), 0, false, false, 0, "Message", 280, 120, 0);
return 0;
}
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<EntryQueueWndInfo*>(a);
if (!this->saved->IsValid()) {
this->saved->Reset();

View file

@ -1,4 +1,5 @@
#include "UI/Exchange/UIExchangeUI.h"
#include "UI/Window/UIEnums.h"
#include "Client/Session.h"
#include "Client/Mode/CGameMode.h"
@ -433,7 +434,7 @@ void CUIListBoxEx<ExchangeUI::CUIItem, ExchangeUI::CItemData>::UpdateScrollBar()
// FUNCTION: fn_15304
int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 0x32:
case UM_SET_EXCHANGE_CHAR_NAME:
if (argument1 == 0) {
break;
}
@ -450,7 +451,7 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument
this->unknown_00DC->SetText(this->partnerName);
}
break;
case 0x33:
case UM_MYDRAGCLOSED:
this->zenyEdit->Show(0);
this->FreezeItems(true);
this->UpdateZeny(true);
@ -464,7 +465,7 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument
button->Invalidate();
}
break;
case 0x34:
case UM_OTHERDRAGCLOSED:
this->FreezeItems(false);
this->UpdateZeny(false);
{
@ -477,7 +478,7 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument
button->Invalidate();
}
break;
case 0x17:
case UM_REFRESHITEM:
this->firstList->ClearData();
for (int index = 0; index < 10; ++index) {
ITEM_INFO item = g_session.GetExchangeItem(index);
@ -504,7 +505,7 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument
}
this->secondList->UpdateScrollBar();
break;
case 0x26: {
case UM_DROP: {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
if (mode != nullptr) {
mode->SendMsg(0x33, mode->drag.id, mode->drag.quantity, 0, 0);

View file

@ -1,4 +1,5 @@
#include "UI/Guild/UIAgitWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/Replay.h"
@ -41,10 +42,10 @@ int UIAgitMessageBox::SendMsg(UIWindow*, int message, std::intptr_t a, std::intp
const int response = static_cast<int>(a);
this->RecordResponse(response, b, c, d);
switch (response) {
case 187:
case ID_YES:
g_modeMgr.GetGameMode()->SendMsg(315, this->m_agitId, 0, 0, 0);
[[fallthrough]];
case 188:
case ID_NO:
g_windowMgr.Schedule(this);
}
}

View file

@ -1,4 +1,5 @@
#include "UI/Guild/UIGuildHelperWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/MessageTable.h"
@ -156,7 +157,7 @@ int UICreateGuildWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s
}
switch (a1) {
case 184: {
case ID_OK: {
CMode* mode = g_modeMgr.GetGameMode();
std::string name = "";
name = this->m_nameEdit->Text();
@ -175,7 +176,7 @@ int UICreateGuildWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s
}
break;
}
case 185:
case ID_CANCEL:
if (this->m_mode == 0) {
g_windowMgr.CloseWindow(213);
} else {
@ -191,20 +192,20 @@ int UICreateGuildWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s
// FUNCTION: fn_13124
int UIGuildBanReasonDescWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a1) {
case 184: {
case ID_OK: {
g_windowMgr.CloseWindow(76);
CMode* mode = g_modeMgr.gameMode;
mode->SendMsg(111, reinterpret_cast<int>(&this->m_target), reinterpret_cast<int>(this->m_reasonEdit->Text()), 0, 0);
break;
}
case 185:
case ID_CANCEL:
g_windowMgr.CloseWindow(76);
break;
}
return 0;
case 34: {
case UM_SETINFO: {
const GuildBanTarget* target = reinterpret_cast<const GuildBanTarget*>(a1);
this->m_target.unknown_0000 = target->unknown_0000;
this->m_target.unknown_0004 = target->unknown_0004;
@ -220,14 +221,14 @@ int UIGuildBanReasonDescWnd::SendMsg(UIWindow* sender, int message, std::intptr_
// FUNCTION: fn_13126
int UIGuildHelperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a1) {
case 184:
case ID_OK:
g_windowMgr.CloseWindow(214);
g_windowMgr.CloseWindow(213);
g_windowMgr.CloseWindow(212);
break;
case 343:
case ID_HELP:
if (!g_windowMgr.CloseWindow(214)) {
g_windowMgr.EnsureWindow(214);
}
@ -245,7 +246,7 @@ int UIGuildHelperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s
break;
}
return 0;
case 34:
case UM_SETINFO:
this->m_saved = reinterpret_cast<GuildHelperWndInfo*>(a1);
if (!this->m_saved->IsValid()) {
this->m_saved->Reset();

View file

@ -1,4 +1,5 @@
#include "Render/DeviceContext/DCSurface.h"
#include "UI/Window/UIEnums.h"
#include "UI/Guild/UIGuildWnd.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/CMode.h"
@ -620,17 +621,17 @@ __declspec(noinline) void UIGuildWnd::CreateTabs() {
// FUNCTION: fn_13135
int UIGuildWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 34:
case UM_SETINFO:
this->m_saved = reinterpret_cast<GuildWndInfo*>(a1);
if (!this->m_saved->IsValid()) {
this->m_saved->Reset();
}
this->Move(this->m_saved->x, this->m_saved->y);
break;
case 60:
case UM_REFRESH:
this->InvalidateChildren();
return 0;
case 69: {
case UM_CHANGE_GUILD_TAB: {
int permissions[7] = {0, 1, 2, 4, 16, 128, 64};
switch (a1) {
case 1:
@ -746,15 +747,15 @@ void UIGuildBanishedMemberWnd::OnLBtnDown(int x, int y) {
// FUNCTION: fn_13125
int UIGuildBanishedMemberWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
if (a1 == 201) {
g_windowMgr.CloseWindow(59);
return 0;
}
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->m_scrollTop;
int top;
if (message == 9) {
@ -769,7 +770,7 @@ int UIGuildBanishedMemberWnd::SendMsg(UIWindow* sender, int message, std::intptr
}
return this->m_scrollTop - previous;
}
case 60:
case UM_REFRESH:
this->InvalidateChildren();
this->UpdateScroll();
break;
@ -848,14 +849,14 @@ void UIGuildTotalInfoWnd::OnLBtnDown(int x, int y) {
// FUNCTION: fn_13134
int UIGuildTotalInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
if (a1 == 201) {
g_windowMgr.CloseWindow(59);
}
return 0;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->m_scrollTop;
int top;
if (message == 9) {
@ -1086,11 +1087,11 @@ int UIGuildLeaveReasonDescWnd::SendMsg(UIWindow* sender, int message, std::intpt
}
switch (a1) {
case 184:
case ID_OK:
g_modeMgr.gameMode->SendMsg(110, reinterpret_cast<int>(this->m_reasonEdit->Text()), 0, 0, 0);
g_windowMgr.CloseWindow(75);
break;
case 185:
case ID_CANCEL:
g_windowMgr.CloseWindow(75);
break;
}
@ -2008,12 +2009,12 @@ void UIGuildNoticeWnd::OnCreate(int, int) {
// FUNCTION: fn_13130
int UIGuildNoticeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a1) {
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(59);
break;
case 277: {
case ID_SEND_GUILD_NOTICE: {
std::string body(this->m_bodyEdit->Text());
if (g_forbiddenWords.Contains(this->m_titleEdit->Text()) == true || g_forbiddenWords.Contains(body.c_str()) == true) {
g_windowMgr.Confirm(LookupMessage(14), 0, true, false, 0, "Message", 280, 120, 0);
@ -2027,7 +2028,7 @@ int UIGuildNoticeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s
}
}
break;
case 60:
case UM_REFRESH:
this->InvalidateChildren();
break;
default:
@ -2041,12 +2042,12 @@ int UIGuildNoticeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s
// FUNCTION: fn_13132
int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a1) {
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(59);
return 0;
case 184:
case ID_OK:
if (this->m_hoverIndex != -1) {
CSkillInfo skill = this->SkillAt(this->m_hoverIndex);
if (skill.level != 0) {
@ -2055,13 +2056,13 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
return 0;
}
break;
case 239:
case 240:
case 241:
case 242:
case 243:
case 244:
case 245:
case ID_LVLUP1:
case ID_LVLUP2:
case ID_LVLUP3:
case ID_LVLUP4:
case ID_LVLUP5:
case ID_LVLUP6:
case ID_LVLUP7:
if (g_session.m_guildSkillPoint != 0) {
CSkillInfo skill = this->SkillAt(this->m_scrollTop + a1 - 239);
if (skill.available != 0) {
@ -2070,13 +2071,13 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
return 0;
}
break;
case 253:
case 254:
case 255:
case 256:
case 257:
case 258:
case 259: {
case ID_LVLSELECTDN1:
case ID_LVLSELECTDN2:
case ID_LVLSELECTDN3:
case ID_LVLSELECTDN4:
case ID_LVLSELECTDN5:
case ID_LVLSELECTDN6:
case ID_LVLSELECTDN7: {
CSkillInfo skill = this->SkillAt(this->m_scrollTop + a1 - 253);
if (skill.available != 0) {
int level = g_session.UseLevel(skill.id) - 1;
@ -2091,13 +2092,13 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
}
return 0;
}
case 260:
case 261:
case 262:
case 263:
case 264:
case 265:
case 266: {
case ID_LVLSELECTUP1:
case ID_LVLSELECTUP2:
case ID_LVLSELECTUP3:
case ID_LVLSELECTUP4:
case ID_LVLSELECTUP5:
case ID_LVLSELECTUP6:
case ID_LVLSELECTUP7: {
CSkillInfo skill = this->SkillAt(this->m_scrollTop + a1 - 260);
if (skill.available != 0) {
int level = g_session.UseLevel(skill.id) + 1;
@ -2115,9 +2116,9 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
}
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->m_scrollTop;
int top;
if (message == 9) {
@ -2136,7 +2137,7 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
return this->m_scrollTop - previous;
}
case 23: {
case UM_REFRESHITEM: {
this->m_skills.clear();
const int count = static_cast<int>(g_session.m_additionalSkills.size());
for (int index = 0; index < count; ++index) {
@ -2151,7 +2152,7 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
return 0;
}
case 49:
case UM_MAKEMENU:
this->m_menuItems.clear();
if (g_windowMgr.unknown_0210 != 0) {
g_windowMgr.CloseWindow(18);
@ -2186,7 +2187,7 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
}
break;
case 48:
case UM_MENU_SELECTED:
if (this->m_hoverIndex != -1) {
CSkillInfo skill = this->SkillAt(this->m_hoverIndex);
if (skill.available != 0) {
@ -2201,7 +2202,7 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st
}
break;
case 58: {
case UM_USESKILL: {
const CSkillInfo* skill = reinterpret_cast<const CSkillInfo*>(a1);
if (skill->level != 0) {
g_modeMgr.gameMode->SendMsg(113, a1, g_session.UseLevel(skill->id), 0, 0);
@ -2333,9 +2334,9 @@ void UIGuildSkillWnd::OnCreate(int, int height) {
// FUNCTION: fn_13131
int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->m_scrollTop;
int top;
if (message == 9) {
@ -2352,9 +2353,9 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr
return this->m_scrollTop - previous;
}
case 6:
case UM_COMMAND:
switch (a1) {
case 184:
case ID_OK:
if (this->m_positionMap.size() != 0) {
reinterpret_cast<std::map<int, GuildPositionEntry>&>(g_guildInfo.unknown_010C) = this->m_positionMap;
g_modeMgr.gameMode->SendMsg(104, 0, 0, 0, 0);
@ -2367,10 +2368,10 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr
return 0;
}
return 0;
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(59);
return 0;
case 213:
case ID_CHECK:
if (this->unknown_00D0[0] && this->unknown_00FC[0] && this->unknown_0128[0]) {
for (int index = 0; index < 11; ++index) {
if (this->unknown_00D0[index] == sender) {
@ -2401,7 +2402,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr
break;
}
return 0;
case 275:
case ID_POSNAME_EDIT:
if (this->unknown_0180[0]) {
int row = a1 - 275;
for (int index = 0; index < 11; ++index) {
@ -2420,7 +2421,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr
break;
}
return 0;
case 276:
case ID_PAYRATE_EDIT:
if (this->unknown_0154[0]) {
int row = a1 - 276;
for (int index = 0; index < 11; ++index) {
@ -2459,7 +2460,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr
this->InvalidateChildren();
return 0;
case 60:
case UM_REFRESH:
this->m_positions = reinterpret_cast<const std::list<GuildPositionEntry>&>(g_guildInfo.unknown_00D4);
this->InvalidateChildren();
if (g_guildInfo.unknown_00B4 && this->m_positionMap.size()) {
@ -2555,7 +2556,7 @@ void UIGuildMemberManageWnd::Paint() {
// FUNCTION: fn_13129
int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 39: {
case UM_COMBOBOX_SELECTED: {
int index = 0;
for (auto member = this->m_members.begin(); member != this->m_members.end(); ++member, ++index) {
if (this->m_hoverRow == index) {
@ -2580,9 +2581,9 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
this->Invalidate();
return 0;
}
case 6:
case UM_COMMAND:
switch (a1) {
case 184:
case ID_OK:
if (!this->unknown_0180.empty()) {
g_guildInfo.unknown_0104 = this->unknown_0180;
g_modeMgr.gameMode->SendMsg(103, 0, 0, 0, 0);
@ -2594,14 +2595,14 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
return 0;
}
break;
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(59);
return 0;
case 213:
case ID_CHECK:
g_session.m_guildMemberListSort = !g_session.m_guildMemberListSort;
this->Invalidate();
return 0;
case 273:
case ID_OPEN_MEMBER_POS_COMBO:
if (this->m_rowButtons[0]) {
int row = 0;
int index;
@ -2640,9 +2641,9 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
break;
}
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->m_scrollTop;
int top;
if (message == 9) {
@ -2659,7 +2660,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
return this->m_scrollTop - previous;
}
case 49:
case UM_MAKEMENU:
this->unknown_0150.clear();
if (g_windowMgr.unknown_0210 != 0) {
g_windowMgr.CloseWindow(18);
@ -2725,7 +2726,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
return 0;
}
break;
case 48: {
case UM_MENU_SELECTED: {
GuildInfo::Member member;
if ((this->GetMember(this->m_hoverRow, member) && member.name.find(g_guildNamelessTag, 0) != std::string::npos) ||
!g_playerNameDictionary->Contains(member.characterId)) {
@ -2734,7 +2735,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
switch (this->unknown_0150[a1].value) {
case 16: {
case MENUID_REMOVE_GUILE_MEMBER: {
GuildInfo::Member target;
if (this->GetMember(this->m_hoverRow, target)) {
struct {
@ -2746,7 +2747,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
break;
}
case 17: {
case MENUID_LEAVE_GUILD: {
GuildInfo::Member target;
if (this->GetMember(this->m_hoverRow, target) && target.accountId == static_cast<int>(g_session.m_aid)) {
*reinterpret_cast<float*>(g_session.unknown_0F54) = static_cast<float>(static_cast<std::uint32_t>(target.characterId));
@ -2754,21 +2755,21 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
break;
}
case 18: {
case MENUID_VIEW_GUILD_MEMBER_INFO: {
GuildInfo::Member target;
if (this->GetMember(this->m_hoverRow, target)) {
g_modeMgr.gameMode->SendMsg(109, target.accountId, 0, 0, 0);
}
break;
}
case 5: {
case MENUID_INVITE_IN_PARTY: {
GuildInfo::Member target;
if (this->GetMember(this->m_hoverRow, target)) {
g_modeMgr.gameMode->SendMsg(59, reinterpret_cast<int>(target.name.c_str()), 0, 0, 0);
}
break;
}
case 20: {
case MENUID_MAKE_WHISPER_WINDOW: {
GuildInfo::Member target;
if (this->GetMember(this->m_hoverRow, target) == true) {
const char* relation;
@ -2810,7 +2811,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
return 0;
}
case 60: {
case UM_REFRESH: {
this->unknown_0180.clear();
this->m_members = g_guildInfo.m_members;
this->InvalidateChildren();
@ -2824,7 +2825,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
this->UpdateScroll();
return 0;
}
case 106: {
case UM_SET_DISABLE: {
this->m_members = g_guildInfo.m_members;
const bool enabled = g_guildInfo.unknown_00B4 != 0;
for (int index = 0; index < 6; ++index) {
@ -2985,7 +2986,7 @@ void UIGuildPositionManageWnd::OnCreate(int, int) {
// FUNCTION: fn_13127
int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) {
switch (message) {
case 48: {
case UM_MENU_SELECTED: {
CMode* gameMode = g_modeMgr.GetGameMode();
if (this->unknown_00E0[a1].value != 27) {
break;
@ -3026,7 +3027,7 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
}
break;
}
case 49:
case UM_MAKEMENU:
this->unknown_00E0.erase(this->unknown_00E0.begin(), this->unknown_00E0.end());
if (g_windowMgr.unknown_0210 != 0) {
g_windowMgr.CloseWindow(18);
@ -3056,12 +3057,12 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
return 0;
}
break;
case 6:
case UM_COMMAND:
switch (a1) {
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(59);
return 0;
case 278: {
case ID_CHANGE_GUILE_EMBLEM: {
if (g_windowMgr.unknown_0214 != 0) {
g_windowMgr.CloseWindow(26);
}
@ -3095,9 +3096,9 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
return 0;
}
break;
case 13:
case UM_SETSTATE:
break;
case 39: {
case UM_COMBOBOX_SELECTED: {
if (this->unknown_00D8.size() == 0) {
break;
}
@ -3138,7 +3139,7 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
}
return 0;
}
case 60:
case UM_REFRESH:
this->m_guildId = g_guildInfo.m_guildId;
if (g_guildInfo.unknown_00B4 != 0) {
this->m_editButton->Move(this->geometry.width - this->m_editButton->geometry.width - 8, 69);

View file

@ -1,4 +1,5 @@
#include "UI/Guild/UIGuild_Storage_Log.h"
#include "UI/Window/UIEnums.h"
#include "Contents/MessageTable.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
@ -41,13 +42,13 @@ UIGuild_Storage_Log::UIGuild_Storage_Log() : UIFrameWnd(0) {
// FUNCTION: fn_12941
int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a) {
case 184:
case ID_OK:
g_windowMgr.CloseWindow(253);
break;
case 218: {
case ID_NEXT: {
const unsigned page = this->m_page;
if (this->m_category == 0) {
if (page >= this->m_pageCounts[0]) {
@ -69,7 +70,7 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a,
return 0;
}
case 246: {
case ID_PREV: {
const unsigned page = this->m_page;
if (page > 1) {
const int state = this->m_state;
@ -95,7 +96,7 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a,
return 0;
case 22:
case UM_TAB:
this->m_category = static_cast<int>(a);
this->m_page = 1;
this->m_state = 1;
@ -105,7 +106,7 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a,
this->SendMsg(this, 60, 0, 0, 0, 0);
return 0;
case 60:
case UM_REFRESH:
for (int i = 0; i < 10; ++i) {
this->m_dateTexts[i]->SetText("", 0);
this->m_nameTexts[i]->SetText("", 0);

View file

@ -1,4 +1,5 @@
#include "Render/Text/FontCache.h"
#include "UI/Window/UIEnums.h"
#include "Render/Text/TextContext.h"
#include "UI/Item/UIMerchantItemLogWnd.h"
@ -210,12 +211,12 @@ void UIMerchantItemLogWnd::OnRBtnDown(int x, int y) {
// FUNCTION: fn_13580
int UIMerchantItemLogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
if (a == 201) {
g_windowMgr.CloseWindow(this->unknown_00FC != 0 ? 258 : 257);
}
break;
case 14:
case UM_RESIZE:
if (a == 3) {
int height = c <= 336 ? c : 336;
if (height < 120) {
@ -237,7 +238,7 @@ int UIMerchantItemLogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
g_windowMgr.StoreSnapRectangle(this);
}
break;
case 23: {
case UM_REFRESHITEM: {
ITEM_INFO item(*reinterpret_cast<const ITEM_INFO*>(a));
this->items.push_back(item);

View file

@ -1,4 +1,6 @@
#include "Render/Text/FontCache.h"
#include "Contents/Items/ItemType.h"
#include "UI/Window/UIEnums.h"
#include "Render/Text/TextContext.h"
#include "UI/Item/UIParaItemShopWnd.h"
@ -104,15 +106,15 @@ void UIParaItemPurchaseWnd::DragAndDrop(int x, int y, std::intptr_t value) {
const ModeDragState* drag = reinterpret_cast<const ModeDragState*>(value);
if (drag->source == 3) {
switch (drag->type) {
case 4:
case 5:
case 8:
case 9:
case 11:
case 12:
case 13:
case 14:
case 15:
case TYPE_ARMOR:
case TYPE_WEAPON:
case TYPE_BOW:
case TYPE_BOTHHAND:
case TYPE_ARMORTM:
case TYPE_ARMORTB:
case TYPE_ARMORMB:
case TYPE_ARMORTMB:
case TYPE_GUN:
this->SendMsg(nullptr, 38, 0, 0, 0, 0);
return;
default:
@ -266,10 +268,10 @@ void UIParaResultWnd::OnCreate(int width, int height) {
// FUNCTION: fn_13757
int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 36:
case UM_SETTITLE:
this->title->SetTextAutoWidth("Total : 0 Zeny");
return 0;
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<ItemPurchaseWndInfo*>(a);
if (!this->saved->IsValid()) {
this->saved->Reset();
@ -278,19 +280,19 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
this->SendMsg(nullptr, 14, 3, this->saved->width, this->saved->height, 0);
this->Move(this->saved->x, this->saved->y);
return 0;
case 38: {
case UM_DROP: {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
ModeDragState& drag = mode->drag;
switch (drag.type) {
case 4:
case 5:
case 8:
case 9:
case 11:
case 12:
case 13:
case 14:
case 15: {
case TYPE_ARMOR:
case TYPE_WEAPON:
case TYPE_BOW:
case TYPE_BOTHHAND:
case TYPE_ARMORTM:
case TYPE_ARMORTB:
case TYPE_ARMORMB:
case TYPE_ARMORTMB:
case TYPE_GUN: {
const int count = drag.unknown_03B6 == 1 ? g_session.GetItem1720Quantity(drag.id) : g_session.GetItem1720QuantityByItemId(drag.name.c_str());
if (count > 0) {
mode->SendMsg(18, 0, 0, 0, 0);
@ -366,11 +368,11 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
mode->SendMsg(18, 0, 0, 0, 0);
return 0;
}
case 6: {
case UM_COMMAND: {
this->RecordResponse(static_cast<int>(a), b, c, d);
CMode* mode = g_modeMgr.gameMode;
switch (a) {
case 184: {
case ID_OK: {
ITEM_INFO item = g_session.GetItem1720At(0);
if (item.unknown_0074[3] == 1) {
mode->SendMsg(263, 0, 0, 0, 0);
@ -380,7 +382,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
g_session.ClearTradeItems();
return 0;
}
case 185:
case ID_CANCEL:
mode->SendMsg(292, 0, 0, 0, 0);
mode->SendMsg(40, 0, 0, 0, 0);
g_session.ClearTradeItems();
@ -388,7 +390,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
break;
}
case 14:
case UM_RESIZE:
if (a == 3) {
int width = b <= 320 ? b : 320;
int height = c <= 336 ? c : 336;
@ -421,7 +423,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
return 0;
}
break;
case 23: {
case UM_REFRESHITEM: {
this->items.erase(this->items.begin(), this->items.end());
int sum = 0;
const int size = g_session.GetList2Size();
@ -479,7 +481,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
// FUNCTION: fn_13758
int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<ItemShopWndInfo*>(a);
if (!this->saved->IsValid()) {
this->saved->Reset();
@ -488,7 +490,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
this->SendMsg(nullptr, 14, 7, this->saved->width, this->saved->height, 0);
this->Move(this->saved->x, this->saved->y);
return 0;
case 6:
case UM_COMMAND:
this->RecordResponse(static_cast<int>(a), b, c, d);
if (a == 213) {
if (g_replayAnimationScaling != 0) {
@ -500,7 +502,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
return 0;
}
break;
case 38:
case UM_DROP:
if (a == 0) {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
ITEM_INFO item;
@ -520,7 +522,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
return 0;
}
break;
case 36:
case UM_SETTITLE:
if (a == 1) {
this->unknown_00F8 = 1;
this->showQuantity = 1;
@ -533,7 +535,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
this->checkBox->m_disabled = 1;
}
return 0;
case 14:
case UM_RESIZE:
if (a == 7) {
int width = b <= 320 ? b : 320;
int height = c <= 336 ? c : 336;
@ -561,7 +563,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
return 0;
}
break;
case 23: {
case UM_REFRESHITEM: {
this->items.erase(this->items.begin(), this->items.end());
const int size = g_session.GetList1Size();
for (int i = 0; i < size; ++i) {
@ -586,10 +588,10 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
// FUNCTION: fn_13759
int UIParaResultWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 34:
case UM_SETINFO:
this->total->SetTextAutoWidth("Total : 0 Zeny");
return 0;
case 6: {
case UM_COMMAND: {
this->RecordResponse(static_cast<int>(a), b, c, d);
CMode* mode = g_modeMgr.gameMode;
if (a == 184) {
@ -600,12 +602,12 @@ int UIParaResultWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
}
break;
}
case 36:
case UM_SETTITLE:
this->showQuantity = 0;
this->title->SetTextAutoWidth(LookupMessage(2530));
this->SendMsg(nullptr, 14, 7, this->geometry.width, a, 0);
return 0;
case 14:
case UM_RESIZE:
if (a == 7) {
int width = b <= 320 ? b : 320;
int height = c <= 336 ? c : 336;
@ -635,7 +637,7 @@ int UIParaResultWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
return 0;
}
break;
case 23: {
case UM_REFRESHITEM: {
int sum = 0;
for (const ITEM_INFO& item : this->items) {
sum += item.unknown_0014[1] * item.quantity;

View file

@ -1,4 +1,5 @@
#include "Render/Text/FontCache.h"
#include "UI/Window/UIEnums.h"
#include "Render/Text/TextContext.h"
#include "UI/Items/MergeItemWnd.h"
@ -324,7 +325,7 @@ void CMergeItemWnd::FitToGrid(int width, int height) {
// FUNCTION: fn_09675
int CMergeItemWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t) {
switch (message) {
case 34: {
case UM_SETINFO: {
this->m_itemCount = argument2;
const std::int16_t* ids = reinterpret_cast<const std::int16_t*>(argument1);
for (int index = 0; index < this->m_itemCount; ++index) {
@ -340,20 +341,20 @@ int CMergeItemWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std:
this->FitToGrid(this->geometry.width, this->geometry.height);
break;
}
case 60: {
case UM_REFRESH: {
ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1);
g_session.RemoveItem1710(item.unknown_0000[1], item.quantity);
item.quantity = argument2;
g_session.AddItem1710(item, 1);
break;
}
case 6:
case UM_COMMAND:
switch (argument1) {
case 184:
case ID_OK:
this->RequestMerge();
break;
case 185:
case 201: {
case ID_CANCEL:
case ID_CLOSE: {
MergeItemCancelPacket packet;
packet.id = 0x974;
GetRagConnection().Send(reinterpret_cast<PacketLengths&>(GetRagConnection()).FixedLength(packet.id), &packet);
@ -362,19 +363,19 @@ int CMergeItemWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std:
}
}
break;
case 14:
case UM_RESIZE:
if (argument1 == 7) {
this->FitToGrid(argument2, argument3);
}
break;
case 7:
case UM_SCROLLVERT:
if (argument1 != 0) {
this->m_scrollRow += argument1;
this->UpdateScroll();
this->Invalidate();
}
break;
case 2:
case UM_TOGGLEPUSH:
this->SelectSameItems(argument1);
break;
}

View file

@ -1,4 +1,5 @@
#include "UI/Items/UIIllustWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CMode.h"
#include "Client/Mode/ModeMgr.h"
@ -99,13 +100,13 @@ void UIMultiIllustWnd::OnMouseMove(int x, int y) {
// FUNCTION: fn_13190
int UIIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 201) {
g_modeMgr.GetGameMode()->SendMsg(100, reinterpret_cast<int>(""), -1, 1, 0);
g_windowMgr.ReleaseCapture();
}
return 0;
case 34:
case UM_SETINFO:
if (argument1 == -1) {
this->m_titled = 0;
this->m_closable = 0;
@ -120,7 +121,7 @@ int UIIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
this->m_closable = 1;
this->Invalidate();
return 0;
case 78: {
case UM_SET_BITMAP: {
const char* name = reinterpret_cast<const char*>(argument1);
this->m_bitmapName = "유저인터페이스\\Illust\\";
this->m_bitmapName += name;
@ -159,13 +160,13 @@ int UIIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
// FUNCTION: fn_13191
int UIMultiIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 201) {
g_modeMgr.GetGameMode()->SendMsg(100, reinterpret_cast<int>(""), -1, 0, 0);
g_windowMgr.ReleaseCapture();
}
return 0;
case 34:
case UM_SETINFO:
switch (argument1) {
case 10:
this->m_closable = 0;
@ -199,7 +200,7 @@ int UIMultiIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum
this->m_closable = 1;
this->Invalidate();
return 0;
case 78: {
case UM_SET_BITMAP: {
const char* name = reinterpret_cast<const char*>(argument1);
this->m_bitmapName = "유저인터페이스\\Illust\\";
this->m_bitmapName += name;

View file

@ -1,4 +1,5 @@
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/UIEnums.h"
#include "UI/Items/UIItemRepairWnd.h"
#include "Client/Input/InputCharset.h"
@ -210,7 +211,7 @@ int UIItemRepairWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
ITEM_INFO item;
switch (message) {
case 31: {
case UM_ADDITEM: {
const UIItemRepairEntry& entry = *reinterpret_cast<const UIItemRepairEntry*>(a);
this->entries.push_back(entry);
this->itemIds.push_back(entry.itemId);
@ -223,20 +224,20 @@ int UIItemRepairWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
return 0;
}
case 18:
case UM_UPPUSH:
this->m_list->SendMsg(nullptr, 18, 0, 0, 0, 0);
return 0;
case 19:
case UM_DOWNPUSH:
this->m_list->SendMsg(nullptr, 19, 0, 0, 0, 0);
return 0;
case 6: {
case UM_COMMAND: {
const int response = static_cast<int>(a);
this->RecordResponse(response, b, c, this->m_list->selected);
switch (response) {
case 184: {
case ID_OK: {
if (g_replayAnimationScaling) {
UIListBox* list = this->m_list;
list->selected = static_cast<int>(d);
@ -266,7 +267,7 @@ int UIItemRepairWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
break;
}
case 185:
case ID_CANCEL:
g_modeMgr.gameMode->SendMsg(174, -1, 0, 0, 0);
g_windowMgr.CloseWindow(107);
return 0;
@ -316,11 +317,11 @@ int UIItemRepairWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
// FUNCTION: fn_13618
int UIMakeTargetResultWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
g_windowMgr.CloseWindow(81);
return 0;
case 40:
case UM_SETCURITEM:
this->makeType = static_cast<int>(a);
if (b) {
this->succeeded = true;

View file

@ -1,4 +1,5 @@
#include "UI/Items/UIMakeTargetListWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/InputCharset.h"
#include "Client/Mode/ModeMgr.h"
@ -52,7 +53,7 @@ int UIMakeTargetListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
ITEM_INFO item;
switch (message) {
case 31: {
case UM_ADDITEM: {
const int itemId = static_cast<int>(a);
this->itemIds.push_back(itemId);
@ -63,20 +64,20 @@ int UIMakeTargetListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
return 0;
}
case 18:
case UM_UPPUSH:
this->m_list->SendMsg(nullptr, 18, 0, 0, 0, 0);
return 0;
case 19:
case UM_DOWNPUSH:
this->m_list->SendMsg(nullptr, 19, 0, 0, 0, 0);
return 0;
case 6: {
case UM_COMMAND: {
const int response = static_cast<int>(a);
this->RecordResponse(response, b, c, this->m_list->selected);
switch (response) {
case 184: {
case ID_OK: {
if (g_replayAnimationScaling) {
this->m_list->selected = static_cast<int>(d);
this->m_list->Invalidate();
@ -112,7 +113,7 @@ int UIMakeTargetListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
break;
}
case 185: {
case ID_CANCEL: {
ITEM_INFO materials[3];
g_modeMgr.GetGameMode()->SendMsg(130, 0, reinterpret_cast<int>(materials), 0, 0);
g_windowMgr.CloseWindow(79);

View file

@ -1,4 +1,5 @@
#include "UI/Items/UIMakeTargetProcessWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/ModeDragState.h"
#include "Client/Mode/ModeMgr.h"
@ -172,12 +173,12 @@ void UIMakeTargetProcessWnd::OnLBtnDown(int x, int y) {
// FUNCTION: fn_13617
int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 40:
case UM_SETCURITEM:
this->makeType = static_cast<int>(a);
this->Invalidate();
return 0;
case 75: {
case UM_CLEAR_ITEM: {
const char* name = reinterpret_cast<const char*>(a);
for (int index = 2; index >= 0; --index) {
ITEM_INFO& material = this->materials[index];
@ -192,17 +193,17 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
return 0;
}
case 6: {
case UM_COMMAND: {
const int response = static_cast<int>(a);
this->RecordResponse(response, b, c, d);
switch (response) {
case 184:
case ID_OK:
g_modeMgr.GetGameMode()->SendMsg(130, this->makeType, reinterpret_cast<int>(this->materials), 0, 0);
g_windowMgr.CloseWindow(80);
return 0;
case 185: {
case ID_CANCEL: {
g_modeMgr.GetGameMode()->SendMsg(130, 0, reinterpret_cast<int>(this->materials), 0, 0);
bool restored = false;
for (int index = 0; index < 3; ++index) {

View file

@ -1,4 +1,5 @@
#include "UI/Items/UISwapEquipmentWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/InputCharset.h"
#include "Client/Mode/CGameMode.h"
@ -189,15 +190,15 @@ void UISwapEquipmentWnd::OnRBtnDown(int x, int y) {
// FUNCTION: fn_10401
int UISwapEquipmentWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 0xB9:
case ID_CANCEL:
g_session.m_swapEquipmentMode = 0;
if (g_windowMgr.unknown_01E0) {
g_windowMgr.unknown_01E0->SendMsg(nullptr, 6, 0x1FC, 0, 0, 0);
}
break;
case 0xC9:
case ID_CLOSE:
g_windowMgr.CloseWindow(0x128);
return 1;
case 0x1FC:
@ -219,7 +220,7 @@ int UISwapEquipmentWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
return 1;
}
break;
case 60:
case UM_REFRESH:
this->Invalidate();
this->InvalidateChildren();
return 1;

View file

@ -1,4 +1,5 @@
#include "UI/Items/UIWeaponRefineWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/InputCharset.h"
#include "Client/Mode/ModeMgr.h"
@ -69,7 +70,7 @@ int UIWeaponRefineWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
ITEM_INFO item;
switch (message) {
case 31: {
case UM_ADDITEM: {
const int itemId = static_cast<int>(a);
this->itemIds.push_back(itemId);
this->indices.push_back(b);
@ -81,20 +82,20 @@ int UIWeaponRefineWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
return 0;
}
case 18:
case UM_UPPUSH:
this->m_list->SendMsg(nullptr, 18, 0, 0, 0, 0);
return 0;
case 19:
case UM_DOWNPUSH:
this->m_list->SendMsg(nullptr, 19, 0, 0, 0, 0);
return 0;
case 6: {
case UM_COMMAND: {
const int response = static_cast<int>(a);
this->RecordResponse(response, b, c, this->m_list->selected);
switch (response) {
case 184: {
case ID_OK: {
if (g_replayAnimationScaling) {
this->m_list->selected = static_cast<int>(d);
this->m_list->Invalidate();
@ -116,7 +117,7 @@ int UIWeaponRefineWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s
}
break;
}
case 185:
case ID_CANCEL:
g_modeMgr.gameMode->SendMsg(182, -1, 0, 0, 0);
g_windowMgr.CloseWindow(111);
return 0;

View file

@ -1,3 +1,4 @@
#include "UI/Window/UIEnums.h"
#include "UI/Lists/UIComboBox.h"
#include "UI/Lists/UIListBoxID.h"
#include "UI/Lists/UIScrollBar.h"
@ -11,7 +12,7 @@ int UIComboBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
const int value = static_cast<int>(argument1);
switch (message) {
case 0:
case UM_DEFPUSH:
if (UIWindow* target = g_windowMgr.LookupWindow(this->targetId)) {
target->SendMsg(nullptr, 39, this->selected, 0, 0, 0);
}
@ -21,7 +22,7 @@ int UIComboBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
}
return 0;
case 18:
case UM_UPPUSH:
if (this->lines.size() == 0) {
return 0;
}
@ -36,7 +37,7 @@ int UIComboBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
}
break;
case 19:
case UM_DOWNPUSH:
if (this->lines.size() == 0) {
return 0;
}
@ -55,14 +56,14 @@ int UIComboBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
}
break;
case 31:
case UM_ADDITEM:
this->AddLine(reinterpret_cast<const char*>(argument1));
this->Invalidate();
return 0;
case 83:
case UM_SET_CALLER_WID:
this->targetId = value;
return 0;
case 40:
case UM_SETCURITEM:
this->selected = value;
if (value < 0) {
this->selected = 0;
@ -88,7 +89,7 @@ int UIComboBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
const int value = static_cast<int>(argument1);
switch (message) {
case 0:
case UM_DEFPUSH:
if (UIWindow* target = g_windowMgr.LookupWindow(this->targetId)) {
int extra = 0;
const auto found = this->unknown_00C4.find(this->selected);
@ -106,7 +107,7 @@ int UIComboBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
}
return 0;
case 18:
case UM_UPPUSH:
if (this->lines.size() == 0) {
return 0;
}
@ -121,7 +122,7 @@ int UIComboBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
}
break;
case 19:
case UM_DOWNPUSH:
if (this->lines.size() == 0) {
return 0;
}
@ -140,14 +141,14 @@ int UIComboBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
}
break;
case 31:
case UM_ADDITEM:
this->AddLine(reinterpret_cast<const char*>(argument1), static_cast<int>(argument2), static_cast<int>(argument3));
this->Invalidate();
return 0;
case 83:
case UM_SET_CALLER_WID:
this->targetId = value;
return 0;
case 40:
case UM_SETCURITEM:
this->selected = value;
if (value < 0) {
this->selected = 0;

View file

@ -1,3 +1,4 @@
#include "UI/Window/UIEnums.h"
#include "Client/Replay.h"
#include "UI/Window/WindowPolicy.h"
#include "Render/DeviceContext/DeviceContext.h"
@ -166,7 +167,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
const int value = static_cast<int>(a);
switch (message) {
case 6:
case UM_COMMAND:
if (value == 273) {
this->expanded = this->expanded == 0;
this->Resize(
@ -185,7 +186,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
}
return 0;
case 39:
case UM_COMBOBOX_SELECTED:
if (g_windowMgr.WindowPolicy(3, this->parent->geometry.id) == 0 ||
value < 0) {
return 0;
@ -195,7 +196,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
this->SendMsg(nullptr, 6, 273, 0, 0, 0);
this->parent->SendMsg(this, 39, value, 0, 0, 0);
return 0;
case 57:
case UM_CHANGEMSG:
if (value >= 0) {
this->label->SetText(this->list->lines[value].text.c_str(), 0);
this->Invalidate();
@ -213,7 +214,7 @@ int UIItemStoreComboBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
const int value = static_cast<int>(a);
switch (message) {
case 6:
case UM_COMMAND:
if (value == 273) {
this->expanded = this->expanded == 0;
@ -237,7 +238,7 @@ int UIItemStoreComboBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
return 0;
case 39:
case UM_COMBOBOX_SELECTED:
if (value < 0) {
return 0;
}

View file

@ -1,4 +1,5 @@
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/UIEnums.h"
#include "Render/DeviceContext/DeviceContext.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
@ -137,7 +138,7 @@ void UIComboBoxEx::Refresh() {
// FUNCTION: fn_11545
int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 0:
case UM_DEFPUSH:
if (UIWindow* target = g_windowMgr.LookupWindow(this->targetId)) {
target->SendMsg(nullptr, 39, this->selected, 0, 0, 0);
}
@ -148,7 +149,7 @@ int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
return 0;
case 18:
case UM_UPPUSH:
if (this->lines.size() == 0) {
return 0;
}
@ -165,7 +166,7 @@ int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
break;
case 19: {
case UM_DOWNPUSH: {
const unsigned count = static_cast<unsigned>(this->lines.size());
if (count == 0) {
@ -189,16 +190,16 @@ int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
break;
}
case 31:
case UM_ADDITEM:
this->AddLine(reinterpret_cast<const char*>(a), static_cast<unsigned>(b));
this->Invalidate();
return 0;
case 83:
case UM_SET_CALLER_WID:
this->targetId = static_cast<int>(a);
return 0;
case 40:
case UM_SETCURITEM:
this->selected = static_cast<int>(a);
if (this->selected < 0) {

View file

@ -1,4 +1,5 @@
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/UIEnums.h"
#include "Render/DeviceContext/DeviceContext.h"
#include "Render/Text/TextContext.h"
#include "Resource/Bitmap/BitmapResource.h"
@ -352,8 +353,8 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
const int value = static_cast<int>(argument1);
switch (message) {
case 19:
case 40: {
case UM_DOWNPUSH:
case UM_SETCURITEM: {
this->selected = message == 19 ? (this->selected + 1) : value;
if (message == 40 && this->selected < 0) {
@ -384,7 +385,7 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
break;
}
case 18:
case UM_UPPUSH:
this->selected = (this->selected - 1);
if (this->selected < 0) {
@ -397,9 +398,9 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->topLine;
const int visible = this->geometry.height / this->lineHeight;
const int delta = message == 9 ? (1 - visible) : message == 10 ? (visible - 1) : value;
@ -426,9 +427,9 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
return (this->topLine - previous);
}
case 8:
case 11:
case 12: {
case UM_SCROLLHORZ:
case UM_SCROLLHORZPAGEUP:
case UM_SCROLLHORZPAGEDOWN: {
const int previous = this->horizontalOffset;
const int delta = message == 11 ? -15 : message == 12 ? 15 : value;
this->horizontalOffset = (previous + delta);
@ -454,7 +455,7 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
return (this->horizontalOffset - previous);
}
case 98:
case UM_TEXT_LBTN_UP:
if (argument3 > 0) {
if (UIWindow* window = g_windowMgr.LookupWindow(12)) {
window->SendMsg(nullptr, 24, argument3, 0, 0, 0);

View file

@ -1,4 +1,5 @@
#include "Render/DeviceContext/DeviceContext.h"
#include "UI/Window/UIEnums.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/SkinPalette.h"
@ -186,7 +187,7 @@ int UIListBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
const int value = static_cast<int>(a);
switch (message) {
case 40:
case UM_SETCURITEM:
this->selected = value;
if (this->selected < 0) {
@ -207,7 +208,7 @@ int UIListBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
break;
case 18:
case UM_UPPUSH:
if (--this->selected < 0) {
this->selected = 0;
}
@ -218,7 +219,7 @@ int UIListBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
break;
case 19:
case UM_DOWNPUSH:
++this->selected;
if (static_cast<unsigned>(this->selected) > this->lines.size() - 1) {
@ -231,9 +232,9 @@ int UIListBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->topLine;
const int visible = this->geometry.height / this->lineHeight;
const int delta = message == 9 ? (1 - visible) : message == 10 ? (visible - 1) : value;
@ -263,9 +264,9 @@ int UIListBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
return (this->topLine - previous);
}
case 8:
case 11:
case 12: {
case UM_SCROLLHORZ:
case UM_SCROLLHORZPAGEUP:
case UM_SCROLLHORZPAGEDOWN: {
const int previous = this->horizontalOffset;
const int delta = message == 11 ? -15 : message == 12 ? 15 : value;
this->horizontalOffset = previous + delta;

View file

@ -1,4 +1,5 @@
#include "UI/Lists/UIListBoxID.h"
#include "UI/Window/UIEnums.h"
#include "UI/Lists/UIScrollBar.h"
@ -61,7 +62,7 @@ void UIComboBoxID::OnCreate(int width, int height) {
// FUNCTION: fn_11554
int UIListBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 40:
case UM_SETCURITEM:
this->selected = argument1;
if (this->selected < 0) {
this->selected = 0;
@ -78,7 +79,7 @@ int UIListBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
this->Invalidate();
this->Refresh();
return 0;
case 18:
case UM_UPPUSH:
--this->selected;
if (this->selected < 0) {
this->selected = 0;
@ -89,7 +90,7 @@ int UIListBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
this->Invalidate();
this->Refresh();
return 0;
case 19:
case UM_DOWNPUSH:
++this->selected;
if (static_cast<std::size_t>(this->selected) > this->lines.size() - 1) {
this->selected = static_cast<int>(this->lines.size() - 1);
@ -100,9 +101,9 @@ int UIListBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
this->Invalidate();
this->Refresh();
return 0;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->topLine;
if (message == 9) {
this->topLine = previous - this->geometry.height / this->lineHeight + 1;
@ -129,9 +130,9 @@ int UIListBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1,
}
return this->topLine - previous;
}
case 8:
case 11:
case 12: {
case UM_SCROLLHORZ:
case UM_SCROLLHORZPAGEUP:
case UM_SCROLLHORZPAGEDOWN: {
const int previous = this->horizontalOffset;
int delta = argument1;
if (message == 11) {

View file

@ -1,4 +1,5 @@
#include "Network/TextEncoding.h"
#include "UI/Window/UIEnums.h"
#include "Render/Text/FontCache.h"
#include "Client/Mode/ModeMgr.h"
#include "Render/DeviceContext/DeviceContext.h"
@ -248,40 +249,40 @@ void UIScrollBar::OnLBtnDown(int x, int y) {
switch (this->vertical) {
case 0:
switch (part) {
case 0:
case SB_UPBTN:
this->parent->SendMsg(this, 8, -this->horizontalStep, 0, 0, 0);
break;
case 1:
case SB_UPPAGE:
this->parent->SendMsg(this, 11, 0, 0, 0, 0);
break;
case 2:
case SB_THUMB:
g_windowMgr.SetCapture(this);
this->state = 6;
break;
case 3:
case SB_DNPAGE:
this->parent->SendMsg(this, 12, 0, 0, 0, 0);
break;
case 4:
case SB_DNBTN:
this->parent->SendMsg(this, 8, this->horizontalStep, 0, 0, 0);
break;
}
break;
case 1:
switch (part) {
case 0:
case SB_UPBTN:
this->parent->SendMsg(this, 7, -this->verticalStep, 0, 0, 0);
break;
case 1:
case SB_UPPAGE:
this->parent->SendMsg(this, 9, 0, 0, 0, 0);
break;
case 2:
case SB_THUMB:
g_windowMgr.SetCapture(this);
this->state = 6;
break;
case 3:
case SB_DNPAGE:
this->parent->SendMsg(this, 10, 0, 0, 0, 0);
break;
case 4:
case SB_DNBTN:
this->parent->SendMsg(this, 7, this->verticalStep, 0, 0, 0);
break;
}
@ -318,18 +319,18 @@ void UIScrollBar::OnMouseMove(int x, int y) {
const int previous = this->state;
switch (this->Part(x, y)) {
case -1:
case 1:
case 3:
case SB_NULL:
case SB_UPPAGE:
case SB_DNPAGE:
this->state = 0;
break;
case 0:
case SB_UPBTN:
this->state = 1;
break;
case 2:
case SB_THUMB:
this->state = 3;
break;
case 4:
case SB_DNBTN:
this->state = 2;
break;
default:
@ -1469,14 +1470,14 @@ void UIChatHisBox::Paint() {
// FUNCTION: fn_11563
int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 0:
case UM_DEFPUSH:
if (sender == this->edit && this->editNode) {
this->SendMsg(nullptr, 110, 0, 1, 0, 0);
}
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
this->HideNodes(this->root->children);
const int previous = this->unknown_00A8;
const int visible = this->geometry.height / this->itemHeight;
@ -1505,25 +1506,25 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int
}
return this->unknown_00A8 - previous;
}
case 18:
case UM_UPPUSH:
if (this->verticalOverflow) {
this->SendMsg(this->verticalBar, 7, -1, 0, 0, 0);
}
break;
case 19:
case UM_DOWNPUSH:
if (this->verticalOverflow) {
this->SendMsg(this->verticalBar, 7, 1, 0, 0, 0);
}
break;
case 97:
case UM_TEXT_LBTN_DblClk:
this->unknown_0088 = reinterpret_cast<UITreeNode*>(a);
if (a) {
this->parent->SendMsg(this, 97, a, sender->geometry.x + b, sender->geometry.height / 2 + sender->geometry.y, 0);
}
break;
case 98:
case 99:
case 100:
case UM_TEXT_LBTN_UP:
case UM_TEXT_RBTN_UP:
case UM_BMP_LBTN_UP:
this->unknown_008C = nullptr;
this->unknown_0090 = nullptr;
this->unknown_0088 = reinterpret_cast<UITreeNode*>(a);
@ -1561,14 +1562,14 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int
this->unknown_008C = nullptr;
this->unknown_0090 = nullptr;
break;
case 107:
case UM_BEGIN_DRAG_BTN:
this->unknown_008C = reinterpret_cast<UITreeNode*>(a);
this->unknown_0088 = reinterpret_cast<UITreeNode*>(a);
if (this->unknown_008C->draggable == 0) {
this->unknown_008C = nullptr;
}
break;
case 108:
case UM_MOUSE_HOVER_BTN:
g_modeMgr.gameMode->SetCursorAction(0);
if (this->unknown_008C && this->unknown_008C->id != a) {
UITreeNode* target = reinterpret_cast<UITreeNode*>(a);
@ -1580,7 +1581,7 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int
this->Invalidate();
}
break;
case 109:
case UM_END_DRAG_BTN:
if (sender == this->parent) {
this->unknown_0090 = nullptr;
}
@ -1616,7 +1617,7 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int
this->unknown_0090 = nullptr;
this->Invalidate();
break;
case 110:
case UM_CHANGE_TVITEM_TEXT:
if (b == 0) {
this->editNode = reinterpret_cast<UITreeNode*>(a);
this->edit->maximum = c > 361 ? 361 : static_cast<int>(c);

View file

@ -1,3 +1,4 @@
#include "UI/Window/UIEnums.h"
#include "UI/Lists/UITagListBox.h"
#include "Client/Input/InputCharset.h"
@ -320,27 +321,27 @@ int UITagListBox::DecodeCards(std::vector<int>& fields, const char* text, int& p
// FUNCTION: fn_13887
int UITagListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 18:
case UM_UPPUSH:
if (this->verticalOverflow) {
this->SendMsg(this->verticalBar, 7, -1, 0, 0, 0);
return 0;
}
break;
case 19:
case UM_DOWNPUSH:
if (this->verticalOverflow) {
this->SendMsg(this->verticalBar, 7, 1, 0, 0, 0);
return 0;
}
break;
case 29:
case UM_SETTEXT:
this->AppendText(argument1, argument2, argument3, argument4);
return 0;
case 7:
case 8:
case 9:
case 10:
case 11:
case 12: {
case UM_SCROLLVERT:
case UM_SCROLLHORZ:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN:
case UM_SCROLLHORZPAGEUP:
case UM_SCROLLHORZPAGEDOWN: {
UIListBox::SendMsg(sender, message, argument1, argument2, argument3, argument4);
const int offset = this->horizontalOffset;
for (unsigned int index = 0; index < this->m_tagWindows.size(); ++index) {
@ -357,7 +358,7 @@ int UITagListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1
}
break;
}
case 98:
case UM_TEXT_LBTN_UP:
this->OnTagClick(argument1, sender);
break;
default:

View file

@ -1,4 +1,5 @@
#include "Render/Renderer.h"
#include "UI/Window/UIEnums.h"
#include "UI/Menu/UIMenuIconWnd.h"
#include "Client/Application/ApplicationWindow.h"
@ -137,9 +138,9 @@ void UIMenuIconWnd::OnCreate(int width, int height) {
this->unknown_00B4[ids[index]] = icon;
switch (ids[index]) {
case 192:
case 194:
case 196:
case ID_STATUS:
case ID_ITEMS:
case ID_SKILL:
case 473:
case 476: {
UIMenuIcon* badge = new UIMenuIcon();
@ -242,30 +243,30 @@ void UIMenuIcon::OnMouseMove(int x, int y) {
int message = 4698;
bool known = true;
switch (this->geometry.id) {
case 192:
case ID_STATUS:
behaviorId = 11;
message = 105;
break;
case 193:
message = 265;
break;
case 194:
case ID_ITEMS:
behaviorId = 8;
message = 106;
break;
case 195:
case ID_EQUIP:
behaviorId = 10;
message = 104;
break;
case 196:
case ID_SKILL:
behaviorId = 37;
message = 283;
break;
case 199:
case ID_FRIEND:
behaviorId = 69;
message = 103;
break;
case 219:
case ID_MAP:
behaviorId = 140;
message = 2859;
break;
@ -363,7 +364,7 @@ int UIMenuIconWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
if (message == 6) {
if (!Replay::Instance().AllowsEvent(argument1)) {
switch (argument1) {
case 201:
case ID_CLOSE:
g_session.m_showMenuIcon = false;
this->Invalidate();
break;
@ -380,19 +381,19 @@ int UIMenuIconWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
this->Invalidate();
break;
}
case 192:
case ID_STATUS:
this->ToggleWindow(11);
break;
case 195:
case ID_EQUIP:
this->ToggleWindow(10);
break;
case 194:
case ID_ITEMS:
this->ToggleWindow(8);
break;
case 196:
case ID_SKILL:
this->ToggleWindow(37);
break;
case 199:
case ID_FRIEND:
this->ToggleWindow(69);
break;
case 373:
@ -401,7 +402,7 @@ int UIMenuIconWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument
case 361:
this->ToggleWindow(10008);
break;
case 219:
case ID_MAP:
this->ToggleWindow(140);
break;
case 430:

View file

@ -1,4 +1,5 @@
#include "Contents/MessageTable.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/Language.h"
#include "Contents/Party/AdventurerAgencyMgr.h"
#include "Contents/UserData/NormalItemSlots.h"
@ -464,7 +465,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
const int value = static_cast<int>(a);
switch (message) {
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<AdvenPartyBoardWndInfo*>(a);
if (!this->saved->IsValid()) {
@ -473,18 +474,18 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
this->Move(this->saved->x, this->saved->y);
return 0;
case 60:
case UM_REFRESH:
this->RefreshRows();
return 0;
case 165:
this->UpdatePagination();
return 0;
case 6:
case UM_COMMAND:
switch (value) {
case 363:
case ID_RESET:
this->ResetSearch();
break;
case 246:
case ID_PREV:
this->page = (this->page - 1);
if (this->searching == 1) {
@ -494,7 +495,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
}
break;
case 218:
case ID_NEXT:
this->page = (this->page + 1);
DisableButton(this->previous, 1);
this->previous->Invalidate();
@ -511,7 +512,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
case 365:
this->Search(static_cast<int>(c));
break;
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(324);
break;
case 379: {
@ -571,7 +572,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
}
return 0;
case 39:
case UM_COMBOBOX_SELECTED:
if (sender == this->types) {
this->selectedType = value;
}

View file

@ -1,4 +1,5 @@
#include "Client/Session.h"
#include "UI/Window/UIEnums.h"
#include "File/ShortcutFilename.h"
#include "Render/Renderer.h"
#include "UI/Window/UINewSelectCharWnd.h"
@ -151,9 +152,9 @@ void UIApplyForPartyWnd::OnMouseHover(int x, int y) {
// FUNCTION: fn_09313
int UIApplyForPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
switch (static_cast<int>(a)) {
case 201:
case ID_CLOSE:
g_windowMgr.CloseWindow(345);
break;
case 271:
@ -176,7 +177,7 @@ int UIApplyForPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
}
return 0;
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<ApplyForPartyWndInfo*>(a);
if (!this->saved->IsValid()) {

View file

@ -1,4 +1,5 @@
#include "UI/Party/UIMiniPartyWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/Mouse.h"
#include "Client/Mode/CGameMode.h"
#include "Client/Mode/ModeMgr.h"
@ -156,7 +157,7 @@ void UIMiniPartyInfoWnd::OnRBtnUp(int, int) {
// FUNCTION: fn_07735
int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 23: {
case UM_REFRESHITEM: {
if (this->m_owner->GetMember().valid && !this->m_owner->GetMember().valid) {
return 0;
}
@ -196,7 +197,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
this->m_gauge->SetValues(current, maximum);
return 0;
}
case 49:
case UM_MAKEMENU:
this->m_entries.clear();
if (g_windowMgr.unknown_0210) {
g_windowMgr.CloseWindow(18);
@ -240,7 +241,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
return 0;
}
return 0;
case 48:
case UM_MENU_SELECTED:
if (!this->m_owner->GetMember().valid) {
return 0;
}
@ -249,26 +250,26 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
return 0;
}
switch (this->m_entries[argument1].value) {
case 6:
case MENUID_SEND_MSG:
this->SendMsg(nullptr, 6, 231, 0, 0, 0);
return 0;
case 7:
case MENUID_TALKONLYTWO:
this->SendMsg(nullptr, 6, 232, 0, 0, 0);
return 0;
case 3:
case MENUID_QUERYINFO:
this->SendMsg(nullptr, 6, 233, 0, 0, 0);
return 0;
case 0:
case MENUID_EXPEL:
case 19:
this->SendMsg(nullptr, 6, 235, 0, 0, 0);
return 0;
case 9:
case MENUID_LEAVE:
this->SendMsg(nullptr, 6, 236, 0, 0, 0);
return 0;
case 20:
case MENUID_MAKE_WHISPER_WINDOW:
this->SendMsg(nullptr, 71, 0, 0, 0, 0);
return 0;
case 5:
case MENUID_INVITE_IN_PARTY:
if (this->m_owner->m_cell != -1 && this->m_owner->GetMember().valid) {
g_modeMgr.gameMode->SendMsg(59, reinterpret_cast<int>(this->m_owner->GetMember().name.c_str()), 0, 0, 0);
return 0;
@ -302,15 +303,15 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
break;
}
return 0;
case 6:
case UM_COMMAND:
switch (argument1) {
case 231:
case ID_SENDMSG:
if (!g_session.m_lockMouse) {
this->m_owner->GetMember();
return 0;
}
break;
case 232:
case ID_TALK:
if (!g_session.m_lockMouse) {
if (this->m_owner->GetMember().valid && !(this->m_owner->GetMember().name == g_session.DecodePlayerName())) {
const char* group;
@ -327,13 +328,13 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
}
}
break;
case 233:
case ID_FRIEND_INFO:
if (!g_session.m_lockMouse && this->m_owner->GetMember().valid) {
g_windowMgr.Confirm(LookupMessage(191), 0, true, false, 0, "Message", 280, 120, 0);
return 0;
}
break;
case 234:
case ID_PARTY_SETTING:
if (!g_session.m_lockMouse) {
if (g_windowMgr.unknown_042C) {
g_windowMgr.CloseWindow(208);
@ -352,7 +353,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
}
}
break;
case 235:
case ID_DELETE_FRIEND:
if (!g_session.m_lockMouse && this->m_owner->GetMember().valid) {
if (!(this->m_owner->GetMember().name == g_session.DecodePlayerName())) {
if (g_windowMgr.Confirm(LookupMessage(363), 2, false, false, 0, "Message", 280, 120, 0) == 187) {
@ -362,7 +363,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg
}
}
break;
case 236:
case ID_LEAVE:
if (!g_session.m_lockMouse) {
if (this->m_owner->GetMember().valid && this->m_owner->GetMember().name == g_session.DecodePlayerName()) {
if (g_windowMgr.Confirm(LookupMessage(357), 2, false, false, 0, "Message", 280, 120, 0) == 187) {
@ -427,7 +428,7 @@ void UIMiniPartyWnd::OnLBtnUp(int x, int y) {
// FUNCTION: fn_07744
int UIMiniPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 23: {
case UM_REFRESHITEM: {
const MessengerMember* member = reinterpret_cast<const MessengerMember*>(argument1);
if (member && member->valid) {
this->m_member = *member;
@ -437,13 +438,13 @@ int UIMiniPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
}
return 0;
}
case 6:
case UM_COMMAND:
if (argument1 == 34 && this->m_member.accountId == static_cast<std::uint32_t>(argument2) && this->m_member.offline == 0 && this->m_infoWnd) {
this->m_infoWnd->SendMsg(sender, message, 34, argument2, argument3, argument4);
this->InvalidateChildren();
}
return 0;
case 14: {
case UM_RESIZE: {
if (argument1 != 7) {
return 0;
}
@ -504,10 +505,10 @@ int UIMiniPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
}
return 0;
}
case 48:
case UM_MENU_SELECTED:
this->m_infoWnd->SendMsg(sender, message, argument1, argument2, argument3, argument4);
return 0;
case 49:
case UM_MAKEMENU:
if (this->m_infoWnd) {
this->m_infoWnd->SendMsg(sender, message, argument1, argument2, argument3, argument4);
}

View file

@ -1,4 +1,5 @@
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/UIEnums.h"
#include "Client/Input/InputCharset.h"
#include "Contents/MessageTable.h"
#include "Resource/TextureNames.h"
@ -255,13 +256,13 @@ void UIRegisterPartyWnd::Paint() {
// FUNCTION: fn_09314
int UIRegisterPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 39:
case UM_COMBOBOX_SELECTED:
if (sender == this->types) {
this->selectedType = static_cast<int>(a);
}
return 0;
case 34:
case UM_SETINFO:
this->saved = reinterpret_cast<RegisterPartyWndInfo*>(a);
if (!this->saved->IsValid()) {
@ -270,9 +271,9 @@ int UIRegisterPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
this->Move(this->saved->x, this->saved->y);
return 0;
case 6:
case UM_COMMAND:
switch (a) {
case 201:
case ID_CLOSE:
break;
case 564:
case 565:

View file

@ -1,4 +1,5 @@
#include "Client/Mode/CMode.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/MessageTable.h"
#include "Client/Mode/ModeEvents.h"
@ -97,9 +98,9 @@ void UIRequestJoinPartyWnd::Paint() {
// FUNCTION: fn_09315
int UIRequestJoinPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
switch (a) {
case 201:
case ID_CLOSE:
this->SendMsg(nullptr, 6, 542, 0, 0, 0);
break;
case 541:
@ -119,7 +120,7 @@ int UIRequestJoinPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
}
return 0;
case 56: {
case UM_SET_JOIN_PARTY_MSG: {
const auto& request = *reinterpret_cast<const PartyJoinRequest*>(a);
this->characterId = request.characterId;
this->level = request.job;

View file

@ -1,4 +1,5 @@
#include "UI/Chat/UINewChatWnd.h"
#include "UI/Window/UIEnums.h"
#include "UI/Quest/UIQuestDisplay.h"
#include "Client/Input/Mouse.h"
#include "Contents/MessageTable.h"
@ -209,7 +210,7 @@ void UIQuestDisplay::StoreInfo() {
// FUNCTION: fn_12947
int UIQuestDisplay::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 34: {
case UM_SETINFO: {
this->m_visibleSetting = reinterpret_cast<int*>(argument1);
QuestDisplayInfo* info = reinterpret_cast<QuestDisplayInfo*>(argument1);
if (!info->IsValid()) {
@ -218,7 +219,7 @@ int UIQuestDisplay::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
this->Show(*this->m_visibleSetting);
break;
}
case 48: {
case UM_MENU_SELECTED: {
int index = 0;
const auto end = g_renewQuestMgr->m_ongoingQuests.end();
for (auto it = g_renewQuestMgr->m_ongoingQuests.begin(); it != end; ++it, ++index) {
@ -242,7 +243,7 @@ int UIQuestDisplay::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
}
break;
}
case 49: {
case UM_MAKEMENU: {
this->m_menuItems.clear();
if (g_windowMgr.unknown_0210 != 0) {
this->Show(0);

View file

@ -1,4 +1,5 @@
#include "UI/Quest/UIRenewQuestUI.h"
#include "UI/Window/UIEnums.h"
#include "Utility/EncryptedName.h"
#include "Client/Replay.h"
#include "Contents/MessageTable.h"
@ -1082,7 +1083,7 @@ void RenewQuestUI::CUIQuestItem::SetSelected(bool selected) {
// FUNCTION: fn_16632
int CUIRenewQuestUI::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
switch (message) {
case 6:
case UM_COMMAND:
if (a == 0xD5) {
const bool checked = b != 0;
this->checkBox->checked = checked;
@ -1093,7 +1094,7 @@ int CUIRenewQuestUI::SendMsg(UIWindow* sender, int message, std::intptr_t a, std
}
}
break;
case 0x16:
case UM_TAB:
this->tab->SelectIndex(static_cast<int>(std::log2(static_cast<double>(a))));
break;
}

View file

@ -1,3 +1,4 @@
#include "UI/Window/UIEnums.h"
#include "Client/Mode/CMode.h"
#include "Client/Mode/ModeMgr.h"
#include "Render/DeviceContext/DCSurface.h"
@ -252,12 +253,12 @@ void UIOngoingQuestScrollWnd::RefreshHuntTexts() {
int UIOngoingQuestScrollWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2,
std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 0xC9) {
g_windowMgr.CloseWindow(0x142);
}
break;
case 0x17:
case UM_REFRESHITEM:
this->RefreshHuntTexts();
break;
}
@ -635,12 +636,12 @@ void UIRenewDetailQuestInfoWnd::OnLBtnDown(int x, int y) {
int UIRenewDetailQuestInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2,
std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 0xC9) {
g_windowMgr.CloseWindow(0x142);
}
return 0;
case 0x17:
case UM_REFRESHITEM:
if (this->m_recommended) {
this->m_recommendedWnd->SendMsg(this, 0x17, 0, 0, 0, 0);
} else {
@ -1061,12 +1062,12 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
}
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 0xC9:
case ID_CLOSE:
g_windowMgr.CloseWindow(0x141);
return 0;
case 0xD5:
case ID_CHECK:
if (g_windowMgr.window_0428) {
g_windowMgr.window_0428->Show(argument2);
return 0;
@ -1110,7 +1111,7 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
break;
}
break;
case 0x16:
case UM_TAB:
if (this->m_tab != argument1) {
this->m_tab = argument1;
if (argument1 < 0) {
@ -1156,7 +1157,7 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
this->Invalidate();
}
break;
case 0x17:
case UM_REFRESHITEM:
if (argument2 != 0) {
bool found = false;
for (int tab = 0; tab <= 2; ++tab) {
@ -1176,9 +1177,9 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
this->UpdateScroll();
this->Invalidate();
break;
case 7:
case 9:
case 10: {
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN: {
const int previous = this->m_scroll;
int delta = argument1;
if (message == 9) {

View file

@ -1,4 +1,5 @@
#include "Render/Text/FontCache.h"
#include "UI/Window/UIEnums.h"
#include "Render/Text/TextContext.h"
#include "UI/Rodex/UIRodexComposeWnd.h"
#include "Client/Mode/CMode.h"
@ -311,7 +312,7 @@ std::int64_t UIRodexComposeWnd::GetZeny() {
// FUNCTION: fn_10013
int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 201) {
g_windowMgr.CloseWindow(264);
} else if (argument1 == 213) {
@ -404,7 +405,7 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu
g_modeMgr.GetGameMode()->SendMsg(0xC0, reinterpret_cast<int>(&mail), 0, 0, 0);
}
return 0;
case 23:
case UM_REFRESHITEM:
this->m_items.clear();
for (int i = 0; i < 5; ++i) {
ITEM_INFO item = g_session.GetItem5C68(i);
@ -414,13 +415,13 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu
}
this->Invalidate();
return 0;
case 38: {
case UM_DROP: {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
g_modeMgr.GetGameMode()->SendMsg(0xC3, mode->drag.id, mode->drag.quantity, 0, 0);
g_modeMgr.GetGameMode()->SendMsg(0x12, 0, 0, 0, 0);
return 0;
}
case 98:
case UM_TEXT_LBTN_UP:
if (argument3 > 0) {
UIWindow* window = g_windowMgr.EnsureWindow(12);
if (window) {
@ -428,7 +429,7 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu
}
}
return 0;
case 104: {
case UM_DECITEM: {
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
g_modeMgr.GetGameMode()->SendMsg(0x126, mode->drag.id, mode->drag.quantity, 0, 0);
g_modeMgr.GetGameMode()->SendMsg(0x12, 0, 0, 0, 0);

View file

@ -1,4 +1,5 @@
#include "UI/Rodex/UIRodexInboxWnd.h"
#include "UI/Window/UIEnums.h"
#include "Contents/MessageTable.h"
#include "Client/Mode/CGameMode.h"
@ -880,9 +881,9 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
}
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 0xD7:
case ID_RADIOBTN:
if (argument2 == 0x141) {
for (int i = 0; i < 2; ++i) {
UIRadioBtn* radio = this->unknown_01C0[i];
@ -972,11 +973,11 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
}
break;
case 0xC9:
case ID_CLOSE:
g_windowMgr.CloseWindow(0x107);
break;
case 0xD3:
case ID_DELETE:
if (this->unknown_01D4 == 1) {
std::vector<RodexMailEntry> selected;
for (int i = 0; i < 6; ++i) {
@ -1034,7 +1035,7 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
}
break;
case 0x141:
case ID_SEARCH:
if (this->unknown_01C0[0]->geometry.unknown_0030 == 1) {
this->SearchByTitle(this->unknown_01C8->Text());
} else if (this->unknown_01C0[1]->geometry.unknown_0030 == 1) {
@ -1197,11 +1198,11 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
}
break;
case 0x3C:
case UM_REFRESH:
this->Invalidate();
break;
case 0x62:
case UM_TEXT_LBTN_UP:
if (argument1 == 0x142) {
if (g_rodexMailStore->unknown_0010 == MAIL_INBOX_NORMAL) {
std::map<std::int64_t, RodexMail>::iterator mail = g_rodexMailStore->m_mails0.find(argument2);
@ -1224,14 +1225,14 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume
}
break;
case 0x17:
case UM_REFRESHITEM:
this->RefreshMailLists();
this->InitializeMailActions();
this->SetButtonsDisabled(0);
this->Invalidate();
break;
case 0:
case UM_DEFPUSH:
if (this->unknown_01C8 == sender) {
this->SendMsg(this->unknown_01CC, 6, 0x141, 0, 0, 0);
}

View file

@ -1,3 +1,4 @@
#include "UI/Window/UIEnums.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/Items/RuneSystem.h"
#include "Contents/MessageTable.h"
@ -520,7 +521,7 @@ void UIRuneSet_Info::UpdateActivation() {
// FUNCTION: fn_10221
int UIRuneSetList::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t, std::intptr_t, std::intptr_t) {
switch (message) {
case 0x3C:
case UM_REFRESH:
if (argument1 > 0 && this->total != argument1) {
this->SetRange(std::max(argument1 - this->visible, 0), this->visible, argument1);
this->SetPosition(0);
@ -541,7 +542,7 @@ int UIRuneSetReWard::SendMsg(
UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4
) {
switch (message) {
case 0x22:
case UM_SETINFO:
if (static_cast<unsigned int>(argument1) <= 2 && argument2) {
this->m_texts[argument1] = reinterpret_cast<const char*>(argument2);
}
@ -572,15 +573,15 @@ int UIRuneSetReWard::SendMsg(
// FUNCTION: fn_10224
int UIRuneSystemTab::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t, std::intptr_t, std::intptr_t) {
switch (message) {
case 0x4E:
case UM_SET_BITMAP:
this->m_label = reinterpret_cast<const char*>(argument1);
this->Invalidate();
return 0;
case 0x16:
case UM_TAB:
this->m_count = argument1;
this->Invalidate();
return 0;
case 0x0D:
case UM_SETSTATE:
this->geometry.unknown_0030 = argument1;
this->Invalidate();
this->parent->SendMsg(this, 0x16, this->geometry.unknown_0030, 0, 0, 0);
@ -594,14 +595,14 @@ int UIRuneSystemTab::SendMsg(UIWindow*, int message, std::intptr_t argument1, st
// FUNCTION: fn_10227
int UIRuneSystem_tagListWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t, std::intptr_t) {
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 0x13C:
case ID_PREV_PAGE:
--this->m_firstTag;
this->m_firstTag = this->m_firstTag < 0 ? 0 : this->m_firstTag;
this->Invalidate();
break;
case 0x13D: {
case ID_NEXT_PAGE: {
++this->m_firstTag;
const int first = this->m_firstTag;
if (g_runeSystemMgr->GetTagCount() < first + 10) {
@ -906,12 +907,12 @@ void UIRuneSystemWnd::SelectTab() {
// FUNCTION: fn_10229
int UIRune_Info::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 0x23C && (!this->parent || this->parent->SendMsg(this, 0x6A, 3000, 0, 0, 0) != 0) && this->m_rune) {
g_runeSystemMgr->SendRequest(0xBCE, this->m_rune, -1);
}
[[fallthrough]];
case 0x3C:
case UM_REFRESH:
this->m_activeWnd->Invalidate();
this->m_activateButton->Invalidate();
reinterpret_cast<UIRuneSet_Info*>(this)->UpdateActivation();
@ -1023,7 +1024,7 @@ void UIRuneSystemWnd::Paint() {
// FUNCTION: fn_10226
int UIRuneSystem_DecomResultWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t, std::intptr_t, std::intptr_t) {
switch (message) {
case 0x0D: {
case UM_SETSTATE: {
const RuneDecomResultPacket* packet = reinterpret_cast<const RuneDecomResultPacket*>(argument1);
this->m_total = 0;
for (int index = 0; index < 8; ++index) {
@ -1034,7 +1035,7 @@ int UIRuneSystem_DecomResultWnd::SendMsg(UIWindow*, int message, std::intptr_t a
this->Invalidate();
break;
}
case 6:
case UM_COMMAND:
if (argument1 == 0xB8) {
g_windowMgr.CloseWindow(0x16A);
}
@ -1586,7 +1587,7 @@ UIRune_Info::UIRune_Info() : UIWindow(0), m_rune(nullptr) {
// FUNCTION: fn_10223
int UIRuneSet_Info::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 0x16:
case UM_TAB:
if (!this->m_runeSet) {
break;
}
@ -1598,12 +1599,12 @@ int UIRuneSet_Info::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
}
this->Refresh();
break;
case 0x3C:
case UM_REFRESH:
this->Refresh();
break;
case 6:
case UM_COMMAND:
switch (argument1) {
case 0xC3:
case ID_EQUIP:
if (this->m_runeSet && (!this->parent || this->parent->SendMsg(this, 0x6A, 1500, 0, 0, 0) != 0)) {
this->parent->SendMsg(this, 0xAB, 0xC3, reinterpret_cast<std::intptr_t>(this->m_runeSet), 0, 0);
}
@ -1642,9 +1643,9 @@ int UIRuneSet_Info::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
break;
}
break;
case 7:
case 9:
case 10:
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN:
this->m_infoList->ScrollBy(argument1);
this->Invalidate();
break;
@ -2198,24 +2199,24 @@ void UIRune_Decom::Paint() {
// FUNCTION: fn_10225
int UIRuneSystemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
if (argument1 == 0xC9) {
g_windowMgr.CloseWindow(0x169);
}
break;
case 7:
case 9:
case 10:
case UM_SCROLLVERT:
case UM_SCROLLVERTPAGEUP:
case UM_SCROLLVERTPAGEDOWN:
if (this->m_lists[this->m_tab->geometry.unknown_0030]) {
this->m_lists[this->m_tab->geometry.unknown_0030]->ScrollBy(argument1);
this->Invalidate();
}
break;
case 0x16:
case UM_TAB:
g_windowMgr.CloseWindow(0x16A);
this->SelectTab();
break;
case 0x3C: {
case UM_REFRESH: {
UIRuneSetList* list = this->m_lists[this->m_tab->geometry.unknown_0030];
if (!list) {
break;

View file

@ -1,3 +1,4 @@
#include "UI/Window/UIEnums.h"
#include "UI/Window/UINewSelectCharWnd.h"
#include "Client/Session.h"
#include "Contents/UserData/NormalItemSlots.h"
@ -553,15 +554,15 @@ void UISeekPartyMBWnd::StoreInfo() {
// FUNCTION: fn_12757
int UISeekPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
switch (message) {
case 6:
case UM_COMMAND:
switch (argument1) {
case 201: {
case ID_CLOSE: {
std::int16_t packetType = 0x806;
GetRagConnection().Send(reinterpret_cast<const PacketLengths&>(GetRagConnection()).FixedLength(packetType), &packetType);
g_windowMgr.CloseWindow(170);
break;
}
case 202:
case ID_MINI:
if (this->m_minimized) {
this->Resize(this->geometry.width, this->unknown_01E0);
} else {
@ -581,7 +582,7 @@ int UISeekPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
break;
}
break;
case 34:
case UM_SETINFO:
this->m_saved = reinterpret_cast<SeekPartyWndInfo*>(argument1);
if (!this->m_saved->IsValid()) {
this->m_saved->Reset();

Some files were not shown because too many files have changed in this diff Show more