diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/status.c | 2 | ||||
-rw-r--r-- | src/map/vending.c | 6 |
5 files changed, 6 insertions, 12 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 0d0aa997b..1b4a7bdf4 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10023,9 +10023,9 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) bool flag = (bool)RFIFOB(fd,84); const uint8* data = (uint8*)RFIFOP(fd,85); - if (sd->sc.data[SC_NOCHAT].timer!=-1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOROOM) + if( sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOROOM ) return; - if (map[sd->bl.m].flag.novending) { + if( map[sd->bl.m].flag.novending || map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) { clif_displaymessage (sd->fd, msg_txt(276)); // "You can't open shop on this map" return; } diff --git a/src/map/pc.c b/src/map/pc.c index ccd6955a7..2b218586d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -943,7 +943,7 @@ int pc_calc_skilltree(struct map_session_data *sd) ShowError("pc_calc_skilltree: Unable to normalize job %d for character %s (%d:%d)\n", i, sd->status.name, sd->status.account_id, sd->status.char_id); return 1; } - c = pc_class2idx(c); + c = pc_class2idx(c); for(i=0;i<MAX_SKILL;i++){ if (sd->status.skill[i].flag != 13) //Don't touch plagiarized skills sd->status.skill[i].id=0; //First clear skills. @@ -1063,7 +1063,7 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill) ShowError("pc_check_skilltree: Unable to normalize job %d for character %s (%d:%d)\n", i, sd->status.name, sd->status.account_id, sd->status.char_id); return; } - c = pc_class2idx(c); + c = pc_class2idx(c); do { flag=0; for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){ diff --git a/src/map/pc.h b/src/map/pc.h index 05368d6d5..dcef362fd 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -7,7 +7,7 @@ #include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus #include "../common/timer.h" // INVALID_TIMER #include "battle.h" // battle_config -#include "map.h" // struct map_session_data +#include "map.h" // JOB_*, struct map_session_data #include "status.h" // OPTION_* #include "unit.h" // unit_stop_attack(), unit_stop_walking() diff --git a/src/map/status.c b/src/map/status.c index ce0403885..3b6d0460a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -586,7 +586,7 @@ int status_set_sp(struct block_list *bl, unsigned int sp, int flag) int status_charge(struct block_list* bl, int hp, int sp) { - if(!((bl)->type&BL_CONSUME)) + if(!(bl->type&BL_CONSUME)) return hp+sp; //Assume all was charged so there are no 'not enough' fails. return status_damage(NULL, bl, hp, sp, 0, 3); } diff --git a/src/map/vending.c b/src/map/vending.c index 45ec08edf..4e4a9b729 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -237,12 +237,6 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool return; } - if ( map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) - { - clif_displaymessage (sd->fd, msg_txt(276)); - return; //Can't vend in novending mapflag maps. - } - // check number of items in shop if( count < 1 || count > MAX_VENDING || count > 2 + vending_skill_lvl ) { // invalid item count |