From 262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208 Mon Sep 17 00:00:00 2001 From: gepard1984 Date: Sun, 4 Mar 2012 18:37:29 +0000 Subject: - 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 --- npc/guild/agit_template.txt | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'npc/guild/agit_template.txt') diff --git a/npc/guild/agit_template.txt b/npc/guild/agit_template.txt index 52d1d94c3..8381f9ca3 100644 --- a/npc/guild/agit_template.txt +++ b/npc/guild/agit_template.txt @@ -57,12 +57,6 @@ - script Gld_Agit_Manager::Gld_Agit_Manager -1,{ end; -// Load (or reload) specific information for a castle. -OnInterIfInitOnce: - if (strnpcinfo(0) == "Gld_Agit_Manager") end; - GetCastleData strnpcinfo(2),0,strnpcinfo(0) + "::OnRecvCastle"; - end; - // War of Emperium has started. OnAgitStart: if (strnpcinfo(0) == "Gld_Agit_Manager") end; @@ -128,7 +122,7 @@ OnAgitBreak: MapRespawnGuildID strnpcinfo(2),.@GID,2; // Refresh castle data, disable Kafra and reset Invest information. - GetCastleData strnpcinfo(2),0,strnpcinfo(0)+"::OnRecvCastle"; + donpcevent strnpcinfo(0)+"::OnRecvCastle"; disablenpc "Kafra Staff#"+strnpcinfo(2); for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) { SetCastleData strnpcinfo(2), .@i, 0; @@ -167,12 +161,12 @@ OnGuildBreak: // Wait before refreshing guild information. sleep 7000; Announce "Guild Base [" + GetCastleName(strnpcinfo(2)) + "] has been abandoned.",0; - GetCastleData strnpcinfo(2),0,strnpcinfo(0)+"::OnRecvCastle"; + donpcevent strnpcinfo(0)+"::OnRecvCastle"; end; +OnAgitInit: OnRecvCastle: - RequestGuildInfo GetCastleData(strnpcinfo(2),1); - + if (strnpcinfo(0) == "Gld_Agit_Manager") end; // Spawn Monsters if the castle is empty. set .@GID, GetCastleData(strnpcinfo(2),1); if (.@GID == 0) { -- cgit v1.2.3-70-g09d2