Просмотр исходного кода

Follow up to 33270ed.
Change type of running_npc_stat_calc_event variable to bool.

Jittapan Pluemsumran 9 лет назад
Родитель
Сommit
c658ea23d4
2 измененных файлов с 4 добавлено и 4 удалено
  1. 3 3
      src/map/status.c
  2. 1 1
      src/map/status.h

+ 3 - 3
src/map/status.c

@@ -48,7 +48,7 @@ static struct status_data dummy_status;
 short current_equip_item_index; /// Contains inventory index of an equipped item. To pass it into the EQUP_SCRIPT [Lupus]
 unsigned int current_equip_combo_pos; /// For combo items we need to save the position of all involved items here
 int current_equip_card_id; /// To prevent card-stacking (from jA) [Skotlex]
-char running_npc_stat_calc_event; /// Indicate if OnPCStatCalcEvent is running.
+bool running_npc_stat_calc_event; /// Indicate if OnPCStatCalcEvent is running.
 // We need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only to avoid cards exploits
 
 unsigned int SCDisabled[SC_MAX]; ///< List of disabled SC on map zones. [Cydh]
@@ -3206,9 +3206,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
 
 	pc_itemgrouphealrate_clear(sd);
 
-	running_npc_stat_calc_event = 1;
+	running_npc_stat_calc_event = true;
 	npc_script_event(sd, NPCE_STATCALC);
-	running_npc_stat_calc_event = 0;
+	running_npc_stat_calc_event = false;
 
 	// Parse equipment
 	for (i = 0; i < EQI_MAX; i++) {

+ 1 - 1
src/map/status.h

@@ -1704,7 +1704,7 @@ enum e_joint_break
 extern short current_equip_item_index;
 extern unsigned int current_equip_combo_pos;
 extern int current_equip_card_id;
-extern char running_npc_stat_calc_event;
+extern bool running_npc_stat_calc_event;
 
 /// Mode definitions to clear up code reading. [Skotlex]
 enum e_mode {