Maintenance: [forced, user-approved] Family G22: remove StoreBackupData, ItemTagRetirement/ItemTagRemoval, SoundMgrContext, JobInheri
Batch #10242 by ragnarok-clanker: forced by an admin (7 lower score(s), 33 changed function(s)); checked with 260 compiled unit(s), including every includer of Source/Client/Session.h, Source/Contents/Jobs/JobInheritance.h, Source/Contents/Sound/SoundMgr.h, Source/Contents/Store/MCStoreInfoBackup.h, Source/UI/Edit/ItemTagRetirement.h, Source/UI/Edit/UIItemTagCtrl.h, Source/UI/Shortcuts/ShortcutPainting.h, Source/UI/Shortcuts/UIQuickSlotWnd.h, Source/Contents/Configuration/OptionWriter.h, Source/Contents/Store/StoreBackupData.h. Deletes: Source/Contents/Configuration/OptionWriter.h, Source/Contents/Store/StoreBackupData.h
This commit is contained in:
parent
b2e04b8f13
commit
8a04248e21
21 changed files with 172 additions and 242 deletions
|
|
@ -51,56 +51,54 @@ const char g_playerNameKeyData[] = "가나다라마바사아자차카타파하
|
|||
// GLOBAL: gl_24649
|
||||
const char* g_playerNameKey = g_playerNameKeyData;
|
||||
|
||||
namespace {
|
||||
// OFFSET: 0x00DFBC00
|
||||
// FUNCTION: fn_23585
|
||||
bool IsTreeGroupTwo(int job) {
|
||||
if (job >= JT_RUNE_KNIGHT && job <= JT_MADOGEAR_B) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (job) {
|
||||
case JT_PIG_GENETIC:
|
||||
case JT_SHEEP_SURA:
|
||||
case JT_SHEEP_ARCB:
|
||||
case JT_FOX_SORCERER:
|
||||
case JT_FOX_WARLOCK:
|
||||
case JT_DOG_G_CROSS:
|
||||
case JT_DOG_CHASER:
|
||||
case JT_OSTRICH_MINSTREL:
|
||||
case JT_OSTRICH_WANDER:
|
||||
case JT_FOX_WARLOCK_B:
|
||||
case JT_SHEEP_ARCB_B:
|
||||
case JT_DOG_G_CROSS_B:
|
||||
case JT_FOX_SORCERER_B:
|
||||
case JT_OSTRICH_MINSTREL_B:
|
||||
case JT_OSTRICH_WANDER_B:
|
||||
case JT_SHEEP_SURA_B:
|
||||
case JT_PIG_GENETIC_B:
|
||||
case JT_DOG_CHASER_B:
|
||||
case JT_PIG_MECHANIC:
|
||||
case JT_OSTRICH_RANGER:
|
||||
case JT_LION_ROYAL_GUARD:
|
||||
case JT_LION_RUNE_KNIGHT:
|
||||
case JT_PIG_MECHANIC_B:
|
||||
case JT_OSTRICH_RANGER_B:
|
||||
case JT_LION_ROYAL_GUARD_B:
|
||||
case JT_LION_RUNE_KNIGHT_B:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
// OFFSET: 0x00DFBC00
|
||||
// FUNCTION: fn_23585
|
||||
__declspec(noinline) bool CSession::IsTreeGroupTwo(int job) const {
|
||||
if (job >= JT_RUNE_KNIGHT && job <= JT_MADOGEAR_B) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DFBCA0
|
||||
// FUNCTION: fn_23586
|
||||
bool IsTreeGroupThree(int job) {
|
||||
const auto value = static_cast<unsigned>(job);
|
||||
return value - JT_DRAGON_KNIGHT <= unsigned(JT_FOURTH_JOB_END - JT_DRAGON_KNIGHT) ||
|
||||
value - JT_SKY_EMPEROR <= unsigned(JT_UPPER_EXTENDED_JOB2_END - 1 - JT_SKY_EMPEROR) || job == JT_ALITEA || job == JT_ALITEA_RIDING;
|
||||
switch (job) {
|
||||
case JT_PIG_GENETIC:
|
||||
case JT_SHEEP_SURA:
|
||||
case JT_SHEEP_ARCB:
|
||||
case JT_FOX_SORCERER:
|
||||
case JT_FOX_WARLOCK:
|
||||
case JT_DOG_G_CROSS:
|
||||
case JT_DOG_CHASER:
|
||||
case JT_OSTRICH_MINSTREL:
|
||||
case JT_OSTRICH_WANDER:
|
||||
case JT_FOX_WARLOCK_B:
|
||||
case JT_SHEEP_ARCB_B:
|
||||
case JT_DOG_G_CROSS_B:
|
||||
case JT_FOX_SORCERER_B:
|
||||
case JT_OSTRICH_MINSTREL_B:
|
||||
case JT_OSTRICH_WANDER_B:
|
||||
case JT_SHEEP_SURA_B:
|
||||
case JT_PIG_GENETIC_B:
|
||||
case JT_DOG_CHASER_B:
|
||||
case JT_PIG_MECHANIC:
|
||||
case JT_OSTRICH_RANGER:
|
||||
case JT_LION_ROYAL_GUARD:
|
||||
case JT_LION_RUNE_KNIGHT:
|
||||
case JT_PIG_MECHANIC_B:
|
||||
case JT_OSTRICH_RANGER_B:
|
||||
case JT_LION_ROYAL_GUARD_B:
|
||||
case JT_LION_RUNE_KNIGHT_B:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DFBCA0
|
||||
// FUNCTION: fn_23586
|
||||
__declspec(noinline) bool CSession::IsTreeGroupThree(int job) const {
|
||||
const auto value = static_cast<unsigned>(job);
|
||||
return value - JT_DRAGON_KNIGHT <= unsigned(JT_FOURTH_JOB_END - JT_DRAGON_KNIGHT) ||
|
||||
value - JT_SKY_EMPEROR <= unsigned(JT_UPPER_EXTENDED_JOB2_END - 1 - JT_SKY_EMPEROR) || job == JT_ALITEA || job == JT_ALITEA_RIDING;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DFA600
|
||||
// FUNCTION: fn_23576
|
||||
bool CSession::IsNpcJob(int job) const {
|
||||
|
|
@ -664,33 +662,33 @@ bool __stdcall IsPlayerJob(int job) {
|
|||
|
||||
// OFFSET: 0x00E19110
|
||||
// FUNCTION: fn_23835
|
||||
int JobInheritance::Lookup(int job) {
|
||||
const int inherited = this->script.TableInteger("JobInheritTable", 0, job);
|
||||
const int replacement = this->script.TableInteger("JOB_INHERIT_LIST2", 0, inherited);
|
||||
int CSession::InheritedJob(int job) {
|
||||
const int inherited = this->m_hotkeyScript->TableInteger("JobInheritTable", 0, job);
|
||||
const int replacement = this->m_hotkeyScript->TableInteger("JOB_INHERIT_LIST2", 0, inherited);
|
||||
return replacement == -1 ? inherited : replacement;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E25B70
|
||||
// FUNCTION: fn_23907
|
||||
void JobInheritance::InitializeSkillTree(CPlayerSkillBundle& bundle, int job) {
|
||||
void CSession::InitializeSkillTree() {
|
||||
int count = 0;
|
||||
if (!this->script.Call("GetInheritJob", "d>d", job, &count) || count == -1) {
|
||||
if (!this->m_hotkeyScript->Call("GetInheritJob", "d>d", this->m_job, &count) || count == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
bundle.ClearGroups();
|
||||
bundle.ClearExtra();
|
||||
bundle.ClearLevelChanges();
|
||||
this->m_skillBundle.ClearGroups();
|
||||
this->m_skillBundle.ClearExtra();
|
||||
this->m_skillBundle.ClearLevelChanges();
|
||||
|
||||
for (int index = count; index > 0; --index) {
|
||||
const int inherited = this->Lookup(index);
|
||||
const int inherited = this->InheritedJob(index);
|
||||
int group = 1;
|
||||
if (inherited == JT_NOVICE || this->Lookup(index + 1) == JT_NOVICE || inherited == JT_DO_SUMMONER || inherited == JT_DO_SUMMONER_B) {
|
||||
if (inherited == JT_NOVICE || this->InheritedJob(index + 1) == JT_NOVICE || inherited == JT_DO_SUMMONER || inherited == JT_DO_SUMMONER_B) {
|
||||
group = 0;
|
||||
} else if (IsTreeGroupTwo(inherited) || inherited == JT_STAR_EMPEROR || inherited == JT_SOUL_REAPER || inherited == JT_STAR_EMPEROR_B ||
|
||||
} else if (this->IsTreeGroupTwo(inherited) || inherited == JT_STAR_EMPEROR || inherited == JT_SOUL_REAPER || inherited == JT_STAR_EMPEROR_B ||
|
||||
inherited == JT_SOUL_REAPER_B) {
|
||||
group = 2;
|
||||
} else if (IsTreeGroupThree(inherited)) {
|
||||
} else if (this->IsTreeGroupThree(inherited)) {
|
||||
group = 3;
|
||||
}
|
||||
|
||||
|
|
@ -713,7 +711,7 @@ void JobInheritance::InitializeSkillTree(CPlayerSkillBundle& bundle, int job) {
|
|||
break;
|
||||
}
|
||||
|
||||
this->script.Call("InitSkillTreeView", "dd", inherited, group);
|
||||
this->m_hotkeyScript->Call("InitSkillTreeView", "dd", inherited, group);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1833,10 +1831,10 @@ bool CSession::PlaySkillGroundEffect(int skillId, vector3d position) {
|
|||
// OFFSET: 0x00E2F9F0
|
||||
// FUNCTION: fn_24162
|
||||
int CSession::GetMaxBaseLevel(int job) const {
|
||||
if (IsTreeGroupThree(job) == true) {
|
||||
if (g_session.IsTreeGroupThree(job) == true) {
|
||||
return *reinterpret_cast<const int*>(&g_session.unknown_7EF0[0x74]);
|
||||
}
|
||||
if (IsTreeGroupTwo(job)) {
|
||||
if (g_session.IsTreeGroupTwo(job)) {
|
||||
return g_session.m_maxLevel;
|
||||
}
|
||||
if (g_session.IsSuperNovice2Job(job)) {
|
||||
|
|
@ -1862,10 +1860,10 @@ int CSession::GetMaxJobLevel(int job) const {
|
|||
if (job == JT_NOVICE || job == JT_NOVICE_B || job == JT_NOVICE_H) {
|
||||
return *reinterpret_cast<const int*>(&g_session.unknown_7EF0[0x0C]);
|
||||
}
|
||||
if (IsTreeGroupThree(job) == true) {
|
||||
if (g_session.IsTreeGroupThree(job) == true) {
|
||||
return *reinterpret_cast<const int*>(&g_session.unknown_7EF0[0x78]);
|
||||
}
|
||||
if (IsTreeGroupTwo(job)) {
|
||||
if (g_session.IsTreeGroupTwo(job)) {
|
||||
return *reinterpret_cast<const int*>(&g_session.unknown_7EF0[0x1C]);
|
||||
}
|
||||
if (!g_session.IsExpandedJob(job)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue