Browse Source

* Players now cannot be revived during pvp respawn delay
* Fix a logical problem on my last commit

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

Inkfish 16 years ago
parent
commit
8704a43725
3 changed files with 8 additions and 3 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 6 1
      src/map/npc.c
  3. 1 2
      src/map/pc.c

+ 1 - 0
Changelog-Trunk.txt

@@ -7,6 +7,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 	* Do not log damage if it's done by mob itself (bugreport:2933) [Inkfish]
 	* Fix 'awake' not working (bugreport:2580) [Inkfish]
 	* Fix several npctimer issues (bugreport:1619, bugreport:1730) [Inkfish]
+	* Players now cannot be revived during pvp respawn delay [Inkfish]
 2009/05/02
 	* Spirit of Bard and Dancer now only works for mastered skills (bugreport:3037) [Playtester]
 	- also fixed an outdated comment in the source code

+ 6 - 1
src/map/npc.c

@@ -498,7 +498,12 @@ int npc_timerevent_start(struct npc_data* nd, int rid)
 	}
 
 	//Check if timer is already started.
-	if( (sd && sd->npc_timer_id != -1) || nd->u.scr.timerid != -1 )
+	if( sd )
+	{
+		if( sd->npc_timer_id != -1 )
+			return 0;
+	}
+	else if( nd->u.scr.timerid != -1 )
 		return 0;
 		
 	ted = ers_alloc(timer_event_ers, struct timer_event_data);

+ 1 - 2
src/map/pc.c

@@ -436,7 +436,7 @@ int pc_makesavestatus(struct map_session_data *sd)
 }
 
 /*==========================================
- * �Ú?ŽbÌ�‰Šú‰»
+ * �Ú?ŽbÌ�‰Šú‰?
  *------------------------------------------*/
 int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd)
 {
@@ -5548,7 +5548,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
 		}
 		if( sd->pvp_point < 0 )
 		{
-			sd->pvp_point=0;
 			add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
 			return 1|8;
 		}