diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/map.c | 31 | ||||
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 2 |
5 files changed, 22 insertions, 21 deletions
diff --git a/src/map/map.c b/src/map/map.c index 37a8eab5d..765ec6086 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2463,21 +2463,22 @@ int map_random_dir(struct block_list *bl, short *x, short *y) } // gatŒn -inline static struct mapcell map_gat2cell(int gat) -{ - struct mapcell cell = {0}; - switch( gat ) - { - case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground - case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground - case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? - case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water - case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? - case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable) - case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? - default: - ShowWarning("map_gat2cell: unrecognized gat type '%d'\n", gat); - break; +inline static struct mapcell map_gat2cell(int gat) { + struct mapcell cell; + + memset(&cell,0,sizeof(struct mapcell)); + + switch( gat ) { + case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground + case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground + case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? + case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water + case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? + case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable) + case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ??? + default: + ShowWarning("map_gat2cell: unrecognized gat type '%d'\n", gat); + break; } return cell; diff --git a/src/map/mob.c b/src/map/mob.c index c59febd42..0516295cc 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1793,7 +1793,7 @@ static struct item_drop* mob_setdropitem(int nameid, int qty) drop->item_data.identify = itemdb_isidentified(nameid); drop->next = NULL; return drop; -}; +} /*========================================== * Initializes the delay drop structure for mob-looted items. @@ -1804,7 +1804,7 @@ static struct item_drop* mob_setlootitem(struct item* item) memcpy(&drop->item_data, item, sizeof(struct item)); drop->next = NULL; return drop; -}; +} /*========================================== * item drop with delay (timer function) diff --git a/src/map/pc.c b/src/map/pc.c index 27e54b344..215086532 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5575,12 +5575,12 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int unsigned int pc_maxbaselv(struct map_session_data *sd) { return max_level[pc_class2idx(sd->status.class_)][0]; -}; +} unsigned int pc_maxjoblv(struct map_session_data *sd) { return max_level[pc_class2idx(sd->status.class_)][1]; -}; +} /*========================================== * base level‘¤•K—v??’lŒvŽZ diff --git a/src/map/pc.h b/src/map/pc.h index c5f1aaa02..6352d362c 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -110,7 +110,7 @@ struct map_session_data { unsigned int abra_flag : 2; // Abracadabra bugfix by Aru unsigned int autocast : 1; // Autospell flag [Inkfish] unsigned int autotrade : 1; //By Fantik - unsigned int reg_dirty : 3; //By Skotlex (marks whether registry variables have been saved or not yet) + unsigned int reg_dirty : 4; //By Skotlex (marks whether registry variables have been saved or not yet) unsigned int showdelay :1; unsigned int showexp :1; unsigned int showzeny :1; diff --git a/src/map/skill.c b/src/map/skill.c index 98bb181a3..c2c4f23de 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -268,7 +268,7 @@ int skill_get_casttype (int id) if (skill_get_nk(id)&NK_NO_DAMAGE) return CAST_NODAMAGE; return CAST_DAMAGE; -}; +} //Returns actual skill range taking into account attack range and AC_OWL [Skotlex] int skill_get_range2 (struct block_list *bl, int id, int lv) |