diff options
author | Haru <haru@dotalux.com> | 2015-12-05 22:03:20 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-05 22:03:20 +0100 |
commit | 079e7ed9d05b5f80f5106a164762ad1d39e64c92 (patch) | |
tree | 61ccebe4ef0cb135152f2d4ec96e4af7a14bc3fa /src/map/instance.c | |
parent | 1eecc1573a82bdcb48799179d156f37dbffba4a8 (diff) | |
download | hercules-079e7ed9d05b5f80f5106a164762ad1d39e64c92.tar.gz hercules-079e7ed9d05b5f80f5106a164762ad1d39e64c92.tar.bz2 hercules-079e7ed9d05b5f80f5106a164762ad1d39e64c92.tar.xz hercules-079e7ed9d05b5f80f5106a164762ad1d39e64c92.zip |
Removed some unnecessary assertions
- Follow-up to 81e0257
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/instance.c')
-rw-r--r-- | src/map/instance.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/map/instance.c b/src/map/instance.c index 0f6e475b2..1649c751e 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -151,16 +151,25 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ return i; } -/*-------------------------------------- +/** * Add a map to the instance using src map "name" - *--------------------------------------*/ + * + * @param name Source map name. + * @param instance_id The destination instance ID. + * @param usebasename Whether to generate a standard instance map name (only used if map_name is not NULL). + * @param map_name The name for the instanced map (may be NULL to generate a new one). + * @return The generated map's index. + * @retval -1 Map or instance not found. + * @retval -2 Duplicate map name. + * @retval -3 No more map indices available. + * @retval -4 Source map is already an instance. + **/ int instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) { int16 m = map->mapname2mapid(name); int i, im = -1; size_t num_cell, size, j; nullpo_retr(-1, name); - nullpo_retr(-1, map_name); if( m < 0 ) return -1; // source map not found |