修复 救援时间问题

This commit is contained in:
aozhiwei 2021-07-08 02:41:34 +00:00
parent bc585e9467
commit 5a5df532a3

View File

@ -781,7 +781,7 @@ void Player::HumanInteraction(Human* hum)
if (hum->GetActionType() == AT_Rescue) {
return;
}
hum->TryAddBuff(this, kRescueBuffId);
TryAddBuff(this, kRescueBuffId);
int downed_relive_time = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000;
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
downed_relive_time = std::max(1000, downed_relive_time);
@ -1195,6 +1195,17 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
int hero_num = a8::XValue(cmds[2]);
std::vector<int> mons = std::vector<int>{hero_id};
room->ShuaMon(GetPos(), mons, 100);
} else if (cmd == "jiuyuan") {
TryAddBuff(this, kRescueBuffId);
int downed_relive_time = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000;
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
downed_relive_time = std::max(1000, downed_relive_time);
StartAction(
AT_Relive,
downed_relive_time,
room->GetFrameNo(),
0
);
} else if (cmd == "addbuff" && cmds.size() >= 2) {
int buff_id = a8::XValue(cmds[1]);
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);