Переглянути джерело

- removed auto-attaching of player-run scripts in initnpctimer. You must use attachnpctimer!
- updated juperos elevator script to invoke attachnpctimer as it should be.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5643 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 роки тому
батько
коміт
a8aba5331a
4 змінених файлів з 9 додано та 2 видалено
  1. 2 0
      Changelog-Trunk.txt
  2. 2 0
      npc/Changelog.txt
  3. 4 1
      npc/warps/dungeons/juperos.txt
  4. 1 1
      src/map/script.c

+ 2 - 0
Changelog-Trunk.txt

@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/17
+	* removed auto-attaching of player-run scripts in initnpctimer. You must
+	  use attachnpctimer instead! [Skotlex]
 	* Final fix on Juperos NPC. [Lance]
 	* Fix on initnpctimer not attaching rid. [Lance]
 	* Fix on OnTouch ignoring -1 NPCs. [Lance]

+ 2 - 0
npc/Changelog.txt

@@ -27,6 +27,8 @@ Nexon
 
 Date		Added
 ======
+03/17
+	* Added attachnpctimer to the Juperos elevator script. [Skotlex]
 03/13
 	* Updated the jobmaster custom script to properly use Job_* constants
 	  rather than hardcoded numbers. Thanks to Pxxx for doing the update.

+ 4 - 1
npc/warps/dungeons/juperos.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Muad-Dib (1.0)
 //===== Current Version: =====================================
-//= 1.2
+//= 1.3
 //===== Compatible With: =====================================
 //= eAthena with independant npctimer support; RO Episode 8+
 //===== Description: =========================================
@@ -13,6 +13,7 @@
 //= 1.1 More temp warps to Juperos by Justin84 [Lupus]
 //= 1.2 Justin84's fixed elevator scripts
 //= 1.3 Fixed getting stuck when player relogs in. [Lance]
+//= 1.4 Added attachnpctimer to the initnpctimer calls. [Skotlex]
 //============================================================
 	
 yuno_fild07.gat,207,175,0	warp	jupwrp01	1,1,jupe_cave.gat,143,52
@@ -67,6 +68,7 @@ juperos_02.gat,129,150,0	script	Juperos	111,{
 
 jupe_ele.gat,41,45,0	script	detectionUnit	-1,20,20{
 OnTouch:
+	attachnpctimer; //Attach player to this timer
 	initnpctimer;	
 	end;
 
@@ -102,6 +104,7 @@ jupe_gate.gat,49,168,0	script	Juperos Guard	111,{
 	mes "Are you sure you want to enter the Juperos Core?";
 	next;
 	if(select("Yes","No") == 1){
+		attachnpctimer;
 		initnpctimer;
 		soundeffect "jupe_warning.wav",0;
 	}

+ 1 - 1
src/map/script.c

@@ -5659,7 +5659,7 @@ int buildin_initnpctimer(struct script_state *st)
 	else
 		nd=(struct npc_data *)map_id2bl(st->oid);
 
-	nd->u.scr.rid = st->rid;
+	//nd->u.scr.rid = st->rid; //NO, use npcattachtimer if you want a player-attached timer! [Skotlex]
 	npc_settimerevent_tick(nd,0);
 	npc_timerevent_start(nd, st->rid);
 	return 0;