Explorar el Código

Follow up to 89ef868 to fix compile issues.

aleos89 hace 11 años
padre
commit
28af644b90
Se han modificado 3 ficheros con 14 adiciones y 9 borrados
  1. 2 0
      src/map/battle.c
  2. 6 6
      src/map/status.c
  3. 6 3
      src/map/status.h

+ 2 - 0
src/map/battle.c

@@ -3869,7 +3869,9 @@ struct Damage battle_attack_sc_bonus(struct Damage wd, struct block_list *src, s
 	struct map_session_data *sd = BL_CAST(BL_PC, src);
 	struct status_change *sc = status_get_sc(src);
 	struct status_data *sstatus = status_get_status_data(src);
+#ifdef RENEWAL
 	struct status_data *tstatus = status_get_status_data(target);
+#endif
 	int chorusbonus = 0;
 
 	if( sd ) {

+ 6 - 6
src/map/status.c

@@ -2014,8 +2014,8 @@ int status_check_visibility(struct block_list *src, struct block_list *target)
 	if (src->m != target->m || !check_distance_bl(src, target, view_range))
 		return 0;
 
-	if( tsc && tsc->data[SC_STEALTHFIELD] )
-		return 0;
+	if ( src->type == BL_NPC) // NPCs don't care for the rest
+		return 1;
 
 	switch (target->type) {	// Check for chase-walk/hiding/cloaking opponents.
 		case BL_PC:
@@ -2025,7 +2025,7 @@ int status_check_visibility(struct block_list *src, struct block_list *target)
 			if ( tsc && tsc->data[SC_CLOAKINGEXCEED] && !(status->mode&MD_BOSS) &&
 				( ((TBL_PC*)target)->special_state.perfect_hiding || (status->mode&MD_DETECTOR) ) )
 				return 0;
-			if ( tsc && tsc->data[SC__FEINTBOMB] && !(status->mode&MD_BOSS|MD_DETECTOR) )
+			if ( tsc && tsc->data[SC__FEINTBOMB] && !(status->mode&(MD_BOSS|MD_DETECTOR) ) )
 				return 0;
 			break;
 		default:
@@ -2166,10 +2166,10 @@ unsigned int status_weapon_atk(struct weapon_atk wa, struct status_data *status)
 #endif
 
 #ifndef RENEWAL
-static inline unsigned short status_base_matk_min(const struct status_data* status) { return status->int_+(status->int_/7)*(status->int_/7); }
-static inline unsigned short status_base_matk_max(const struct status_data* status) { return status->int_+(status->int_/5)*(status->int_/5); }
+	unsigned short status_base_matk_min(const struct status_data* status) { return status->int_ + (status->int_ / 7) * (status->int_ / 7); }
+	unsigned short status_base_matk_max(const struct status_data* status) { return status->int_ + (status->int_ / 5) * (status->int_ / 5); }
 #else
-unsigned short status_base_matk(const struct status_data* status, int level) { return status->int_+(status->int_/2)+(status->dex/5)+(status->luk/3)+(level/4); }
+	unsigned short status_base_matk(const struct status_data* status, int level) { return status->int_ + (status->int_ / 2) + (status->dex / 5) + (status->luk / 3) + (level / 4); }
 #endif
 
 /**

+ 6 - 3
src/map/status.h

@@ -2018,9 +2018,12 @@ int status_check_visibility(struct block_list *src, struct block_list *target);
 
 int status_change_spread( struct block_list *src, struct block_list *bl );
 
-#ifdef RENEWAL
-unsigned int status_weapon_atk(struct weapon_atk wa, struct status_data *status);
-unsigned short status_base_matk(const struct status_data* status, int level);
+#ifndef RENEWAL
+	unsigned short status_base_matk_min(const struct status_data* status);
+	unsigned short status_base_matk_max(const struct status_data* status);
+#else
+	unsigned int status_weapon_atk(struct weapon_atk wa, struct status_data *status);
+	unsigned short status_base_matk(const struct status_data* status, int level);
 #endif
 
 int status_readdb(void);