1
This commit is contained in:
commit
d2bdd8fddb
@ -592,5 +592,5 @@ void Bullet::AddGunBuff()
|
|||||||
|
|
||||||
bool Bullet::IsPreBattleBullet()
|
bool Bullet::IsPreBattleBullet()
|
||||||
{
|
{
|
||||||
return create_frameno_ <= room->GetBattleStartFrameNo();
|
return create_frameno_ <= room->GetBattleStartFrameNo() || room->GetBattleStartFrameNo() == 0;
|
||||||
}
|
}
|
||||||
|
@ -2764,9 +2764,11 @@ void Creature::OnBattleStart(Room* room)
|
|||||||
del_buffs.reserve(buff_list_.size());
|
del_buffs.reserve(buff_list_.size());
|
||||||
for (auto& buff : buff_list_) {
|
for (auto& buff : buff_list_) {
|
||||||
if (!buff.meta->i->post_battle_valid()) {
|
if (!buff.meta->i->post_battle_valid()) {
|
||||||
|
if (!buff.skill_meta || buff.skill_meta->i->skill_type() != kPassiveSkill) {
|
||||||
del_buffs.push_back(buff.buff_uniid);
|
del_buffs.push_back(buff.buff_uniid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (auto itr = del_buffs.rbegin(); itr != del_buffs.rend(); ++itr) {
|
for (auto itr = del_buffs.rbegin(); itr != del_buffs.rend(); ++itr) {
|
||||||
RemoveBuffByUniId(*itr);
|
RemoveBuffByUniId(*itr);
|
||||||
}
|
}
|
||||||
|
@ -127,5 +127,5 @@ void Explosion::InternalAttack()
|
|||||||
|
|
||||||
bool Explosion::IsPreBattleExplosion()
|
bool Explosion::IsPreBattleExplosion()
|
||||||
{
|
{
|
||||||
return create_frameno_ <= room_->GetBattleStartFrameNo();
|
return create_frameno_ <= room_->GetBattleStartFrameNo() || room_->GetBattleStartFrameNo() == 0;
|
||||||
}
|
}
|
||||||
|
@ -1229,7 +1229,9 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
|
|||||||
} else if (cmd == "bufflist") {
|
} else if (cmd == "bufflist") {
|
||||||
SendDebugMsg(DebugOutBuffList());
|
SendDebugMsg(DebugOutBuffList());
|
||||||
} else if (cmd == "set_inactive_time" && cmds.size() >= 2) {
|
} else if (cmd == "set_inactive_time" && cmds.size() >= 2) {
|
||||||
|
#if DEBUG
|
||||||
App::Instance()->debug_params[1] = a8::XValue(cmds[1]);
|
App::Instance()->debug_params[1] = a8::XValue(cmds[1]);
|
||||||
|
#endif
|
||||||
} else if (cmd == "reset_skill" && cmds.size() >= 2) {
|
} else if (cmd == "reset_skill" && cmds.size() >= 2) {
|
||||||
int skill_id = a8::XValue(cmds[1]);
|
int skill_id = a8::XValue(cmds[1]);
|
||||||
Skill* skill = GetSkill(skill_id);
|
Skill* skill = GetSkill(skill_id);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "creature.h"
|
#include "creature.h"
|
||||||
#include "metamgr.h"
|
#include "metamgr.h"
|
||||||
#include "skill.h"
|
#include "skill.h"
|
||||||
|
#include "room.h"
|
||||||
|
|
||||||
void Trigger::Init()
|
void Trigger::Init()
|
||||||
{
|
{
|
||||||
@ -192,6 +193,9 @@ void Trigger::TraverseCondBuffs(int cond, std::function<void (Buff*, bool&)> fun
|
|||||||
if (!IsValidCondBuff(cond)) {
|
if (!IsValidCondBuff(cond)) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
if (!owner_->room->BattleStarted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
list_head* pos = nullptr;
|
list_head* pos = nullptr;
|
||||||
list_head* next = nullptr;
|
list_head* next = nullptr;
|
||||||
@ -218,6 +222,10 @@ void Trigger::TraverseCondBuffs(int cond, std::function<void (Buff*, bool&)> fun
|
|||||||
|
|
||||||
void Trigger::TriggeCondBuffAll(int cond)
|
void Trigger::TriggeCondBuffAll(int cond)
|
||||||
{
|
{
|
||||||
|
if (!owner_->room->BattleStarted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ability> old_context_ability = owner_->context_ability;
|
std::shared_ptr<Ability> old_context_ability = owner_->context_ability;
|
||||||
a8::Vec2 old_context_dir = owner_->context_dir;
|
a8::Vec2 old_context_dir = owner_->context_dir;
|
||||||
a8::Vec2 old_context_pos = owner_->context_pos;
|
a8::Vec2 old_context_pos = owner_->context_pos;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user