diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index f14e1ca4..026aa4d6 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -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 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> @@ -354,6 +350,10 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) }); target->GetAbility()->SetSource(handle, source_type, cb); } + std::vector strings = target->GetAbility()->GMShowAttrs(); + for (auto& str : strings) { + SendDebugMsg("数值: " + str); + } } } } else if (cmd == "del_attr") {