summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-11 21:44:37 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-11 21:44:37 +0000
commitd2a341dc093542a68a2770d6302ce48c99d82169 (patch)
tree05da03b5f1394ca300329bbb8310981ffc88aff6
parent738ce633b49293892638017c15152b87b776d101 (diff)
downloadhercules-d2a341dc093542a68a2770d6302ce48c99d82169.tar.gz
hercules-d2a341dc093542a68a2770d6302ce48c99d82169.tar.bz2
hercules-d2a341dc093542a68a2770d6302ce48c99d82169.tar.xz
hercules-d2a341dc093542a68a2770d6302ce48c99d82169.zip
Fixed @loadnpc not updating the script_event[] array
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9850 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/npc.h1
4 files changed, 6 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 7dc0051c3..6ea48a3a1 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/02/11
+ * Fixed @loadnpc not updating the script_event[] array
2007/02/10
* Fixed clif_party_message using an incorrect buffer length [ultramage]
* Cosmetic changes to the buildin section of script.c (use defines for
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index c7ad31805..d0fbdf291 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -27,6 +27,7 @@
#include "status.h"
#include "skill.h"
#include "mob.h"
+#include "npc.h"
#include "pet.h"
#include "mercenary.h" //[orn]
#include "battle.h"
@@ -5968,6 +5969,7 @@ int atcommand_loadnpc(const int fd, struct map_session_data* sd, const char* com
// add to list of script sources and run it
npc_addsrcfile((char *)message);
npc_parsesrcfile((char *)message);
+ npc_read_event_script();
clif_displaymessage(fd, msg_txt(262));
diff --git a/src/map/npc.c b/src/map/npc.c
index be3713b7b..cffe2a26e 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2825,7 +2825,7 @@ static int npc_read_event_script_sub(DBKey key,void *data,va_list ap)
return 0;
}
-static void npc_read_event_script(void)
+void npc_read_event_script(void)
{
int i;
unsigned char buf[64]="::";
diff --git a/src/map/npc.h b/src/map/npc.h
index 2f546ae0d..ea28964f5 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -81,6 +81,7 @@ int npc_remove_map(struct npc_data *nd);
void npc_unload_duplicates (struct npc_data *nd);
int npc_unload(struct npc_data *nd);
int npc_reload(void);
+void npc_read_event_script(void);
int npc_script_event(TBL_PC* sd, int type);
extern char *current_file;