Procházet zdrojové kódy

- Status_calc_bl will no longer stop you from attacking/walking when the mode is changed unless the new mode no longer includes "can-attack"/"can-move" respectively.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7575 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex před 19 roky
rodič
revize
354c1e73bb
2 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 3 0
      Changelog-Trunk.txt
  2. 4 2
      src/map/status.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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.
 
 2006/07/07
+	* Status_calc_bl will no longer stop you from attacking/walking when the
+	  mode is changed unless the new mode no longer includes
+	  "can-attack"/"can-move" respectively. [Skotlex]
 	* Should have fixed clif_item_sub to properly store pet egg/armor data.
 	  There should be no more "random refine levels" bugs related to these.
 	  [Skotlex]

+ 4 - 2
src/map/status.c

@@ -2648,8 +2648,10 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
 	{
 		status->mode = status_calc_mode(bl, sc, b_status->mode);
 		//Since mode changed, reset their state.
-		unit_stop_attack(bl);
-		unit_stop_walking(bl,0);
+		if (!(status->mode&MD_CANATTACK))
+			unit_stop_attack(bl);
+		if (!(status->mode&MD_CANMOVE))
+			unit_stop_walking(bl,0);
 	}
 
 // No status changes alter these yet.