diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-26 10:37:45 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-26 10:37:45 +0000 |
commit | 49e9510c432987393d10ec1b8b1c2d416c9feb42 (patch) | |
tree | 4d930ebf1094ad5972cb8ba20b89d12ce74d4f3c /src/map/atcommand.c | |
parent | fda87bd7ef5a71f4f5d5e604de1b15c58763efdd (diff) | |
download | hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.gz hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.bz2 hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.xz hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.zip |
Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 233376655..38de48e57 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2394,7 +2394,7 @@ int atcommand_monster(const int fd, struct map_session_data* sd, const char* com ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, sd->bl.x, sd->bl.y); count = 0; - range = (int)sqrt(number) +2; // calculation of an odd number (+ 4 area around) + range = (int)sqrt((float)number) +2; // calculation of an odd number (+ 4 area around) for (i = 0; i < number; i++) { map_search_freecell(&sd->bl, 0, &mx, &my, range, range, 0); k = mob_once_spawn(sd, sd->bl.m, mx, my, name, mob_id, 1, ""); @@ -5365,7 +5365,7 @@ int atcommand_effect(const int fd, struct map_session_data* sd, const char* comm return -1; } - clif_specialeffect(&sd->bl, type, flag); + clif_specialeffect(&sd->bl, type, (send_target)flag); clif_displaymessage(fd, msg_txt(229)); // Your effect has changed. return 0; } @@ -6997,9 +6997,8 @@ int atcommand_mobinfo(const int fd, struct map_session_data* sd, const char* com *------------------------------------------*/ int atshowmobs_timer(int tid, unsigned int tick, int id, int data) { - struct map_session_data *sd; - - if (!session[id] || (sd = session[id]->session_data) == NULL) + struct map_session_data* sd = map_id2sd(id); + if( sd == NULL ) return 0; clif_viewpoint(sd, 1, 2, 0, 0, data, 0xFFFFFF); |