1
This commit is contained in:
parent
02bf5a8e28
commit
f2cb511bcd
@ -1272,18 +1272,20 @@ void Creature::UpdatePoisoning()
|
||||
} else {
|
||||
dmg = std::max(1.0f, dmg);
|
||||
}
|
||||
float dmg_out = 0.0f;
|
||||
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
||||
VP_Gas,
|
||||
TEXT("battle_server_killer_gas", "毒圈"),
|
||||
dmg_out);
|
||||
if (IsPlayer()) {
|
||||
int eliminate_time = std::min(30.0f, GetHP() / std::max(1.0f, dmg_out));
|
||||
room->frame_event.AddPropChg(GetWeakPtrRef(),
|
||||
kPropEliminateTime,
|
||||
0,
|
||||
eliminate_time,
|
||||
true);
|
||||
if (!GetCar()) {
|
||||
float dmg_out = 0.0f;
|
||||
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
||||
VP_Gas,
|
||||
TEXT("battle_server_killer_gas", "毒圈"),
|
||||
dmg_out);
|
||||
if (IsPlayer()) {
|
||||
int eliminate_time = std::min(30.0f, GetHP() / std::max(1.0f, dmg_out));
|
||||
room->frame_event.AddPropChg(GetWeakPtrRef(),
|
||||
kPropEliminateTime,
|
||||
0,
|
||||
eliminate_time,
|
||||
true);
|
||||
}
|
||||
}
|
||||
if (dead) {
|
||||
poisoning_time = 0;
|
||||
|
@ -365,6 +365,7 @@ class Creature : public MoveableEntity
|
||||
void OnLand();
|
||||
std::shared_ptr<Compose> GetCompose() { return compose_; }
|
||||
void ClearGemStoneBuffs();
|
||||
virtual Car* GetCar() { return nullptr; }
|
||||
|
||||
protected:
|
||||
virtual void OnBuffRemove(Buff& buff);
|
||||
|
@ -238,7 +238,7 @@ class Human : public Creature
|
||||
void OnEnable();
|
||||
void OnDisable();
|
||||
virtual void UpdateMove() override;
|
||||
Car* GetCar() { return car_; }
|
||||
virtual Car* GetCar() override { return car_; }
|
||||
void SetCar(Car* car) { car_ = car; }
|
||||
int GetSeat() { return seat_; }
|
||||
void SetSeat(int seat) { seat_ = seat; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user