Procházet zdrojové kódy

Attempts to correct display messages
Thanks to @eppc0330!

aleos před 3 roky
rodič
revize
fb9a52416f
4 změnil soubory, kde provedl 7 přidání a 5 odebrání
  1. 2 1
      src/map/clif.cpp
  2. 3 2
      src/map/pc.cpp
  3. 1 1
      src/map/pc.hpp
  4. 1 1
      src/map/status.cpp

+ 2 - 1
src/map/clif.cpp

@@ -11067,6 +11067,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 	}
 
 	if( sd->state.changemap ) {// restore information that gets lost on map-change
+		status_calc_pc(sd, sd->state.autotrade ? SCO_FIRST : SCO_NONE); // Some conditions are map-dependent so we must recalculate
+
 #if PACKETVER >= 20070918
 		clif_partyinvitationstate(sd);
 		clif_equipcheckbox(sd);
@@ -11135,7 +11137,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 
 		status_change_clear_onChangeMap(&sd->bl, &sd->sc);
 		map_iwall_get(sd); // Updates Walls Info on this Map to Client
-		status_calc_pc(sd, sd->state.autotrade ? SCO_FIRST : SCO_NONE); // Some conditions are map-dependent so we must recalculate
 
 #ifdef VIP_ENABLE
 		if (!sd->state.connect_new &&

+ 3 - 2
src/map/pc.cpp

@@ -3515,8 +3515,9 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
 		case SP_MOVE_HASTE:	//Non stackable increase
 			if (sd->state.lr_flag != 2) {
 				sd->bonus.speed_rate = min(sd->bonus.speed_rate, -val);
-				sd->special_state.movehaste = true;
-				clif_status_load(&sd->bl, EFST_MOVHASTE_INFINITY, 1);
+				sd->special_state.movehaste++;
+				if (sd->special_state.movehaste == 1)
+					clif_status_load(&sd->bl, EFST_MOVHASTE_INFINITY, 1);
 			}
 			break;
 		case SP_ASPD:	//Raw increase

+ 1 - 1
src/map/pc.hpp

@@ -408,7 +408,7 @@ struct map_session_data {
 		unsigned int bonus_coma : 1;
 		unsigned int no_mado_fuel : 1; // Disable Magic_Gear_Fuel consumption [Secret]
 		unsigned int no_walk_delay : 1;
-		bool movehaste;
+		uint8 movehaste;
 	} special_state;
 	uint32 login_id1, login_id2;
 	uint64 class_;	//This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]

+ 1 - 1
src/map/status.cpp

@@ -3141,7 +3141,7 @@ int status_calc_pc_sub(struct map_session_data* sd, uint8 opt)
 	if (sd->special_state.no_walk_delay)
 		clif_status_load(&sd->bl, EFST_ENDURE, 0);
 
-	if (sd->special_state.movehaste)
+	if (sd->special_state.movehaste == 1)
 		clif_status_load(&sd->bl, EFST_MOVHASTE_INFINITY, 0);
 
 	memset(&sd->special_state,0,sizeof(sd->special_state));