Преглед изворни кода

- Autocasted AL_TELEPORT should now automatically pick menu entry rather than showing the box up.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5301 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex пре 19 година
родитељ
комит
0f1ea43892
2 измењених фајлова са 13 додато и 5 уклоњено
  1. 2 0
      Changelog-Trunk.txt
  2. 11 5
      src/map/skill.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 2006/02/16
+	* Autocasted AL_TELEPORT should now automatically pick menu entry rather
+	  than showing the box up. [Skotlex]
 	* The battle config options sp_rate and hp_rate are now applied
 	  independently of the same type of bonuses from cards. [Skotlex]
 	* In CELL_NOSTACK mode, mob_canreach will now ignore other players when

+ 11 - 5
src/map/skill.c

@@ -4335,14 +4335,20 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 				break;
 			}
 			clif_skill_nodamage(src,bl,skillid,skilllv,1);
-			if(sd->skilllv == 1)
-				if(!battle_config.skip_teleport_lv1_menu) // possibility to skip menu [LuzZza]
+			if(skilllv == 1) {
+				// possibility to skip menu [LuzZza]
+				if(!battle_config.skip_teleport_lv1_menu &&
+					sd->skillid == AL_TELEPORT) //If skillid is not teleport, this was auto-casted! [Skotlex]
 					clif_skill_warppoint(sd,skillid,"Random","","","");
 				else
 					pc_randomwarp(sd,3);
-			else {
-				clif_skill_warppoint(sd,skillid,"Random",
-					mapindex_id2name(sd->status.save_point.map),"","");
+			} else {
+				if (sd->skillid == AL_TELEPORT)
+					clif_skill_warppoint(sd,skillid,"Random",
+						mapindex_id2name(sd->status.save_point.map),"","");
+				else //Autocasted Teleport level 2??
+					pc_setpos(sd,sd->status.save_point.map,
+						sd->status.save_point.x,sd->status.save_point.y,3);
 			}
 		} else if(dstmd && !map[sd->bl.m].flag.monster_noteleport)
 			mob_warp(dstmd,-1,-1,-1,3);