summaryrefslogtreecommitdiff
path: root/src/char/int_guild.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-07 19:45:24 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-07 19:45:24 +0000
commitee657a1fb7fa9b9f9f4d89bdaec4ef8544ccd739 (patch)
treefae0d7f7fd4be7e6e173e1eb0e2ccb48df40d7c5 /src/char/int_guild.c
parente4b44bb0c6d412fe8d7e9f4877fe7f55356cb56d (diff)
downloadhercules-ee657a1fb7fa9b9f9f4d89bdaec4ef8544ccd739.tar.gz
hercules-ee657a1fb7fa9b9f9f4d89bdaec4ef8544ccd739.tar.bz2
hercules-ee657a1fb7fa9b9f9f4d89bdaec4ef8544ccd739.tar.xz
hercules-ee657a1fb7fa9b9f9f4d89bdaec4ef8544ccd739.zip
* Reverted r14563, due to multiple issues which render the source malfunctioning or uncompilable. To be redone later (bugreport:4627).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/int_guild.c')
-rw-r--r--src/char/int_guild.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 27bfcedc3..31cceeff0 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -42,14 +42,14 @@ int inter_guild_tostr(char* str, struct guild* g)
int i, c, len;
// save guild base info
- len = snprintf(str, sizeof str, "%d\t%s\t%s\t%d,%d,%"PRIu64",%d,%d\t%s#\t%s#\t",
+ len = sprintf(str, "%d\t%s\t%s\t%d,%d,%"PRIu64",%d,%d\t%s#\t%s#\t",
g->guild_id, g->name, g->master, g->guild_lv, g->max_member, g->exp, g->skill_point, 0, g->mes1, g->mes2);
// save guild member info
for(i = 0; i < g->max_member; i++)
{
struct guild_member *m = &g->member[i];
- len += snprintf(str + len, sizeof (str + len), "%d,%d,%d,%d,%d,%d,%d,%"PRIu64",%d,%d\t%s\t",
+ len += sprintf(str + len, "%d,%d,%d,%d,%d,%d,%d,%"PRIu64",%d,%d\t%s\t",
m->account_id, m->char_id,
m->hair, m->hair_color, m->gender,
m->class_, m->lv, m->exp, m->exp_payper, m->position,
@@ -59,26 +59,26 @@ int inter_guild_tostr(char* str, struct guild* g)
// save guild position info
for(i = 0; i < MAX_GUILDPOSITION; i++) {
struct guild_position *p = &g->position[i];
- len += snprintf(str + len, sizeof (str + len), "%d,%d\t%s#\t", p->mode, p->exp_mode, p->name);
+ len += sprintf(str + len, "%d,%d\t%s#\t", p->mode, p->exp_mode, p->name);
}
// save guild emblem
- len += snprintf(str + len, sizeof (str + len), "%d,%d,", g->emblem_len, g->emblem_id);
+ len += sprintf(str + len, "%d,%d,", g->emblem_len, g->emblem_id);
for(i = 0; i < g->emblem_len; i++) {
- len += snprintf(str + len, sizeof (str + len), "%02x", (unsigned char)(g->emblem_data[i]));
+ len += sprintf(str + len, "%02x", (unsigned char)(g->emblem_data[i]));
}
- len += snprintf(str + len, sizeof (str + len), "$\t");
+ len += sprintf(str + len, "$\t");
// save guild alliance info
c = 0;
for(i = 0; i < MAX_GUILDALLIANCE; i++)
if (g->alliance[i].guild_id > 0)
c++;
- len += snprintf(str + len, sizeof (str + len), "%d\t", c);
+ len += sprintf(str + len, "%d\t", c);
for(i = 0; i < MAX_GUILDALLIANCE; i++) {
struct guild_alliance *a = &g->alliance[i];
if (a->guild_id > 0)
- len += snprintf(str + len, sizeof (str + len), "%d,%d\t%s\t", a->guild_id, a->opposition, a->name);
+ len += sprintf(str + len, "%d,%d\t%s\t", a->guild_id, a->opposition, a->name);
}
// save guild expulsion info
@@ -86,19 +86,19 @@ int inter_guild_tostr(char* str, struct guild* g)
for(i = 0; i < MAX_GUILDEXPULSION; i++)
if (g->expulsion[i].account_id > 0)
c++;
- len += snprintf(str + len, sizeof (str + len), "%d\t", c);
+ len += sprintf(str + len, "%d\t", c);
for(i = 0; i < MAX_GUILDEXPULSION; i++) {
struct guild_expulsion *e = &g->expulsion[i];
if (e->account_id > 0)
- len += snprintf(str + len, sizeof (str + len), "%d,%d,%d,%d\t%s\t%s\t%s#\t",
+ len += sprintf(str + len, "%d,%d,%d,%d\t%s\t%s\t%s#\t",
e->account_id, 0, 0, 0, e->name, "#", e->mes );
}
// save guild skill info
for(i = 0; i < MAX_GUILDSKILL; i++) {
- len += snprintf(str + len, sizeof (str + len), "%d,%d ", g->skill[i].id, g->skill[i].lv);
+ len += sprintf(str + len, "%d,%d ", g->skill[i].id, g->skill[i].lv);
}
- len += snprintf(str + len, sizeof (str + len), "\t");
+ len += sprintf(str + len, "\t");
return 0;
}
@@ -309,7 +309,7 @@ int inter_guildcastle_tostr(char *str, struct guild_castle *gc)
{
int len;
- len = snprintf(str, sizeof str, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ len = sprintf(str, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
gc->castle_id, gc->guild_id, gc->economy, gc->defense, gc->triggerE,
gc->triggerD, gc->nextTime, gc->payTime, gc->createTime, gc->visibleC,
gc->guardian[0].visible, gc->guardian[1].visible, gc->guardian[2].visible, gc->guardian[3].visible,
@@ -369,7 +369,7 @@ int inter_guild_readdb(void)
char line[1024];
char path[1024];
- snprintf(path, sizeof path, "%s%s", db_path, "/exp_guild.txt");
+ sprintf(path, "%s%s", db_path, "/exp_guild.txt");
fp = fopen(path, "r");
if (fp == NULL) {
ShowError("can't read db/exp_guild.txt\n");
@@ -999,7 +999,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
strcpy(g->position[ 0].name, "GuildMaster");
strcpy(g->position[MAX_GUILDPOSITION-1].name, "Newbie");
for(i = 1; i < MAX_GUILDPOSITION-1; i++)
- snprintf(g->position[i].name, sizeof g->position[i].name, "Position %d", i + 1);
+ sprintf(g->position[i].name, "Position %d", i + 1);
// ここでギルド情報計算が必要と思われる
g->max_member = 16;