Ver Fonte

- Relogging in with 0 HP didn't trigger dead event.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6810 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lance há 19 anos atrás
pai
commit
f1edfd7ba4
3 ficheiros alterados com 10 adições e 1 exclusões
  1. 3 0
      Changelog-Trunk.txt
  2. 2 1
      src/map/clif.c
  3. 5 0
      src/map/pc.c

+ 3 - 0
Changelog-Trunk.txt

@@ -3,6 +3,9 @@ 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.
 
+2006/05/29
+	* [Fixed]:
+	  - Relogging in with 0 HP didn't trigger dead event. [Lance]
 2006/05/28
 	* Added functions status_revive, pc_revive and mob_revive to handle revival
 	  (it doesn't handles player respawning, though). Fixed reviving @ commands.

+ 2 - 1
src/map/clif.c

@@ -8383,8 +8383,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 	else
 		sd->areanpc_id = 0;
 
-	if (pc_isdead(sd)) //In case you warped dead.
+	if (pc_isdead(sd)){ //In case you warped dead.
 		clif_clearchar_area(&sd->bl, 1);
+	}
 }
 
 /*==========================================

+ 5 - 0
src/map/pc.c

@@ -794,6 +794,11 @@ int pc_reg_received(struct map_session_data *sd)
 		sd->mission_mobid = pc_readglobalreg(sd,"TK_MISSION_ID");
 		sd->mission_count = pc_readglobalreg(sd,"TK_MISSION_COUNT");
 	}
+
+	if(sd->status.hp <= 0){
+		sd->status.hp = 0;
+		sd->vd.dead_sit = sd->state.dead_sit = 1;
+	}
 	
 	//SG map and mob read [Komurka]
 	for(i=0;i<3;i++) //for now - someone need to make reading from txt/sql