Batch #10019 by ragnarok-clanker: forced by an admin (23 lower score(s), 187 changed function(s)); checked with 447 compiled unit(s), including every includer of Source/Client/Input/Language.h, Source/Client/Mode/ModeDragState.h, Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Emblems/EmblemCache.h, Source/Contents/Party/AdventurerAgencyMgr.h, Source/Contents/Party/AgencyRequestContext.h, Source/Contents/Party/ChangePartyMasterAsyncWork.h, Source/Contents/Party/LoadMyPartyAsyncWork.h, Source/Contents/Party/LoadPartyInfoAsyncWork.h, Source/Contents/Party/LoadPartyListAsyncWork.h, Source/Contents/Party/PartyInvitation.h, Source/Contents/Party/RegisterPartyAsyncWork.h, Source/Contents/Party/StopRecruitingAsyncWork.h, Source/Contents/Skills/PlayerSkillBundle.h, Source/Contents/UserData/CharacterConfigLoad.h, Source/Network/Packets/PartyJoinPacket.h, Source/UI/Chat/ChatSuggestions.h, Source/UI/Dialogs/UIWaitDBSaveWnd.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/Lists/UIListBox.h, Source/UI/Party/UIRequestJoinPartyMgr.h, Source/UI/Shortcuts/NormalItemSlotLoad.h, Source/UI/Shortcuts/ShortcutDetails.h, Source/UI/Shortcuts/ShortcutPress.h, Source/UI/UIBasicCtrl.h, Source/UI/UIStaticItem.h, Source/UI/Window/FrameFocus.h, Source/UI/Window/UIFrameWnd.h, Source/UI/Window/UIVideoWnd.h, Source/UI/Window/WindowManagerWindows.h, Source/UI/Window/WindowMouseHit.h, Source/UI/Window/WindowOrdering.h.
81 lines
2.8 KiB
C++
81 lines
2.8 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_SKILLS_PLAYERSKILLBUNDLE_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_SKILLS_PLAYERSKILLBUNDLE_H
|
|
|
|
#include "Contents/Skills/SkillInfo.h"
|
|
|
|
#include <cstddef>
|
|
#include <functional>
|
|
#include <list>
|
|
#include <map>
|
|
#include <unordered_map>
|
|
|
|
#include "UI/Window/WindowManagerWindows.h"
|
|
|
|
struct SkillIdHash {
|
|
std::size_t operator()(std::uint32_t id) const;
|
|
};
|
|
|
|
class CPlayerSkillBundle {
|
|
public:
|
|
struct lcEXCInfo {
|
|
lcEXCInfo();
|
|
virtual ~lcEXCInfo();
|
|
/* 0004 */ std::int32_t previous;
|
|
/* 0008 */ std::int32_t target;
|
|
};
|
|
|
|
CPlayerSkillBundle();
|
|
virtual ~CPlayerSkillBundle();
|
|
void Add(const CSkillInfo& value);
|
|
void Remove(std::uint32_t id);
|
|
CSkillInfo* Find(std::uint32_t id);
|
|
CSkillInfo Lookup(std::uint32_t id, int classMode, bool effect1717, bool effect1716);
|
|
bool FindIndexed(std::uint32_t id, CSkillInfo*& output);
|
|
std::uint32_t ResolveSkillId(std::uint32_t id, int classMode, bool effect1717, bool effect1716);
|
|
bool UpdatePending(const CSkillInfo& value);
|
|
CSkillInfo Pending(std::uint32_t id);
|
|
CSkillInfo* FindExtra(std::uint32_t id);
|
|
void ClearExtra();
|
|
bool RemoveExtra(std::uint32_t id, WindowManagerWindows& windows);
|
|
void AddExtra(const CSkillInfo& value, WindowManagerWindows& windows);
|
|
void NumberExtra();
|
|
void AddGrouped(int group, const CSkillInfo& value);
|
|
void ClearGroups();
|
|
CSkillInfo* FindGrouped(std::uint32_t id);
|
|
std::list<CSkillInfo>& Group(int group);
|
|
void ForEachGrouped(std::function<bool(CSkillInfo*)> callback);
|
|
std::size_t GroupSize(int group) const;
|
|
int GroupedLevel(std::uint32_t id);
|
|
bool HasHigherLevel(std::uint32_t id);
|
|
void RecordLevelChange(const CSkillInfo& value);
|
|
bool PreviousLevel(int id, int& output) const;
|
|
void ApplyLevelChange(CSkillInfo& value);
|
|
void ClearLevelChanges();
|
|
void MarkLevelChanges();
|
|
void ResetFirstLevelChange();
|
|
void SetUnknownValue(int id, int value);
|
|
|
|
/* 0004 */ std::list<CSkillInfo> skills;
|
|
/* 000C */ std::unordered_map<std::uint32_t, CSkillInfo*, SkillIdHash> index;
|
|
/* 002C */ std::map<int, std::list<CSkillInfo>> groups;
|
|
/* 0034 */ std::list<CSkillInfo> extra;
|
|
/* 003C */ std::vector<std::uint32_t> extraIds;
|
|
/* 0048 */ std::map<int, lcEXCInfo> levelChanges;
|
|
/* 0050 */ std::map<int, bool> changed;
|
|
/* 0058 */ std::vector<int> removals;
|
|
/* 0064 */ std::vector<int> unknown_0064;
|
|
/* 0070 */ std::list<CSkillInfo> pending;
|
|
|
|
private:
|
|
CPlayerSkillBundle(const CPlayerSkillBundle&) = delete;
|
|
CPlayerSkillBundle& operator=(const CPlayerSkillBundle&) = delete;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CPlayerSkillBundle::lcEXCInfo) == 12);
|
|
static_assert(offsetof(CPlayerSkillBundle::lcEXCInfo, previous) == 0x4);
|
|
static_assert(offsetof(CPlayerSkillBundle::lcEXCInfo, target) == 0x8);
|
|
static_assert(sizeof(CPlayerSkillBundle) == 120);
|
|
#endif
|
|
|
|
#endif
|