Browse Source

* Cast time of Emergency Call is doubled if you master of High Jump.
* High Jump can't be used on PvP maps.
* Fixed a potential null pointer from last commit.

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

Inkfish 15 years ago
parent
commit
e8d9984582
4 changed files with 13 additions and 6 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 3 2
      src/map/intif.c
  3. 3 3
      src/map/skill.c
  4. 5 1
      src/map/unit.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.
 
 09/10/27
 	* Fixed quest will never get erased when it's the only quest you have. [Inkfish]
+	* Cast time of Emergency Call is doubled if you master of High Jump. [Inkfish]
+	* High Jump can't be used on PvP maps. [Inkfish]
 09/10/26
 	* Implemented NPC_VAMPIREGIFT and NPC_WIDESOULDRAIN. [Inkfish]
 09/10/25

+ 3 - 2
src/map/intif.c

@@ -1377,10 +1377,11 @@ int intif_parse_questlog(int fd)
 
 int intif_parse_questsave(int fd)
 {
-	TBL_PC *sd = map_id2sd(RFIFOL(fd, 2));
+	int cid = RFIFOL(fd, 2);
+	TBL_PC *sd = map_id2sd(cid);
 
 	if( !RFIFOB(fd, 6) )
-		ShowError("intif_parse_questsave: Failed to save quest(s) for character %d!\n", sd->status.char_id);
+		ShowError("intif_parse_questsave: Failed to save quest(s) for character %d!\n", cid);
 	else if( sd )
 		sd->save_quest = false;
 

+ 3 - 3
src/map/skill.c

@@ -4747,9 +4747,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 		{
 			int x,y, dir = unit_getdir(src);
 
-		  	//Fails on noteleport maps, except for vs maps [Skotlex]
-			if(map[src->m].flag.noteleport &&
-				!(map_flag_vs(src->m) || map_flag_gvg2(src->m))
+		  	//Fails on noteleport maps, except for GvG and BG maps [Skotlex]
+			if( map[src->m].flag.noteleport &&
+				!(map[src->m].flag.battleground || map_flag_gvg2(src->m) )
 			) {
 				x = src->x;
 				y = src->y;

+ 5 - 1
src/map/unit.c

@@ -1043,7 +1043,11 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
 		if( k > 2 ) k = 2; // ...but hard-limited to 300%.
 		casttime += casttime * k; 
 		}
-	break;
+	break;	
+	case GD_EMERGENCYCALL: //Emergency Call double cast when the user has learned Leap [Daegaladh]
+		if( sd && pc_checkskill(sd,TK_HIGHJUMP) )
+			casttime *= 2;
+		break;
 	}
   	
 	// moved here to prevent Suffragium from ending if skill fails