From f47a6d41327fae8ec36c3fe8e2dd0fc19070ced8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 6 Sep 2024 11:52:41 +0800 Subject: [PATCH] 1 --- server/gameserver/commands.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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") {