Decompile fn_23772 (CSession::CountProhibitionLog)
Batch #2037 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_23772 CSession::CountProhibitionLog: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
39e5860ee8
commit
833db84d60
2 changed files with 26 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ public:
|
|||
/* 06F9 */ unsigned char unknown_06F9[0x23];
|
||||
/* 071C */ std::vector<int> m_homunSkillLevels;
|
||||
/* 0728 */ std::vector<int> m_mercSkillLevels;
|
||||
/* 0734 */ unsigned char unknown_0734[0x20];
|
||||
/* 0734 */ unsigned char unknown_0734[0x1C];
|
||||
/* 0750 */ std::uint32_t m_prohibitionTarget;
|
||||
/* 0754 */ std::vector<ProhibitionLogEntry> m_prohibitionLog;
|
||||
/* 0760 */ std::string m_accountName;
|
||||
/* 0778 */ std::vector<std::pair<int, int>> unknown_0778;
|
||||
|
|
@ -277,6 +278,7 @@ public:
|
|||
int FindUnknown0778(int key) const;
|
||||
CSkillInfo AdditionalSkillAt(int index) const;
|
||||
CSkillInfo HomunSkillAt(int index) const;
|
||||
int CountProhibitionLog(std::uint32_t aid);
|
||||
void DeleteProhibitionLog(std::uint32_t aid, std::uint32_t minutes, WindowDialogs& dialogs);
|
||||
int IsAdminSubMode(int subMode);
|
||||
void GetMonsterSkillInfo(const char* monster, int skill, int* action, int* loopType, WindowDialogs& dialogs);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "Client/Mode/ActiveGameMode.h"
|
||||
#include "Client/Mode/CGameMode.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/Actors/RenderObject.h"
|
||||
#include "Contents/ClientState.h"
|
||||
#include "Contents/Jobs/JobId.h"
|
||||
#include "Contents/Jobs/JobInheritance.h"
|
||||
|
|
@ -439,6 +440,28 @@ void CSession::EraseUnknownKey(std::int64_t key) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E08D50
|
||||
// FUNCTION: fn_23772
|
||||
int CSession::CountProhibitionLog(std::uint32_t aid) {
|
||||
const int count = static_cast<int>(this->m_prohibitionLog.size());
|
||||
const CRenderObject* actor = static_cast<CGameMode*>(g_world.ActiveGameMode())->scene->GetGameActorByAID(aid);
|
||||
if (!actor) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const std::uint32_t accountId = actor->render.accountId;
|
||||
this->m_prohibitionTarget = accountId;
|
||||
int matches = 0;
|
||||
for (int index = 0; index < count; ++index) {
|
||||
const ProhibitionLogEntry& entry = this->m_prohibitionLog[index];
|
||||
if (std::strcmp(entry.ownerName, this->m_serverName.c_str()) == 0 && entry.accountId == accountId) {
|
||||
++matches;
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E085A0
|
||||
// FUNCTION: fn_23763
|
||||
void CSession::DeleteProhibitionLog(std::uint32_t aid, std::uint32_t minutes, WindowDialogs& dialogs) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue