summaryrefslogtreecommitdiff
path: root/npc/guild
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-04 18:37:29 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-04 18:37:29 +0000
commit262e60ab0b9cfc1f942a7b3ef11f7ed3abc7b208 (patch)
tree82cb02f8048521c7479ff012511a066612f6d439 /npc/guild
parentce4352cfef6f07bf3b4c0324f48f880c5c74f041 (diff)
downloadhercules-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 'npc/guild')
-rw-r--r--npc/guild/agit_template.txt14
1 files changed, 4 insertions, 10 deletions
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) {