diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-29 17:22:35 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-29 17:22:35 +0000 |
commit | 70028b45b1a73422867cf1432ea1dc29a613fc98 (patch) | |
tree | 9f6b686e2cbb09a5825a0ea48be032a3d2a30a7f /src | |
parent | 2d5a97a322c5c3d9665ba96deb5daa4d6188c28d (diff) | |
download | hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.tar.gz hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.tar.bz2 hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.tar.xz hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@859 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/char/int_guild.c | 6 | ||||
-rw-r--r-- | src/char_sql/int_guild.c | 6 | ||||
-rw-r--r-- | src/map/script.c | 8 |
3 files changed, 14 insertions, 6 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c index dbd7ee615..8577b2a66 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1111,8 +1111,10 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, if (g->member[i].online) g->connect_member++; } - // 平均レベル - g->average_lv = alv / c; + + if (c) + // 平均レベル + g->average_lv = alv / c; return 0; } diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c index 030201aa4..5fee88511 100644 --- a/src/char_sql/int_guild.c +++ b/src/char_sql/int_guild.c @@ -1294,8 +1294,10 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id, if( g->member[i].online ) g->connect_member++; } - // 平均レベル - g->average_lv=alv/c; + + if (c) + // 平均レベル + g->average_lv=alv/c; sprintf(tmp_sql, "UPDATE `%s` SET `connect_member`=%d,`average_lv`=%d WHERE `guild_id`='%d'", guild_db, g->connect_member, g->average_lv, g->guild_id); if(mysql_query(&mysql_handle, tmp_sql) ) diff --git a/src/map/script.c b/src/map/script.c index 91245d19e..788c755e5 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5466,14 +5466,18 @@ int buildin_strmobinfo(struct script_state *st) if(num==1) { char *buf; buf=aCalloc(24, 1); - buf=mob_db[class].name; +// buf=mob_db[class].name; +// for string assignments you would need to go for c++ [Shinomori] + strcpy(buf,mob_db[class].name); push_str(st->stack,C_STR,buf); return 0; } else if(num==2) { char *buf; buf=aCalloc(24, 1); - buf=mob_db[class].jname; +// buf=mob_db[class].jname; +// for string assignments you would need to go for c++ [Shinomori] + strcpy(buf,mob_db[class].jname); push_str(st->stack,C_STR,buf); return 0; } |