diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/map.c | 3 | ||||
-rw-r--r-- | src/map/map.h | 5 | ||||
-rw-r--r-- | src/map/skill.c | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c index 6212493c8..440634467 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3058,6 +3058,8 @@ static int map_getcellp(struct map_data *m, const struct block_list *bl, int16 x return (cell.icewall); case CELL_CHKNOICEWALL: return (cell.noicewall); + case CELL_CHKNOSKILL: + return (cell.noskill); // special checks case CELL_CHKPASS: @@ -3122,6 +3124,7 @@ static void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) case CELL_NOCHAT: map->list[m].cell[j].nochat = flag; break; case CELL_ICEWALL: map->list[m].cell[j].icewall = flag; break; case CELL_NOICEWALL: map->list[m].cell[j].noicewall = flag; break; + case CELL_NOSKILL: map->list[m].cell[j].noskill = flag; break; default: ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell); diff --git a/src/map/map.h b/src/map/map.h index ace2a35a1..6c09746a6 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -656,6 +656,7 @@ typedef enum { CELL_NOCHAT, CELL_ICEWALL, CELL_NOICEWALL, + CELL_NOSKILL, } cell_t; @@ -680,6 +681,7 @@ typedef enum { CELL_CHKNOCHAT, CELL_CHKICEWALL, CELL_CHKNOICEWALL, + CELL_CHKNOSKILL, } cell_chk; @@ -698,7 +700,8 @@ struct mapcell { novending : 1, nochat : 1, icewall : 1, - noicewall : 1; + noicewall : 1, + noskill : 1; #ifdef CELL_NOSTACK int cell_bl; //Holds amount of bls in this cell. diff --git a/src/map/skill.c b/src/map/skill.c index 069db55df..875c06a5b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1009,6 +1009,9 @@ static int skillnotok(uint16 skill_id, struct map_session_data *sd) if (pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL)) return 0; // can do any damn thing they want + if (map->getcell(sd->bl.m, &sd->bl, sd->bl.x, sd->bl.y, CELL_CHKNOSKILL)) + return 1; // block usage on 'noskill' cells [Wolfie] + if( skill_id == AL_TELEPORT && sd->skillitem == skill_id && sd->skillitemlv > 2 ) return 0; // Teleport lv 3 bypasses this check.[Inkfish] |