From a7218d9849426e3128cfa9b067169facdf007e3a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 19 Apr 2021 13:56:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=8B=E9=9B=B7=20?= =?UTF-8?q?=E6=AF=92=E6=B0=94=E5=BC=B9=E8=A1=94=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/creature.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 34e2983..0a08978 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -1463,7 +1463,7 @@ Weapon* Creature::ChooseNextWeapon(int curr_weapon_slot_id, int begin_slot_id, i abort(); } Weapon* next_weapon = nullptr; - for (int i = 1; i <= (end_slot_id - begin_slot_id); ++i) { + for (int i = 1; i <= (end_slot_id - begin_slot_id + 1); ++i) { int slot_id = begin_slot_id + (i + curr_weapon_slot_id - begin_slot_id) % (end_slot_id - begin_slot_id + 1); int idx = -1;