Maintenance: [forced, user-approved] Family G27 (resubmit of 10254 rebased on e235d90a; only conflict was the AsyncWorkMgr.h forward
Batch #10259 by ragnarok-clanker: forced by an admin (1 lower score(s), 11 changed function(s)); checked with 508 compiled unit(s), including every includer of Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Skills/SkillLevelRegistry.h, Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.h, Source/Contents/UserData/CharacterLinkedUserDataMgr.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl, Source/Contents/Skills/SkillLevelConfig.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/UI/Shortcuts/NormalItemSlotLoad.h. Deletes: Source/Contents/Skills/SkillLevelConfig.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/UI/Shortcuts/NormalItemSlotLoad.h
This commit is contained in:
parent
15ee30e2aa
commit
bd0ade90cd
16 changed files with 63 additions and 124 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#include "Contents/Skills/SkillInfo.h"
|
||||
#include "Client/Registry.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/Skills/SkillLevelRegistry.h"
|
||||
#include "Script/LuaScript.h"
|
||||
|
||||
|
|
@ -9,9 +11,9 @@
|
|||
|
||||
// OFFSET: 0x00A92370
|
||||
// FUNCTION: fn_17177
|
||||
void SkillLevelRegistry::Load() {
|
||||
void LoadSkillUseLevelRegistry() {
|
||||
char key[512];
|
||||
std::strcpy(key, this->baseKey);
|
||||
std::strcpy(key, g_subKey);
|
||||
std::strcat(key, "\\SkillUseLevelInfo");
|
||||
HKEY handle;
|
||||
|
||||
|
|
@ -30,11 +32,11 @@ void SkillLevelRegistry::Load() {
|
|||
DWORD size = sizeof(int);
|
||||
int value;
|
||||
char name[100] = {};
|
||||
const int character = this->character;
|
||||
const char* skill = CSkillInfo::IdName(this->script, id);
|
||||
const int character = g_session.unknown_0F50;
|
||||
const char* skill = CSkillInfo::IdName(*g_luaScript, id);
|
||||
std::sprintf(name, "%s%d", skill, character);
|
||||
|
||||
if (RegQueryValueExA(handle, name, nullptr, &type, reinterpret_cast<BYTE*>(&value), &size) != ERROR_SUCCESS || !CSkillInfo::UsesLevel(this->script, id)) {
|
||||
if (RegQueryValueExA(handle, name, nullptr, &type, reinterpret_cast<BYTE*>(&value), &size) != ERROR_SUCCESS || !CSkillInfo::UsesLevel(*g_luaScript, id)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -42,15 +44,15 @@ void SkillLevelRegistry::Load() {
|
|||
};
|
||||
|
||||
for (int id = 1; id < 7999; ++id) {
|
||||
this->useLevels[id] = read(id);
|
||||
g_session.m_skillBundle.SetUnknownValue(id, read(id));
|
||||
}
|
||||
|
||||
for (int id = 8000; id < 8061; ++id) {
|
||||
this->homunculusLevels[id - 8000] = read(id);
|
||||
g_session.SetHomunSkillLevel(id, read(id));
|
||||
}
|
||||
|
||||
for (int id = 8200; id < 8458; ++id) {
|
||||
this->otherLevels[id - 8200] = read(id);
|
||||
g_session.SetMercSkillLevel(id, read(id));
|
||||
}
|
||||
|
||||
RegCloseKey(handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue