修该类内成员

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{
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
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_COMMAND
public:
class Command& operator=(class Command const &) = delete;
Command(class Command const &) = delete;
Command(){};
#endif
public:

View File

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

View File

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