summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-19 16:22:04 -0300
committershennetsind <ind@henn.et>2013-10-19 16:22:04 -0300
commit93f61040ac281b84c038af72e322a03f60bc6e03 (patch)
tree8c70712c93f4c297b78c5ecb43a113df81dd5dbd /src/map/npc.c
parentcd780e51999c6efa1084e6b41ba0efcaaa347b9e (diff)
downloadhercules-93f61040ac281b84c038af72e322a03f60bc6e03.tar.gz
hercules-93f61040ac281b84c038af72e322a03f60bc6e03.tar.bz2
hercules-93f61040ac281b84c038af72e322a03f60bc6e03.tar.xz
hercules-93f61040ac281b84c038af72e322a03f60bc6e03.zip
Instance Dungeons Update
As requested by the community in http://hercules.ws/board/topic/1702-implement-rathena-npc/ we're merging in the latest of rAthena's dungeons, this includes the rewriting of all instance dungeons and the addition of 4 dungeons that were not present previously (BakonawaLake, BangungotHospital, BuwayaCave and OldGlastHeim). Update also includes the ability for instances to reset (or be destroyed if instance files were disabled/removed) upon @reloadscript, instance scripts are able to control to what stage the instances are to be reset via the instance_set_respawn (reload spawn) script command, OnInstanceInit labels are now triggered when the instance starts via instance_init (and upon reload), they may be used alongside instance variables (which are persistent to @reloadscript) to save players' progress. - NPC Changelog: -- npc/instances/EndlessTower.txt --- 2.2 Instance system rewrite. [Euphy] --- 2.3 Added some missing announcements. [Euphy] --- 2.4 Added GM management function. [Euphy] -- npc/instances/NydhoggsNest.txt --- 1.5 Instance system rewrite. [Euphy] --- 1.6 Added GM management NPCs. [Euphy] -- npc/instances/OrcsMemory.txt --- 1.7 Instance system rewrite. [Euphy] -- npc/instances/SealedShrine.txt --- 2.3 Instance system rewrite. [Euphy] -- npc/other/gm_npcs.txt --- 1.0 First version. [Euphy] -- npc/re/instances/BakonawaLake.txt --- 1.0 First version. [Euphy] --- 1.1 Added GM management NPC. [Euphy] -- npc/re/instances/BangungotHospital.txt --- 1.0 First version. [Euphy] --- 1.1 Added GM management function. [Euphy] -- npc/re/instances/BuwayaCave.txt --- 1.0 First version. [Euphy] -- npc/re/instances/HazyForest.txt --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/MalangdoCulvert.txt --- 1.0b Fixed incorrect use of 'close'. [Joseph] --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/OctopusCave.txt --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/OldGlastHeim.txt --- 1.0 First version. [Euphy] Special Thanks to Haru, Uziel for their contributions to this update, and ossi0110 for helping us debug it. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index c52dce325..c536dc856 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3439,6 +3439,8 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].short_damage_rate = (state) ? atoi(w4) : 100;
} else if ( !strcmpi(w3,"long_damage_rate") ) {
map->list[m].long_damage_rate = (state) ? atoi(w4) : 100;
+ } else if ( !strcmpi(w3,"src4instance") ) {
+ map->list[m].flag.src4instance = (state) ? 1 : 0;
} else
ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer));
@@ -3784,10 +3786,8 @@ int npc_reload(void) {
npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
itemdb->name_constants();
-
- for(i = 0; i < instance->instances; i++) {
- instance->destroy(i);
- }
+
+ instance->reload();
map->zone_init();