summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-13 00:17:32 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-13 00:17:32 +0000
commitdc2e94dba8a7d0a894456ac03262f14c5a9090ca (patch)
tree0c778a51ae75afe77b22e11339a8abf40d7b7d88 /src/map
parente0fff5c212007819f29a3406629967d36bc6ede1 (diff)
downloadhercules-dc2e94dba8a7d0a894456ac03262f14c5a9090ca.tar.gz
hercules-dc2e94dba8a7d0a894456ac03262f14c5a9090ca.tar.bz2
hercules-dc2e94dba8a7d0a894456ac03262f14c5a9090ca.tar.xz
hercules-dc2e94dba8a7d0a894456ac03262f14c5a9090ca.zip
- 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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/skill.c13
2 files changed, 5 insertions, 10 deletions
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]