summaryrefslogtreecommitdiff
path: root/npc
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
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')
-rw-r--r--npc/guild/agit_template.txt14
-rw-r--r--npc/guild2/arug_cas01.txt8
-rw-r--r--npc/guild2/arug_cas02.txt8
-rw-r--r--npc/guild2/arug_cas03.txt8
-rw-r--r--npc/guild2/arug_cas04.txt8
-rw-r--r--npc/guild2/arug_cas05.txt8
-rw-r--r--npc/guild2/schg_cas01.txt8
-rw-r--r--npc/guild2/schg_cas02.txt8
-rw-r--r--npc/guild2/schg_cas03.txt8
-rw-r--r--npc/guild2/schg_cas04.txt8
-rw-r--r--npc/guild2/schg_cas05.txt8
11 files changed, 24 insertions, 70 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) {
diff --git a/npc/guild2/arug_cas01.txt b/npc/guild2/arug_cas01.txt
index 37127e940..df33a8412 100644
--- a/npc/guild2/arug_cas01.txt
+++ b/npc/guild2/arug_cas01.txt
@@ -29,12 +29,8 @@
arug_cas01,1,1,0 script Manager#aru01_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "arug_cas01",0,"::OnRecvCastleAr01";
- end;
-
+OnAgitInit2:
OnRecvCastleAr01:
- RequestGuildInfo GetCastleData("arug_cas01",1);
if (GetCastleData("arug_cas01",1) == 0) {
donpcevent "Manager#aru01_02::Onstart";
}
@@ -2718,7 +2714,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "arug_cas01",GetCastleData("arug_cas01",1),2;
- GetCastleData "arug_cas01",0,"::OnRecvCastleAr01";
+ donpcevent "::OnRecvCastleAr01";
end;
OnTimer10000:
diff --git a/npc/guild2/arug_cas02.txt b/npc/guild2/arug_cas02.txt
index 8ebede317..f28c80ecc 100644
--- a/npc/guild2/arug_cas02.txt
+++ b/npc/guild2/arug_cas02.txt
@@ -32,12 +32,8 @@
arug_cas02,1,1,0 script Manager#aru02_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "arug_cas02",0,"::OnRecvCastleAr02";
- end;
-
+OnAgitInit2:
OnRecvCastleAr02:
- RequestGuildInfo GetCastleData("arug_cas02",1);
if (GetCastleData("arug_cas02",1) == 0) {
donpcevent "Manager#aru02_02::Onstart";
}
@@ -2679,7 +2675,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "arug_cas02",GetCastleData("arug_cas02",1),2;
- GetCastleData "arug_cas02",0,"::OnRecvCastleAr02";
+ donpcevent "::OnRecvCastleAr02";
end;
OnTimer10000:
diff --git a/npc/guild2/arug_cas03.txt b/npc/guild2/arug_cas03.txt
index de6601362..40b9d0a4c 100644
--- a/npc/guild2/arug_cas03.txt
+++ b/npc/guild2/arug_cas03.txt
@@ -31,12 +31,8 @@
arug_cas03,1,1,0 script Manager#aru03_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "arug_cas03",0,"::OnRecvCastleAr03";
- end;
-
+OnAgitInit2:
OnRecvCastleAr03:
- RequestGuildInfo GetCastleData("arug_cas03",1);
if (GetCastleData("arug_cas03",1) == 0) {
donpcevent "Manager#aru03_02::Onstart";
}
@@ -2724,7 +2720,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "arug_cas03",GetCastleData("arug_cas03",1),2;
- GetCastleData "arug_cas03",0,"::OnRecvCastleAr03";
+ donpcevent "::OnRecvCastleAr03";
end;
OnTimer10000:
diff --git a/npc/guild2/arug_cas04.txt b/npc/guild2/arug_cas04.txt
index 779c18898..cfed94895 100644
--- a/npc/guild2/arug_cas04.txt
+++ b/npc/guild2/arug_cas04.txt
@@ -32,12 +32,8 @@
arug_cas04,1,1,0 script Manager#aru04_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "arug_cas04",0,"::OnRecvCastlear04";
- end;
-
+OnAgitInit2:
OnRecvCastlear04:
- RequestGuildInfo GetCastleData("arug_cas04",1);
if (GetCastleData("arug_cas04",1) == 0) {
donpcevent "Manager#aru04_02::Onstart";
}
@@ -2728,7 +2724,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "arug_cas04",GetCastleData("arug_cas04",1),2;
- GetCastleData "arug_cas04",0,"::OnRecvCastlear04";
+ donpcevent "::OnRecvCastlear04";
end;
OnTimer10000:
diff --git a/npc/guild2/arug_cas05.txt b/npc/guild2/arug_cas05.txt
index 8f97102da..fdb2f410f 100644
--- a/npc/guild2/arug_cas05.txt
+++ b/npc/guild2/arug_cas05.txt
@@ -32,12 +32,8 @@
arug_cas05,1,1,0 script Manager#aru05_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "arug_cas05",0,"::OnRecvCastlear05";
- end;
-
+OnAgitInit2:
OnRecvCastlear05:
- RequestGuildInfo GetCastleData("arug_cas05",1);
if (GetCastleData("arug_cas05",1) == 0) {
donpcevent "Manager#aru05_02::Onstart";
}
@@ -2728,7 +2724,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "arug_cas05",GetCastleData("arug_cas05",1),2;
- GetCastleData "arug_cas05",0,"::OnRecvCastlear05";
+ donpcevent "::OnRecvCastlear05";
end;
OnTimer10000:
diff --git a/npc/guild2/schg_cas01.txt b/npc/guild2/schg_cas01.txt
index b3e4e90ba..9b3dd6dde 100644
--- a/npc/guild2/schg_cas01.txt
+++ b/npc/guild2/schg_cas01.txt
@@ -30,12 +30,8 @@
schg_cas01,1,1,0 script Manager#sch01_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "schg_cas01",0,"::OnRecvCastleSc01";
- end;
-
+OnAgitInit2:
OnRecvCastleSc01:
- RequestGuildInfo GetCastleData("schg_cas01",1);
if (GetCastleData("schg_cas01",1) == 0) {
donpcevent "Manager#sch01_02::Onstart";
}
@@ -2726,7 +2722,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "schg_cas01",GetCastleData("schg_cas01",1),2;
- GetCastleData "schg_cas01",0,"::OnRecvCastlesc01";
+ donpcevent "::OnRecvCastlesc01";
end;
OnTimer10000:
diff --git a/npc/guild2/schg_cas02.txt b/npc/guild2/schg_cas02.txt
index 2553f335a..4903cc69e 100644
--- a/npc/guild2/schg_cas02.txt
+++ b/npc/guild2/schg_cas02.txt
@@ -32,12 +32,8 @@
schg_cas02,1,1,0 script Manager#sch02_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "schg_cas02",0,"::OnRecvCastleSc02";
- end;
-
+OnAgitInit2:
OnRecvCastlesc02:
- RequestGuildInfo GetCastleData("schg_cas02",1);
if (GetCastleData("schg_cas02",1) == 0) {
donpcevent "Manager#sch02_02::Onstart";
}
@@ -2660,7 +2656,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "schg_cas02",GetCastleData("schg_cas02",1),2;
- GetCastleData "schg_cas02",0,"::OnRecvCastlesc02";
+ donpcevent "::OnRecvCastlesc02";
end;
OnTimer10000:
diff --git a/npc/guild2/schg_cas03.txt b/npc/guild2/schg_cas03.txt
index c8dbe6b0b..fa201bf16 100644
--- a/npc/guild2/schg_cas03.txt
+++ b/npc/guild2/schg_cas03.txt
@@ -35,12 +35,8 @@
schg_cas03,1,1,0 script Manager#sch03_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "schg_cas03",0,"::OnRecvCastleSc03";
- end;
-
+OnAgitInit2:
OnRecvCastlesc03:
- RequestGuildInfo GetCastleData("schg_cas03",1);
if (GetCastleData("schg_cas03",1) == 0) {
donpcevent "Manager#sch03_02::Onstart";
}
@@ -2719,7 +2715,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "schg_cas03",GetCastleData("schg_cas03",1),2;
- GetCastleData "schg_cas03",0,"::OnRecvCastlesc03";
+ donpcevent "::OnRecvCastlesc03";
end;
OnTimer10000:
diff --git a/npc/guild2/schg_cas04.txt b/npc/guild2/schg_cas04.txt
index 53b6002cf..e8274bc68 100644
--- a/npc/guild2/schg_cas04.txt
+++ b/npc/guild2/schg_cas04.txt
@@ -27,12 +27,8 @@
schg_cas04,1,1,0 script Manager#sch04_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "schg_cas04",0,"::OnRecvCastlesc04";
- end;
-
+OnAgitInit2:
OnRecvCastlesc04:
- RequestGuildInfo GetCastleData("schg_cas04",1);
if (GetCastleData("schg_cas04",1) == 0) {
donpcevent "Manager#sch04_02::Onstart";
}
@@ -2723,7 +2719,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "schg_cas04",GetCastleData("schg_cas04",1),2;
- GetCastleData "schg_cas04",0,"::OnRecvCastlesc04";
+ donpcevent "::OnRecvCastlesc04";
end;
OnTimer10000:
diff --git a/npc/guild2/schg_cas05.txt b/npc/guild2/schg_cas05.txt
index 3ebdab671..d832a358a 100644
--- a/npc/guild2/schg_cas05.txt
+++ b/npc/guild2/schg_cas05.txt
@@ -27,12 +27,8 @@
schg_cas05,1,1,0 script Manager#sch05_02 111,{
end;
-OnInterIfInitOnce:
- GetCastleData "schg_cas05",0,"::OnRecvCastlesc05";
- end;
-
+OnAgitInit2:
OnRecvCastlesc05:
- RequestGuildInfo GetCastleData("schg_cas05",1);
if (GetCastleData("schg_cas05",1) == 0) {
donpcevent "Manager#sch05_02::Onstart";
}
@@ -2723,7 +2719,7 @@ OnStartArena:
end;
}
MapRespawnGuildID "schg_cas05",GetCastleData("schg_cas05",1),2;
- GetCastleData "schg_cas05",0,"::OnRecvCastlesc05";
+ donpcevent "::OnRecvCastlesc05";
end;
OnTimer10000: