summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 23:47:33 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 23:47:33 +0000
commit442f3ce3b9a8af792d874c0b0b62343fa229c7a4 (patch)
tree2f82613ab9a3c1a3d7a1fbb4dfbcf84a2cc30f68
parent57fbe69be8382e1f659dad2e7d9ae3ecc1c273d7 (diff)
downloadhercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.tar.gz
hercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.tar.bz2
hercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.tar.xz
hercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8079 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--db/Changelog.txt2
-rw-r--r--db/mob_skill_db.txt2
-rw-r--r--src/map/unit.c11
4 files changed, 15 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 267f2e1c4..5c50bdfbb 100644
--- a/Changelog-Trunk.txt
+++ b/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]
diff --git a/db/Changelog.txt b/db/Changelog.txt
index cbfc7ef4f..7db7caf85 100644
--- a/db/Changelog.txt
+++ b/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
diff --git a/db/mob_skill_db.txt b/db/mob_skill_db.txt
index f400ae700..d78c845ca 100644
--- a/db/mob_skill_db.txt
+++ b/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
diff --git a/src/map/unit.c b/src/map/unit.c
index a230881fa..11eeb1387 100644
--- a/src/map/unit.c
+++ b/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