diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index df209df9..598b2161 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -337,6 +337,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt()); int attr_id = a8::XValue(cmds[2]); float value = a8::XValue(cmds[3]).GetDouble(); + 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(); @@ -351,7 +352,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) { return source_name; }); - target->GetAbility()->SetSource(handle, kAstOther, cb); + target->GetAbility()->SetSource(handle, source_type, cb); } } }