diff --git a/server/gameserver/android.ai.cc b/server/gameserver/android.ai.cc index 15b78b5..ce6a220 100644 --- a/server/gameserver/android.ai.cc +++ b/server/gameserver/android.ai.cc @@ -473,8 +473,8 @@ void AndroidNewAI::UpdateThinking() Human* hum = (Human*)owner; if (hum->room->GetGasData().gas_mode == GasInactive || hum->room->IsWaitingStart() || - hum->HasBuffEffect(kBET_Jump) - ) { + hum->HasBuffEffect(kBET_Jump) || + a8::HasBitFlag(hum->status, HS_DisableAttack)) { #if 1 if (hum->room->IsWaitingStart()) { ChangeToStateNewAI(ASE_Idle); @@ -574,7 +574,9 @@ void AndroidNewAI::UpdatePursuit() { Human* myself = (Human*)owner; float distance = myself->GetPos().Distance(node_.target->GetPos()); - if (distance < GetAttackRange()) { + if (!myself->HasBuffEffect(kBET_Jump) && + !a8::HasBitFlag(myself->status, HS_DisableAttack) && + distance < GetAttackRange()) { ChangeToStateNewAI(ASE_Attack); } else { if (node_.exec_frame_num > 100 * 2) { diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 3808aaa..1bae44c 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -22,6 +22,7 @@ enum HumanStatus HS_AlreadyEquip = 5, HS_AlreadyProcNewBieLogic = 6, HS_LastAndroid = 7, + HS_DisableAttack = 8, HS_End }; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 4457d23..6e36a50 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -1985,6 +1985,9 @@ void Room::NotifyGameStart() for (auto& pair : accountid_hash_) { pair.second->SendNotifyMsg(msg); } + for (auto& pair : human_hash_) { + a8::SetBitFlag(pair.second->status, HS_DisableAttack); + } waiting_start_ = true; xtimer.AddDeadLineTimerAndAttach @@ -2008,6 +2011,7 @@ void Room::NotifyGameStart() MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id); if (buff_meta) { for (auto& pair : room->human_hash_) { + a8::UnSetBitFlag(pair.second->status, HS_DisableAttack); pair.second->AddBuff(pair.second, buff_meta, 1,