This commit is contained in:
aozhiwei 2024-09-06 11:52:41 +08:00
parent 1ee1f7ca6d
commit f47a6d4132

View File

@ -340,10 +340,6 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
int source_type = cmds.size() > 4 ? a8::XValue(cmds[4]).GetInt() : kAstOther;
if (target) {
auto handle = target->GetAbility()->AddAttr(attr_id, value);
std::vector<std::string> strings = target->GetAbility()->GMShowAttrs();
for (auto& str : strings) {
SendDebugMsg("数值: " + str);
}
if (!handle.expired()) {
std::string source_name = "<-gm.self." + a8::XValue(source_type).GetString();
auto cb = std::make_shared<std::function<std::string()>>
@ -354,6 +350,10 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
});
target->GetAbility()->SetSource(handle, source_type, cb);
}
std::vector<std::string> strings = target->GetAbility()->GMShowAttrs();
for (auto& str : strings) {
SendDebugMsg("数值: " + str);
}
}
}
} else if (cmd == "del_attr") {