diff options
author | gepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-04 18:37:29 +0000 |
---|---|---|
committer | gepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-04 18:37:29 +0000 |
commit | 262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208 (patch) | |
tree | 82cb02f8048521c7479ff012511a066612f6d439 /src/map/clif.c | |
parent | ce4352cfef6f07bf3b4c0324f48f880c5c74f041 (diff) | |
download | hercules-262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208.tar.gz hercules-262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208.tar.bz2 hercules-262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208.tar.xz hercules-262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208.zip |
- Guild Castle code cleanup:
- removed `MAX_GUILDCASTLE` limit
- char-server now caches guild castles in `DBMap`
- improved guild castle SQL queries to support non-default values of `MAX_GUARDIANS`
- disallowed declaring guild castles on maps that are on other map-servers
- map-server now requests data for all guild castles from char-server on initial connect (bugreport:287)
- removed ''guildcastleinfo events'' as they were esentially duplicated ''OnAgitInit''
- optimized castle data load packets (bugreport:287)
- updated WoE scripts to reflect source changes (scripts no longer need or should request castle or guild data)
- updated related docs
- Added `db_size` macro.
- Replaced manual counting of castles occupied by a guild with `guild_checkcastles()` calls.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15657 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 51d5b802d..c50dd9ee2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7054,7 +7054,7 @@ void clif_guild_masterormember(struct map_session_data *sd) /// 01b6 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B <zeny>.L (ZC_GUILD_INFO2) void clif_guild_basicinfo(struct map_session_data *sd) { - int fd,i,t; + int fd; struct guild *g; struct guild_castle *gc = NULL; @@ -7080,13 +7080,7 @@ void clif_guild_basicinfo(struct map_session_data *sd) memcpy(WFIFOP(fd,46),g->name, NAME_LENGTH); memcpy(WFIFOP(fd,70),g->master, NAME_LENGTH); - for(i = 0, t = 0; i < MAX_GUILDCASTLE; i++) - { - gc = guild_castle_search(i); - if(gc && g->guild_id == gc->guild_id) - t++; - } - safestrncpy((char*)WFIFOP(fd,94),msg_txt(300+t),16); // "'N' castles" + safestrncpy((char*)WFIFOP(fd,94),msg_txt(300+guild_checkcastles(g)),16); // "'N' castles" WFIFOL(fd,110) = 0; // zeny WFIFOSET(fd,packet_len(0x1b6)); |