Decompile fn_17849 (ModeBaseEvents::Send)
Batch #1039 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_17849 ModeBaseEvents::Send: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Client/ModeBaseEvents.cpp
This commit is contained in:
parent
44f60ba6ca
commit
efee869d24
3 changed files with 78 additions and 0 deletions
44
Source/Client/ModeBaseEvents.cpp
Normal file
44
Source/Client/ModeBaseEvents.cpp
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#include "Client/ModeBaseEvents.h"
|
||||
#include "Client/Mode/ActiveGameMode.h"
|
||||
#include "Contents/Configuration/ServiceConfiguration.h"
|
||||
#include "Contents/Party/AdventurerAgencyMgr.h"
|
||||
#include "Contents/UserData/AccountLinkedUserDataMgr.h"
|
||||
#include "Contents/UserData/CharacterLinkedUserDataMgr.h"
|
||||
|
||||
#include <shellapi.h>
|
||||
|
||||
// OFFSET: 0x00AD7500
|
||||
// FUNCTION: fn_17849
|
||||
int ModeBaseEvents::Send(int event, const char* text, int, int, int) {
|
||||
if (event == 2) {
|
||||
g_accountLinkedUserDataMgr->Save(this->emotions, this->script, this->persistenceAccountId, this->renderSystem, this->token16, this->work);
|
||||
if (g_world.state != 1) {
|
||||
if (g_world.gameMode) {
|
||||
g_world.gameMode->running = 0;
|
||||
}
|
||||
} else if (g_world.gameMode) {
|
||||
g_characterLinkedUserDataMgr->Save(this->characterSave, this->token16, this->work);
|
||||
if (g_world.state != 1) {
|
||||
if (g_world.gameMode) {
|
||||
g_world.gameMode->running = 0;
|
||||
}
|
||||
} else if (g_world.gameMode) {
|
||||
g_adventurerAgencyMgr->RequestStop(this->agency, this->stopRecruiting);
|
||||
if (g_world.gameMode) {
|
||||
g_world.gameMode->running = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_serviceType == 11) {
|
||||
ShellExecuteA(this->window, "open", "http://www.ragnarok.co.in/index.php", nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
g_world.running = 0;
|
||||
} else if (event == 68) {
|
||||
this->transitionRequested = 1;
|
||||
if (text) {
|
||||
this->transitionName = text;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue