diff --git a/server/gameserver/trigger.cc b/server/gameserver/trigger.cc index 09bbf93..d0c2db4 100644 --- a/server/gameserver/trigger.cc +++ b/server/gameserver/trigger.cc @@ -6,6 +6,7 @@ #include "creature.h" #include "metamgr.h" #include "skill.h" +#include "room.h" void Trigger::Init() { @@ -192,6 +193,9 @@ void Trigger::TraverseCondBuffs(int cond, std::function fun if (!IsValidCondBuff(cond)) { abort(); } + if (!owner_->room->BattleStarted()) { + return; + } list_head* pos = nullptr; list_head* next = nullptr; @@ -218,6 +222,10 @@ void Trigger::TraverseCondBuffs(int cond, std::function fun void Trigger::TriggeCondBuffAll(int cond) { + if (!owner_->room->BattleStarted()) { + return; + } + std::shared_ptr old_context_ability = owner_->context_ability; a8::Vec2 old_context_dir = owner_->context_dir; a8::Vec2 old_context_pos = owner_->context_pos;