1
This commit is contained in:
parent
b2384ba297
commit
7189a1e088
@ -1255,15 +1255,6 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
||||
break;
|
||||
case kBET_Terminator:
|
||||
{
|
||||
#if 0
|
||||
if (GetRace() == kHumanRace &&
|
||||
MetaMgr::Instance()->terminator_meta &&
|
||||
meta != MetaMgr::Instance()->terminator_meta) {
|
||||
WinExp(this, MetaMgr::Instance()->terminator_meta->i->exp() + 1);
|
||||
room->NotifySysPiao(TEXT("battle_server_terminator_appear", "终结者出现"), a8::MkRgb(255, 0, 0), 3);
|
||||
OnChgToTerminator();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case kBET_PlayShotAni:
|
||||
@ -3460,3 +3451,8 @@ void Creature::PullTarget(const a8::Vec2& target_pos)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool Creature::IsHpFull()
|
||||
{
|
||||
return std::abs(GetMaxHP() - GetHP()) < 0.0001f;
|
||||
}
|
||||
|
@ -193,6 +193,7 @@ class Creature : public MoveableEntity
|
||||
void AddHp(float hp);
|
||||
void SetHP(float hp);
|
||||
void SetMaxHP(float max_hp);
|
||||
bool IsHpFull();
|
||||
|
||||
RaceType_e GetRace() { return race_; }
|
||||
|
||||
|
@ -3696,7 +3696,7 @@ void Human::ProcUseItem(int item_id)
|
||||
MetaData::Equip* item_meta = MetaMgr::Instance()->GetEquip(item_id);
|
||||
if (item_meta && GetItemNum(item_id) > 0) {
|
||||
if (item_meta->i->use_scene() == 1 && !HasBuffEffect(kBET_InWater)) {
|
||||
SendSysPiaoMsg(TEXT("only_inwater_use", "只能在水中使用"),
|
||||
SendSysPiaoMsg(TEXT("only_inwater_use", "only in water use"),
|
||||
a8::MkRgb(255, 0, 0),
|
||||
3
|
||||
);
|
||||
|
@ -421,6 +421,12 @@ void Player::UpdateUseItemIdx()
|
||||
case IS_PAIN_KILLER:
|
||||
case IS_SHEN_BAO:
|
||||
{
|
||||
if (IsHpFull()) {
|
||||
SendSysPiaoMsg(TEXT("battle_server_hp_is_full", "HP is full"),
|
||||
a8::MkRgb(255, 255, 255),
|
||||
1.5);
|
||||
break;
|
||||
}
|
||||
GetTrigger()->UseItemAction(use_item_idx);
|
||||
use_time *= 1 - GetAbility()->GetAttrRate(kHAT_DrugTime);
|
||||
use_time -= GetAbility()->GetAttrAbs(kHAT_DrugTime);
|
||||
|
Loading…
x
Reference in New Issue
Block a user