Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix setCommandDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
twoone3l committed Aug 11, 2021
1 parent 5c46822 commit 4361c18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BDSpyrunner/mod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,8 @@ HOOK(onInputCommand, void, "?handle@ServerNetworkHandler@@UEAAXAEBVNetworkIdenti
if (p) {
const string& cmd = FETCH(string, pkt + 48);
auto data = _commands.find(cmd.c_str() + 1);
if (data != _commands.end()) {
//如果有这条命令且回调函数不为nullptr
if (data != _commands.end() && data->second.second) {
safeCall([&] {
PyObject_CallFunction(data->second.second, "O", PyEntity_FromEntity(p));
PyErr_Print();
Expand Down

0 comments on commit 4361c18

Please sign in to comment.