diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-05-23 21:23:36 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-05-23 21:23:36 +0000 |
commit | f6bcd12cd633717e9e503bb453c85955e29cd519 (patch) | |
tree | 49225d619843accadf26532263f615392da5b8a2 /src/char/int_guild.c | |
parent | 9b9305b6b1a1a004c2ef909404daa705e956a5de (diff) | |
download | hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.gz hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.bz2 hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.xz hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.zip |
- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast time and delay reducibility by item scripts (cards and such)
- Fixed Martyr's Reckoning never triggering for gms with all skills
- Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter
- Made gm_skill_unconditional bypass skill blocking (guild timer, etc)
- Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059)
- Changed a few memsets to strncpy (reading past buffer is a bad idea)
- Sped up some memset operations (multiples of 4 are faster)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/int_guild.c')
-rw-r--r-- | src/char/int_guild.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 14297712f..2cf8b8b91 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -123,8 +123,8 @@ int inter_guild_fromstr(char *str, struct guild *g) { #ifndef TXT_SQL_CONVERT g->castle_id = tmp_int[5]; #endif - memcpy(g->name, tmp_str[0], NAME_LENGTH-1); - memcpy(g->master, tmp_str[1], NAME_LENGTH-1); + memcpy(g->name, tmp_str[0], NAME_LENGTH); + memcpy(g->master, tmp_str[1], NAME_LENGTH); memcpy(g->mes1, tmp_str[2], 60); memcpy(g->mes2, tmp_str[3], 120); g->mes1[strlen(g->mes1)-1] = 0; @@ -152,7 +152,7 @@ int inter_guild_fromstr(char *str, struct guild *g) { m->exp = exp; m->exp_payper = tmp_int[8]; m->position = tmp_int[9]; - memcpy(m->name, tmp_str[0], NAME_LENGTH-1); + memcpy(m->name, tmp_str[0], NAME_LENGTH); for(j = 0; j < 2 && str != NULL; j++) // 位置スキップ str = strchr(str + 1, '\t'); @@ -167,7 +167,7 @@ int inter_guild_fromstr(char *str, struct guild *g) { p->mode = tmp_int[0]; p->exp_mode = tmp_int[1]; tmp_str[0][strlen(tmp_str[0])-1] = 0; - memcpy(p->name, tmp_str[0], NAME_LENGTH-1); + memcpy(p->name, tmp_str[0], NAME_LENGTH); for(j = 0; j < 2 && str != NULL; j++) // 位置スキップ str = strchr(str+1, '\t'); @@ -204,7 +204,7 @@ int inter_guild_fromstr(char *str, struct guild *g) { return 1; a->guild_id = tmp_int[0]; a->opposition = tmp_int[1]; - memcpy(a->name, tmp_str[0], NAME_LENGTH-1); + memcpy(a->name, tmp_str[0], NAME_LENGTH); for(j = 0; j < 2 && str != NULL; j++) // 位置スキップ str = strchr(str + 1, '\t'); @@ -224,7 +224,7 @@ int inter_guild_fromstr(char *str, struct guild *g) { e->rsv1 = tmp_int[1]; e->rsv2 = tmp_int[2]; e->rsv3 = tmp_int[3]; - memcpy(e->name, tmp_str[0], NAME_LENGTH-1); + memcpy(e->name, tmp_str[0], NAME_LENGTH); memcpy(e->acc, tmp_str[1], 24); tmp_str[2][strlen(tmp_str[2])-1] = 0; memcpy(e->mes, tmp_str[2], 40); @@ -980,8 +980,8 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem } // memset(g, 0, sizeof(struct guild)); Meh... g->guild_id = guild_newid++; - memcpy(g->name, name, NAME_LENGTH-1); - memcpy(g->master, master->name, NAME_LENGTH-1); + memcpy(g->name, name, NAME_LENGTH); + memcpy(g->master, master->name, NAME_LENGTH); memcpy(&g->member[0], master, sizeof(struct guild_member)); g->position[0].mode = 0x11; @@ -1071,8 +1071,8 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in j = MAX_GUILDEXPULSION - 1; } g->expulsion[j].account_id = account_id; - memcpy(g->expulsion[j].acc, "dummy", NAME_LENGTH-1); - memcpy(g->expulsion[j].name, g->member[i].name, NAME_LENGTH-1); + strncpy(g->expulsion[j].acc, "dummy", NAME_LENGTH); + memcpy(g->expulsion[j].name, g->member[i].name, NAME_LENGTH); memcpy(g->expulsion[j].mes, mes, 40); } @@ -1344,7 +1344,7 @@ int mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_ for(j = 0; j < MAX_GUILDALLIANCE; j++) if (g[i]->alliance[j].guild_id == 0) { g[i]->alliance[j].guild_id = g[1-i]->guild_id; - memcpy(g[i]->alliance[j].name, g[1-i]->name, NAME_LENGTH-1); + memcpy(g[i]->alliance[j].name, g[1-i]->name, NAME_LENGTH); g[i]->alliance[j].opposition = flag & 1; break; } |