Skip to content

Commit

Permalink
Follow up to 89ef868 to fix compile issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
aleos89 committed May 15, 2014
1 parent b4d0fd5 commit 28af644
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
12 changes: 6 additions & 6 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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

/**
Expand Down
9 changes: 6 additions & 3 deletions src/map/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 28af644

Please sign in to comment.