pve复活添加无敌

This commit is contained in:
aozhiwei 2022-09-01 20:36:01 +08:00
parent 050ecbc684
commit 221f7b47d4
2 changed files with 6 additions and 1 deletions

View File

@ -1120,6 +1120,9 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string& killer_name, i
dec_hp = std::max((float)1.0, dec_hp - buff->meta->param2);
}
}
if (HasBuffEffect(kBET_Invincible)) {
return;
}
auto downed_func =
[] (const a8::XParams& param)
{

View File

@ -1,5 +1,4 @@
#include "precompile.h"
#include <math.h>
#include <float.h>
@ -1091,6 +1090,9 @@ void Player::_CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg)
int buff_uniid = TryAddBuff(this, kInvincibleBuffId);
if (buff_uniid) {
Buff* buff = GetBuffByUniId(buff_uniid);
if (buff) {
room->xtimer.ModifyTimer(buff->remover_timer, 6 * SERVER_FRAME_RATE);
}
}
}
}