diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-08 17:41:49 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-08 17:41:49 +0000 |
commit | 32d8ac256193c2caf9fe705b377739bbde541dc8 (patch) | |
tree | 7118dc27e4a4fa1b6860aa6a866bee110ac06a7b /src/map/mob.c | |
parent | 83c079bdb0de26af96c2da4155c384663b0e9945 (diff) | |
download | hercules-32d8ac256193c2caf9fe705b377739bbde541dc8.tar.gz hercules-32d8ac256193c2caf9fe705b377739bbde541dc8.tar.bz2 hercules-32d8ac256193c2caf9fe705b377739bbde541dc8.tar.xz hercules-32d8ac256193c2caf9fe705b377739bbde541dc8.zip |
* Cleaned up junk left in the code by the mapcache/mapindex update
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing
- Moved related processing to the interface (prevents duplicity)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index a7c8f878c..ebfe62aa1 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -311,10 +311,9 @@ struct mob_data *mob_once_spawn_sub(struct block_list *bl, int m, /*========================================== * The MOB appearance for one time (for scripts) *------------------------------------------*/ -int mob_once_spawn (struct map_session_data *sd, const char *mapname, - short x, short y, const char *mobname, int class_, int amount, const char *event) +int mob_once_spawn (struct map_session_data* sd, const char* mapname, short x, short y, const char* mobname, int class_, int amount, const char* event) { - struct mob_data *md = NULL; + struct mob_data* md = NULL; int m, count, lv = 255; if(sd) lv = sd->status.base_level; @@ -327,7 +326,8 @@ int mob_once_spawn (struct map_session_data *sd, const char *mapname, if (m < 0 || amount <= 0) // 値が異常なら召喚を止める return 0; - for (count = 0; count < amount; count++) { + for (count = 0; count < amount; count++) + { md = mob_once_spawn_sub(sd?&sd->bl:NULL, m, x, y, mobname, class_<0? mob_get_random_id(-class_-1, battle_config.random_monster_checklv?3:1, lv): @@ -336,8 +336,8 @@ int mob_once_spawn (struct map_session_data *sd, const char *mapname, if (!md) continue; if(class_ == MOBID_EMPERIUM) { - struct guild_castle *gc = guild_mapname2gc(map[md->bl.m].name); - struct guild *g = gc?guild_search(gc->guild_id):NULL; + struct guild_castle* gc = guild_mapname2gc(map[md->bl.m].name); + struct guild* g = gc?guild_search(gc->guild_id):NULL; if(gc) { md->guardian_data = aCalloc(1, sizeof(struct guardian_data)); md->guardian_data->castle = gc; |