Maintenance: [forced, user-approved] Family G15: remove ScriptOptions (reference view over g_session.m_hotkeyScript) and the unused G
Batch #10221 by ragnarok-clanker: forced by an admin (3 lower score(s), 7 changed function(s)); checked with 230 compiled unit(s), including every includer of Source/Client/Session.h, Source/Contents/Configuration/GameSettingsMgr.h, Source/Contents/Configuration/GraphicsConfiguration.h. Deletes: Source/Contents/Configuration/GraphicsConfiguration.h
This commit is contained in:
parent
be04fec77e
commit
e757db50e0
7 changed files with 70 additions and 165 deletions
|
|
@ -1,4 +1,3 @@
|
|||
#include "Contents/Configuration/ScriptOptions.h"
|
||||
#include "Script/LuaScript.h"
|
||||
#include "Utility/GuidParse.h"
|
||||
#include "Client/Session.h"
|
||||
|
|
@ -6,25 +5,25 @@
|
|||
|
||||
// OFFSET: 0x00E0A890
|
||||
// FUNCTION: fn_23800
|
||||
int ScriptOptions::Integer(const char* key, int fallback) {
|
||||
int CSession::GetOptionInteger(const char* key, int fallback) {
|
||||
int value = -1;
|
||||
this->script.Call("l_GetOptionValue", "s>d", key, &value);
|
||||
this->m_hotkeyScript->Call("l_GetOptionValue", "s>d", key, &value);
|
||||
return value == -1 ? fallback : value;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E0A950
|
||||
// FUNCTION: fn_23801
|
||||
std::string ScriptOptions::String(const char* key, const char* fallback) {
|
||||
std::string CSession::GetOptionString(const char* key, const char* fallback) {
|
||||
const char* value = nullptr;
|
||||
this->script.Call("l_GetOptionValue", "s>s", key, &value);
|
||||
this->m_hotkeyScript->Call("l_GetOptionValue", "s>s", key, &value);
|
||||
return !value || std::strcmp(value, "-1") == 0 ? fallback : value;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E0A760
|
||||
// FUNCTION: fn_23799
|
||||
GUID ScriptOptions::Guid(const char* key, const GUID& fallback) {
|
||||
GUID CSession::GetOptionGuid(const char* key, const GUID& fallback) {
|
||||
const char* value = nullptr;
|
||||
this->script.Call("l_GetOptionValue", "s>s", key, &value);
|
||||
this->m_hotkeyScript->Call("l_GetOptionValue", "s>s", key, &value);
|
||||
|
||||
if (value && std::strcmp(value, "-1") != 0) {
|
||||
GUID parsed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue