pve复活添加无敌
This commit is contained in:
parent
050ecbc684
commit
221f7b47d4
@ -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);
|
dec_hp = std::max((float)1.0, dec_hp - buff->meta->param2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (HasBuffEffect(kBET_Invincible)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto downed_func =
|
auto downed_func =
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "precompile.h"
|
#include "precompile.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
@ -1091,6 +1090,9 @@ void Player::_CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg)
|
|||||||
int buff_uniid = TryAddBuff(this, kInvincibleBuffId);
|
int buff_uniid = TryAddBuff(this, kInvincibleBuffId);
|
||||||
if (buff_uniid) {
|
if (buff_uniid) {
|
||||||
Buff* buff = GetBuffByUniId(buff_uniid);
|
Buff* buff = GetBuffByUniId(buff_uniid);
|
||||||
|
if (buff) {
|
||||||
|
room->xtimer.ModifyTimer(buff->remover_timer, 6 * SERVER_FRAME_RATE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user