修该类内成员

This commit is contained in:
Qiuzhizhe 2022-10-05 04:49:15 -07:00
parent 65e6bb6dbf
commit d07972188d
3 changed files with 19 additions and 8 deletions

View File

@ -70,13 +70,22 @@ public:
std::string getCommandName() const{ std::string getCommandName() const{
return this->registry->symbolToString(this->symbol); return this->registry->symbolToString(this->symbol);
}; };
Command(){
CommandFlag mflag;
mflag.value = CommandFlagValue::None;
*(void**)this = dlsym("??_7Command@@6B@");
this->version = 0;
this->registry = 0LL;
this->symbol = -1;
this->permission = CommandPermissionLevel(5);
this->flag = mflag;
}
#undef AFTER_EXTRA #undef AFTER_EXTRA
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_COMMAND #ifndef DISABLE_CONSTRUCTOR_PREVENTION_COMMAND
public: public:
class Command& operator=(class Command const &) = delete; class Command& operator=(class Command const &) = delete;
Command(class Command const &) = delete; Command(class Command const &) = delete;
Command(){};
#endif #endif
public: public:

View File

@ -4,7 +4,7 @@
#include "../Global.h" #include "../Global.h"
#define BEFORE_EXTRA #define BEFORE_EXTRA
#include "CommandSelector.hpp"
#undef BEFORE_EXTRA #undef BEFORE_EXTRA
class CommandMessage { class CommandMessage {
@ -13,9 +13,11 @@ class CommandMessage {
// Add Member There // Add Member There
struct MessageComponent struct MessageComponent
{ {
char filler[200]; // char filler[200];
void* unk[2]; // void* unk[2];
std::vector<void*> unk2[5]; // std::vector<void*> unk2[5];
std::string str;
std::unique_ptr<CommandSelector<Actor>> select;
}; };
std::vector<MessageComponent> components; std::vector<MessageComponent> components;

View File

@ -8,8 +8,8 @@
static_assert(offsetof(CommandParameterData, options) == 73); static_assert(offsetof(CommandParameterData, options) == 73);
static_assert(offsetof(CommandParameterData, name) == 16); static_assert(offsetof(CommandParameterData, name) == 16);
static_assert(offsetof(CommandParameterData, unk56) == 56); static_assert(offsetof(CommandParameterData, unk56) == 56);
static_assert(offsetof(CommandRegistry::Overload, unk) == 40); static_assert(offsetof(CommandRegistry::Overload, versionOffset) == 40);
static_assert(sizeof(CommandRegistry::Overload) == 72); static_assert(sizeof(CommandRegistry::Overload) == 48);
static_assert(offsetof(CommandRegistry::Signature, alt_symbol) == 96); static_assert(offsetof(CommandRegistry::Signature, alt_symbol) == 96);
static_assert(sizeof(CommandRegistry::Signature) == 120); static_assert(sizeof(CommandRegistry::Signature) == 120);
/* /*
@ -28,7 +28,7 @@
: version(version) : version(version)
, factory(factory) , factory(factory)
, params(std::forward<std::vector<CommandParameterData>>(args)) , params(std::forward<std::vector<CommandParameterData>>(args))
, unk(255){}; , versionOffset(255){};
CommandRegistry::Overload::~Overload(){}; CommandRegistry::Overload::~Overload(){};