战斗前开启技能使用
This commit is contained in:
parent
d64d12e503
commit
c1b4cc293f
@ -803,7 +803,12 @@ void Creature::DoSkill(int skill_id,
|
||||
float skill_distance,
|
||||
const a8::Vec2& target_pos)
|
||||
{
|
||||
if (HasBuffEffect(kBET_Jump) ||
|
||||
if (room->GetGasData().gas_mode == GasInactive &&
|
||||
!MetaMgr::Instance()->prebattle_can_use_skill) {
|
||||
return;
|
||||
}
|
||||
if (HasBuffEffect(kBET_Vertigo) ||
|
||||
HasBuffEffect(kBET_Jump) ||
|
||||
HasBuffEffect(kBET_Fly) ||
|
||||
HasBuffEffect(kBET_Sprint)) {
|
||||
return;
|
||||
|
@ -250,6 +250,8 @@ public:
|
||||
METAMGR_READ(incubator_rand_length, 10);
|
||||
METAMGR_READ(incubator_canset_distance, 520);
|
||||
|
||||
METAMGR_READ(prebattle_can_use_skill, 0);
|
||||
|
||||
METAMGR_READ(refresh_view_time, 4);
|
||||
{
|
||||
METAMGR_READ_STR(level0room_spec_things, "");
|
||||
|
@ -178,6 +178,8 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
||||
int prebattle_box_id_chiji = 0;
|
||||
int prebattle_box_id_zb = 0;
|
||||
|
||||
int prebattle_can_use_skill = 0;
|
||||
|
||||
private:
|
||||
MetaDataLoader* loader_ = nullptr;
|
||||
|
||||
|
@ -440,13 +440,6 @@ void Player::UpdateSwitchSeat()
|
||||
|
||||
void Player::UpdateUseSkill()
|
||||
{
|
||||
if (HasBuffEffect(kBET_Vertigo)) {
|
||||
return;
|
||||
}
|
||||
if (room->GetGasData().gas_mode == GasInactive ||
|
||||
room->GetGasData().gas_mode == GasJump) {
|
||||
return;
|
||||
}
|
||||
DoSkill(use_skill_id, skill_target_id, skill_dir, skill_distance, a8::Vec2());
|
||||
use_skill = false;
|
||||
}
|
||||
|
@ -2416,7 +2416,7 @@ ObstacleData* Room::GetPermanentObstacleData(int obstacle_uniid)
|
||||
long long Room::GetGasInactiveTime()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
return 10;
|
||||
return f8::IsOnlineEnv() ? 10 : 30;
|
||||
#endif
|
||||
if (room_mode_ == kZombieMode) {
|
||||
#if DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user