Browse Source

- Updated mob_npc_warp to a three-state config switch. 0 disables. 1 enable only on warps that don't lead to nobranch maps. 2 - enable on all warps.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7048 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 năm trước cách đây
mục cha
commit
604f5b40fe
3 tập tin đã thay đổi với 16 bổ sung6 xóa
  1. 7 3
      Changelog-Trunk.txt
  2. 5 3
      conf-tmpl/battle/monster.conf
  3. 4 0
      src/map/npc.c

+ 7 - 3
Changelog-Trunk.txt

@@ -3,13 +3,17 @@ 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/06/07
-	- Adjusted Don't Forget Me, Defender, Longing to use all val entries, and
+2006/06/08
+	* Updated mob_npc_warp to a three-state config switch. 0 disables. 1 enable
+	  only on warps that don't lead to nobranch maps. 2 - enable on all warps.
+	  [Skotlex]
+	* Adjusted Don't Forget Me, Defender, Longing to use all val entries, and
 	  to hold the speed adjustment value rather than speed penalty (eg: 125
 	  instead of 25). [Skotlex]
-	- Cleaned up status_calc_speed so that speed penalties are correctly
+	* Cleaned up status_calc_speed so that speed penalties are correctly
 	  handled (eg: 25% penalty is speed*100/75, not +speed*25/100). Thanks to
 	  Euph for pointing it out and Belle for the speed mechanics. [Skotlex]
+2006/06/07
 	* Fixed Sense using mdef instead of mdef2 [Skotlex]
 	* Fixed item-skills not showing up on login. [Skotlex]
 	* Cleaned up clif_parseLoadEndAck, by testing which packets are required

+ 5 - 3
conf-tmpl/battle/monster.conf

@@ -66,9 +66,11 @@ monster_max_aspd: 199
 //    any npc-warps in it's sight of view (use with mob_npc_warp below)
 monster_ai: 0
 
-// Should mobs that stand on an npc warp be warped to the destination cell? 
-// (Note 1)
-mob_npc_warp: no
+// Should mobs that stand on an npc warp be warped to the destination cell?
+// 0: Disable.
+// 1: Enable on all warps except those that lead to 'nobranch' maps.
+// 2: Enable on all warps.
+mob_npc_warp: 0
 
 // Mobs and Pets view-range adjustment (range2 column in the mob_db) (Note 2)
 view_range_rate: 100

+ 4 - 0
src/map/npc.c

@@ -996,6 +996,10 @@ int npc_touch_areanpc2(struct block_list *bl)
 	xs = map_mapindex2mapid(map[m].npc[i]->u.warp.mapindex);
 	if (xs < 0) // Can't warp object between map servers...
 		return 0;
+
+	if(battle_config.mob_npc_warp<2 && map[xs].flag.nobranch)
+		return 0; //Disable warps to nobranch maps.
+	
 	unit_warp(bl, xs, map[m].npc[i]->u.warp.x,map[m].npc[i]->u.warp.y,0);
 	return 1;
 }