Переглянути джерело

- Added a check in the walking code when triggering skills. NPC_SELFDESTRUCTION will no longer cancel walking, it will instead resend the walk packet, this effectively causes the mob to start walking (clientside) while the cast-bar is showing.
- Updated the mob skills so that the marine sphere casts self-destruction with 3 second cast after it starts walking.


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

skotlex 19 роки тому
батько
коміт
c02123e704
4 змінених файлів з 15 додано та 4 видалено
  1. 4 0
      Changelog-Trunk.txt
  2. 2 0
      db/Changelog.txt
  3. 1 1
      db/mob_skill_db.txt
  4. 8 3
      src/map/unit.c

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ 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/08/02
+	* Added a check in the walking code when triggering skills.
+	  NPC_SELFDESTRUCTION will no longer cancel walking, it will instead resend
+	  the walk packet, this effectively causes the mob to start walking
+	  (clientside) while the cast-bar is showing. [Skotlex]
 	* Fixed a logic error on battle_get_master which was causing infinite
 	  loops.. [Skotlex]
 	* Fixed homunculus error message [Toms]

+ 2 - 0
db/Changelog.txt

@@ -20,6 +20,8 @@
 
 =========================
 08/02
+	* Updated the mob skills so that the marine sphere casts self-destruction
+	  with 3 second cast after it starts walking. [Skotlex]
 	* Updated Create Arrow to X.4 [Playtester]
 	* Gold Lux now makes you autocast Flip Coin on attack [Playtester]
 	- also Gunslinger can use Berserk Potion now

+ 1 - 1
db/mob_skill_db.txt

@@ -685,7 +685,7 @@
 1141,Marina@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,0,19,,,,,
 1141,Marina@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,6
 1142,Marine Sphere@NPC_RUN,idle,354,7,10000,0,30000,no,master,alchemist,,,,,,,
-1142,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,0,0,no,self,afterskill,354,,,,,,
+1142,Marine Sphere@NPC_SELFDESTRUCTION,any,173,1,10000,3000,0,no,self,afterskill,354,,,,,,
 1142,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,2000,5000,no,self,skillused,173,,,,,,
 1142,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,500,2000,5000,no,self,myhpltmaxrate,99,,,,,,
 1143,Marionette@HT_FREEZINGTRAP,idle,121,5,500,0,300000,yes,around2,always,0,,,,,,29

+ 8 - 3
src/map/unit.c

@@ -205,8 +205,13 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
 			!(ud->walk_count%WALK_SKILL_INTERVAL) &&
 			mobskill_use(md, tick, -1))
 	  	{
-			clif_fixpos(bl); //Fix position as walk has been cancelled.
-			return 0;
+			if (!(ud->skillid == NPC_SELFDESTRUCTION && ud->skilltimer != -1))
+			{	//Skill used, abort walking
+				clif_fixpos(bl); //Fix position as walk has been cancelled.
+				return 0;
+			}
+			//Resend walk packet for proper Self Destruction display.
+			clif_move(bl);
 		}
 	}
 
@@ -943,7 +948,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
 		ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
 		if(sd && pc_checkskill(sd,SA_FREECAST))
 			status_freecast_switch(sd);
-		else if (skill_num != NPC_SELFDESTRUCTION) //Required for Marine Spheres
+		else
 			unit_stop_walking(src,1);
 	}
 	else