mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-03 04:23:39 +00:00
修复动态指令
This commit is contained in:
parent
d772221882
commit
55fd424d13
@ -48,7 +48,7 @@ class Command {
|
||||
|
||||
#define AFTER_EXTRA
|
||||
// Add Member There
|
||||
|
||||
#define DISABLE_CONSTRUCTOR_PREVENTION_COMMAND
|
||||
protected:
|
||||
int version; // 8
|
||||
CommandRegistry* registry; // 16
|
||||
@ -68,18 +68,16 @@ public:
|
||||
return sym(a, b);
|
||||
}
|
||||
std::string getCommandName() const{
|
||||
return this->registry->symbolToString(this->symbol);
|
||||
return registry->symbolToString(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;
|
||||
}
|
||||
// Command(){
|
||||
// this->version = 0;
|
||||
// this->registry = 0LL;
|
||||
// this->symbol = -1;
|
||||
// this->permission = CommandPermissionLevel(5);
|
||||
// this->flag.value = CommandFlagValue::None;
|
||||
// this->unk = 0;
|
||||
// }
|
||||
|
||||
#undef AFTER_EXTRA
|
||||
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_COMMAND
|
||||
|
@ -395,7 +395,8 @@
|
||||
inline char DynamicCommand::builderCallbackHanler(DCCallback* cb, DCArgs* args, DCValue* result, void* userdata) {
|
||||
DynamicCommandInstance& command = *(DynamicCommandInstance*)userdata;
|
||||
auto arg1 = (std::unique_ptr<Command>*)dcbArgPointer(args);
|
||||
DynamicCommand::commandBuilder(arg1, command.getCommandName());
|
||||
arg1->release();
|
||||
result->p = DynamicCommand::commandBuilder(arg1, command.getCommandName());
|
||||
return 'p';
|
||||
}
|
||||
|
||||
@ -503,7 +504,7 @@
|
||||
#ifdef USE_PARSE_ENUM_STRING
|
||||
Global<CommandRegistry>->addEnumValuesInternal(fixedView.data(), values, typeid_t<CommandRegistry>::count++, &CommandRegistry::parseEnumStringAndInt).val;
|
||||
#else
|
||||
Global<CommandRegistry>->_addEnumValuesInternal(fixedView.data(), values, typeid_t<CommandRegistry>::count++, &CommandRegistry::parseEnum<int>).val;
|
||||
Global<CommandRegistry>->addEnumValuesInternal(fixedView.data(), values, typeid_t<CommandRegistry>::count++, &CommandRegistry::parseEnum<int>).val;
|
||||
#endif // USE_PARSE_ENUM_STRING
|
||||
}
|
||||
commandInstance->enumRanges.swap(convertedEnumRanges);
|
||||
|
Loading…
Reference in New Issue
Block a user