This commit is contained in:
aozhiwei 2024-09-05 17:47:45 +08:00
parent ce02b947ac
commit 72dad82547

View File

@ -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<std::string> 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);
}
}
}