From dc2e94dba8a7d0a894456ac03262f14c5a9090ca Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 13 Feb 2007 00:17:32 +0000 Subject: - Reverted Venom Splasher's element to take your weapon's - reverted the item skill usage update since Flywings and the like do not use skill use scripts anymore. - Restored tid when a castend-id skill becomes castend-pos, fixes certain skills, most notably Resurrect Homunculus. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9858 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + db/Changelog.txt | 1 + db/skill_db.txt | 2 +- src/map/npc.c | 2 +- src/map/skill.c | 13 ++++--------- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 9f279b6af..f94519045 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ 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. 2007/02/12 + * Fixed Resurrect Homunculus and Wedding skills failing. [Skotlex] * A bit more work on Ticket #41. * Added 'r' (variable reference) to the script argument definitions. * Added a simple define for suspitious actions. (empty at the moment) diff --git a/db/Changelog.txt b/db/Changelog.txt index e6213af2c..419baf05a 100644 --- a/db/Changelog.txt +++ b/db/Changelog.txt @@ -20,6 +20,7 @@ ======================== 02/12 + * Reverted Venom Splasher's element to take your weapon's * Corrected range of self destruction / bio explosion to be equal to their splash range. [Skotlex] 02/10 diff --git a/db/skill_db.txt b/db/skill_db.txt index e07c1b524..db76ee287 100644 --- a/db/skill_db.txt +++ b/db/skill_db.txt @@ -172,7 +172,7 @@ 138,1,6,16,5,1,0,10,1,no,0,0x400,0,weapon,0 //AS_ENCHANTPOISON#Enchant Poison# 139,0,6,4,0,0,0,10,1,no,0,0,0,weapon,0 //AS_POISONREACT#Poison React# 140,2,6,2,5,1,0,10,1,no,0,0,0,weapon,0 //AS_VENOMDUST#Venom Dust# -141,1,6,1,5,1,2,10,1,yes,0,0,0,weapon,0 //AS_SPLASHER#Venom Splasher# +141,1,6,1,-1,1,2,10,1,yes,0,0,0,weapon,0 //AS_SPLASHER#Venom Splasher# 142,0,6,4,0,1,0,1,1,no,0,0x1,0,none,0 //NV_FIRSTAID#First Aid# 143,0,6,4,0,1,0,1,1,no,0,0x1,0,none,0 //NV_TRICKDEAD#Act Dead# 144,0,0,0,0,0,0,1,0,no,0,0x1,0,none,0 //SM_MOVINGRECOVERY#Moving HP-Recovery# diff --git a/src/map/npc.c b/src/map/npc.c index 0924e6c1f..ec6f143d1 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2984,7 +2984,7 @@ int do_final_npc(void) if ((bl = map_id2bl(i))){ if (bl->type == BL_NPC) npc_unload((struct npc_data *)bl); - else if (bl->type&(BL_MOB|BL_PET))//# why BL_PET? [FlavioJS] //# Because this is invoked after saving/wiping all players, which would include all pets. This bit of code will take care of any pets without a master that are still lingering in the map. [Skotlex] + else if (bl->type&(BL_MOB|BL_PET|BL_HOM)) unit_free(bl, 0); } } diff --git a/src/map/skill.c b/src/map/skill.c index 8f003aa6b..f43b318bd 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -875,8 +875,7 @@ int skillnotok (int skillid, struct map_session_data *sd) return 0; break; case AL_TELEPORT: - //Flywing/ButterflyWing are checked elsewhere - if(map[m].flag.noteleport && sd->skillitem != skillid) { + if(map[m].flag.noteleport) { clif_skill_teleportmessage(sd,0); return 1; } @@ -5566,7 +5565,6 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) else target = map_id2bl(ud->skilltarget); - // Use a do so that you can break out of it when the skill fails. do { if(!target || target->prev==NULL) break; @@ -5588,6 +5586,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) ud->skillx = target->x; ud->skilly = target->y; } + ud->skilltimer=tid; return skill_castend_pos(tid,tick,id,data); } @@ -5693,9 +5692,6 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) else skill_castend_damage_id(src,target,ud->skillid,ud->skilllv,tick,0); - if (sd && sd->skillitem == ud->skillid) //Clear item skill data. - sd->skillitem = sd->skillitemlv = 0; - sc = status_get_sc(src); if(sc && sc->count && sc->data[SC_MAGICPOWER].timer != -1 && ud->skillid != HW_MAGICPOWER && ud->skillid != WZ_WATERBALL) status_change_end(src,SC_MAGICPOWER,-1); @@ -5857,9 +5853,6 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data) unit_set_walkdelay(src, tick, battle_config.default_skill_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1); skill_castend_pos2(src,ud->skillx,ud->skilly,ud->skillid,ud->skilllv,tick,0); - if (sd && sd->skillitem == ud->skillid) //Clear item skill data. - sd->skillitem = sd->skillitemlv = 0; - if (ud->skilltimer == -1) { if (md) md->skillidx = -1; else ud->skillid = 0; //Non mobs can't clear this one as it is used for skill condition 'afterskill' @@ -7922,6 +7915,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t else pc_delitem(sd,i,1,0); } + if (type&1) //Casting finished + sd->skillitem = sd->skillitemlv = 0; return 1; } // for the guild skills [celest] -- cgit v1.2.3-60-g2f50