summaryrefslogtreecommitdiff
path: root/src/char/int_guild.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_guild.c')
-rw-r--r--src/char/int_guild.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index df91e4de4..3b41e375f 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1836,16 +1836,9 @@ int mapif_parse_GuildCastleDataLoad(int fd,int castle_id,int index)
case 7: return mapif_guild_castle_dataload(gc.castle_id,index,gc.payTime); break;
case 8: return mapif_guild_castle_dataload(gc.castle_id,index,gc.createTime); break;
case 9: return mapif_guild_castle_dataload(gc.castle_id,index,gc.visibleC); break;
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- return mapif_guild_castle_dataload(gc.castle_id,index,gc.guardian[index-10].visible); break;
default:
+ if (index > 9 && index <= 9+MAX_GUARDIANS)
+ return mapif_guild_castle_dataload(gc.castle_id,index,gc.guardian[index-10].visible);
ShowError("mapif_parse_GuildCastleDataLoad ERROR!! (Not found index=%d)\n", index);
return 0;
}
@@ -1880,16 +1873,11 @@ int mapif_parse_GuildCastleDataSave(int fd,int castle_id,int index,int value)
case 7: gc.payTime = value; break;
case 8: gc.createTime = value; break;
case 9: gc.visibleC = value; break;
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- gc.guardian[index-10].visible = value; break;
default:
+ if (index > 9 && index <= 9+MAX_GUARDIANS) {
+ gc.guardian[index-10].visible = value;
+ break;
+ }
ShowError("mapif_parse_GuildCastleDataSave ERROR!! (Not found index=%d)\n", index);
return 0;
}