This commit is contained in:
aozhiwei 2023-11-13 17:34:45 +08:00
parent 2fa6c03b1f
commit ff132c103b
4 changed files with 21 additions and 1 deletions

View File

@ -107,6 +107,15 @@ void Android::Update(int delta_time)
}
#endif
InternalUpdate(delta_time);
if (shot_hold) {
if (HasBuffEffect(kBET_HoldGun)) {
RemoveBuffByEffectId(kBET_HoldGun);
}
} else {
if (!HasBuffEffect(kBET_HoldGun)) {
TryAddBuffAndSetTime(this, kHoldGunBuffId, 10);
}
}
++updated_times_;
}

View File

@ -28,6 +28,7 @@ A8_DECLARE_ENUM(SpecBuffId_e,
kRecoverHpEffectBuffId = 7040,
kPullToWalkableBuffId = 8003,
kDiveBuffId = 8054,
kHoldGunBuffId = 8059,
kInvincibleBuffId = 1005,
);
@ -107,7 +108,7 @@ A8_DECLARE_ENUM(BuffEffectType_e,
kBET_CondAdd = 71, //
kBET_Dive = 72, //下潜模式
kBET_Reverse = 73, //人物反向
kBET_UnUse74 = 74,
kBET_HoldGun = 74, //持枪状态
kBET_MachineGun = 75, //机枪
kBET_HoldShield = 76, //手持盾牌
kBET_InRescue = 77, //被救援中(被就方)

View File

@ -128,6 +128,7 @@ class Creature : public MoveableEntity
std::vector<int> gemstone_hold_buffs;
bool shot_start = false;
bool shot_hold = false;
bool pre_shot_hold = false;
a8::XTimerWp craze_mode_timer;
a8::XTimerWp nature_recover_hp_idle_timer;

View File

@ -143,6 +143,15 @@ void Player::Update(int delta_time)
}
}
InternalUpdate(delta_time);
if (shot_hold) {
if (HasBuffEffect(kBET_HoldGun)) {
RemoveBuffByEffectId(kBET_HoldGun);
}
} else {
if (!HasBuffEffect(kBET_HoldGun)) {
TryAddBuffAndSetTime(this, kHoldGunBuffId, 10);
}
}
++updated_times_;
}