summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-09 23:34:57 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-09 23:34:57 +0000
commit31840066c4795124a887cd12996cf7dc13fcef25 (patch)
treec419bd14a3f8d173d78e7f31c703c591169d802f
parentac2c5e7b2d74728563371ed204d84369ba743ac6 (diff)
downloadhercules-31840066c4795124a887cd12996cf7dc13fcef25.tar.gz
hercules-31840066c4795124a887cd12996cf7dc13fcef25.tar.bz2
hercules-31840066c4795124a887cd12996cf7dc13fcef25.tar.xz
hercules-31840066c4795124a887cd12996cf7dc13fcef25.zip
* Added 'OnInterIfInitOnce' for WoE scripts & modified the WoE scripts as well [Ajarn & Codemaster] [Thanks to FREYA] [SVN 943]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@943 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt3
-rw-r--r--npc/Changelog.txt2
-rw-r--r--npc/guild/aldeg/aldeg_ev_agit.txt10
-rw-r--r--npc/guild/gefg/gefg_ev_agit.txt10
-rw-r--r--npc/guild/nguild/nguild_ev_agit.txt8
-rw-r--r--npc/guild/payg/payg_ev_agit.txt10
-rw-r--r--npc/guild/prtg/prtg_ev_agit.txt10
-rw-r--r--src/map/chrif.c10
8 files changed, 36 insertions, 27 deletions
diff --git a/Changelog.txt b/Changelog.txt
index f895cac36..ac9cb0c5a 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
-01/09
+01/0
+ * Added 'OnInterIfInitOnce' for WoE scripts & modified the WoE scripts as well [Ajarn & Codemaster] [Thanks to FREYA] [SVN 943]
* Added the @sound command and the NPC command of soundeffectall
- works just like soundeffect, but plays for everyone in the area [Codemaster] [SVN 942]
* Don't allow Pets to attack Guardians outside of WoE [Codemaster] [SVN 940]
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index 56da03a80..a8f61beae 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -34,6 +34,8 @@ Other Ppl
Date Added
======
+01/09/05
+ * Modified guild war scripts to fix a bug for duplicate guild storages. [Codemaster & Ajarn]
8/1
* Added the new Yuno field warps by Sara-chan [celest]
diff --git a/npc/guild/aldeg/aldeg_ev_agit.txt b/npc/guild/aldeg/aldeg_ev_agit.txt
index 8287ad417..942e479b7 100644
--- a/npc/guild/aldeg/aldeg_ev_agit.txt
+++ b/npc/guild/aldeg/aldeg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
aldeg_cas01.gat,216,24,0 script Agit_A01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas01.gat",0,"::OnRecvCastleA01";
end;
OnRecvCastleA01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
aldeg_cas02.gat,214,24,0 script Agit_A02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas02.gat",0,"::OnRecvCastleA02";
end;
OnRecvCastleA02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
aldeg_cas03.gat,206,32,0 script Agit_A03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas03.gat",0,"::OnRecvCastleA03";
end;
OnRecvCastleA03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
aldeg_cas04.gat,36,218,0 script Agit_A04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas04.gat",0,"::OnRecvCastleA04";
end;
OnRecvCastleA04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
aldeg_cas05.gat,28,102,0 script Agit_A05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "aldeg_cas05.gat",0,"::OnRecvCastleA05";
end;
OnRecvCastleA05:
diff --git a/npc/guild/gefg/gefg_ev_agit.txt b/npc/guild/gefg/gefg_ev_agit.txt
index 5be223f03..3ac4c7432 100644
--- a/npc/guild/gefg/gefg_ev_agit.txt
+++ b/npc/guild/gefg/gefg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
gefg_cas01.gat,198,182,0 script Agit_G01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
end;
OnRecvCastleG01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
gefg_cas02.gat,176,178,0 script Agit_G02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
end;
OnRecvCastleG02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
gefg_cas03.gat,245,167,0 script Agit_G03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
end;
OnRecvCastleG03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
gefg_cas04.gat,174,178,0 script Agit_G04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
end;
OnRecvCastleG04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
gefg_cas05.gat,194,184,0 script Agit_G05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
end;
OnRecvCastleG05:
diff --git a/npc/guild/nguild/nguild_ev_agit.txt b/npc/guild/nguild/nguild_ev_agit.txt
index d690fb348..84074a72b 100644
--- a/npc/guild/nguild/nguild_ev_agit.txt
+++ b/npc/guild/nguild/nguild_ev_agit.txt
@@ -15,7 +15,7 @@
// Castle 1 ================================================================
nguild_alde.gat,0,0,0 script Agit_N01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_alde.gat",0,"::OnRecvCastleN01";
end;
OnRecvCastleN01:
@@ -38,7 +38,7 @@ OnAgitEnd:
// Castle 2 ================================================================
nguild_gef.gat,0,0,0 script Agit_N02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_gef.gat",0,"::OnRecvCastleN02";
end;
OnRecvCastleN02:
@@ -61,7 +61,7 @@ OnAgitEnd:
// Castle 3 ================================================================
nguild_pay.gat,0,0,0 script Agit_N03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_pay.gat",0,"::OnRecvCastleN03";
end;
OnRecvCastleN03:
@@ -84,7 +84,7 @@ OnAgitEnd:
// Castle 4 ================================================================
nguild_prt.gat,0,0,0 script Agit_N04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "nguild_prt.gat",0,"::OnRecvCastleN04";
end;
OnRecvCastleN04:
diff --git a/npc/guild/payg/payg_ev_agit.txt b/npc/guild/payg/payg_ev_agit.txt
index a873f9bea..95b735ed9 100644
--- a/npc/guild/payg/payg_ev_agit.txt
+++ b/npc/guild/payg/payg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
payg_cas01.gat,139,139,0 script Agit_Py01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas01.gat",0,"::OnRecvCastlePy01";
end;
OnRecvCastlePy01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
payg_cas02.gat,39,25,0 script Agit_Py02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas02.gat",0,"::OnRecvCastlePy02";
end;
OnRecvCastlePy02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
payg_cas03.gat,269,265,0 script Agit_Py03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas03.gat",0,"::OnRecvCastlePy03";
end;
OnRecvCastlePy03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
payg_cas04.gat,271,29,0 script Agit_Py04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas04.gat",0,"::OnRecvCastlePy04";
end;
OnRecvCastlePy04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
payg_cas05.gat,30,30,0 script Agit_Py05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "payg_cas05.gat",0,"::OnRecvCastlePy05";
end;
OnRecvCastlePy05:
diff --git a/npc/guild/prtg/prtg_ev_agit.txt b/npc/guild/prtg/prtg_ev_agit.txt
index 6c83ad390..b654aa037 100644
--- a/npc/guild/prtg/prtg_ev_agit.txt
+++ b/npc/guild/prtg/prtg_ev_agit.txt
@@ -16,7 +16,7 @@
// Castle 1 ================================================================
prtg_cas01.gat,197,197,0 script Agit_Pt01 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas01.gat",0,"::OnRecvCastlePt01";
end;
OnRecvCastlePt01:
@@ -39,7 +39,7 @@ OnAgitEnd:
// Castle 2 ================================================================
prtg_cas02.gat,158,174,0 script Agit_Pt02 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas02.gat",0,"::OnRecvCastlePt02";
end;
OnRecvCastlePt02:
@@ -62,7 +62,7 @@ OnAgitEnd:
// Castle 3 ================================================================
prtg_cas03.gat,17,221,0 script Agit_Pt03 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas03.gat",0,"::OnRecvCastlePt03";
end;
OnRecvCastlePt03:
@@ -85,7 +85,7 @@ OnAgitEnd:
// Castle 4 ================================================================
prtg_cas04.gat,292,14,0 script Agit_Pt04 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas04.gat",0,"::OnRecvCastlePt04";
end;
OnRecvCastlePt04:
@@ -108,7 +108,7 @@ OnAgitEnd:
// Castle 5 ================================================================
prtg_cas05.gat,266,266,0 script Agit_Pt05 -1,{
-OnInterIfInit:
+OnInterIfInitOnce:
GetCastleData "prtg_cas05.gat",0,"::OnRecvCastlePt05";
end;
OnRecvCastlePt05:
diff --git a/src/map/chrif.c b/src/map/chrif.c
index c04630300..f7e6781d6 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -36,13 +36,14 @@ static const int packet_len_table[0x20] = {
-1,-1,10, 6,11,-1, 0, 0, // 2b10-2b17
};
-int char_fd;
+int char_fd = -1;
int srvinfo;
static char char_ip_str[16];
static int char_ip;
static int char_port = 6121;
static char userid[24], passwd[24];
-static int chrif_state;
+static int chrif_state = 0;
+static int char_init_done = 0;
// 設定ファイル読み込み関係
/*==========================================
@@ -256,6 +257,11 @@ int chrif_connectack(int fd)
ShowStatus(tmp_output);
sprintf(tmp_output,"Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
ShowStatus(tmp_output);
+ if(!char_init_done) {
+ char_init_done = 1;
+ sprintf(tmp_output,"Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
+ ShowStatus(tmp_output);
+ }
// <Agit> Run Event [AgitInit]
// printf("NPC_Event:[OnAgitInit] do (%d) events (Agit Initialize).\n", npc_event_doall("OnAgitInit"));