summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-10 18:14:59 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-10 18:14:59 +0000
commitaf5a784f2c5aef2055b3133b82b1eff4a5e64e75 (patch)
tree2a598edebb750b087fe7a7d22e5786ff0a73d9b5 /src/map
parentfa0c6f874cb85db8cac41bf3a7be260686239e65 (diff)
downloadhercules-af5a784f2c5aef2055b3133b82b1eff4a5e64e75.tar.gz
hercules-af5a784f2c5aef2055b3133b82b1eff4a5e64e75.tar.bz2
hercules-af5a784f2c5aef2055b3133b82b1eff4a5e64e75.tar.xz
hercules-af5a784f2c5aef2055b3133b82b1eff4a5e64e75.zip
Fixed Abracadabra unable to cast non-targeted skills (bugreport:186)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12044 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index fe2fff2a5..2fba7b6ca 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3023,14 +3023,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
abra_skilllv = min(skilllv, skill_get_max(abra_skillid));
clif_skill_nodamage (src, bl, skillid, skilllv, 1);
- if (sd)
- { //Crash-protection against Abracadabra casting pets
- sd->skillitem = abra_skillid;
- sd->skillitemlv = abra_skilllv;
+ if( sd )
+ {// player-casted
sd->state.abra_flag = 1;
- clif_item_skill (sd, abra_skillid, abra_skilllv);
- } else
- { // [Skotlex]
+ if( skill_get_inf(abra_skillid)&INF_SELF_SKILL )
+ // non-targeted, execute immediately
+ unit_skilluse_id(src, bl->id, abra_skillid, abra_skilllv);
+ else
+ {// targeted, delay and let player pick target
+ sd->skillitem = abra_skillid;
+ sd->skillitemlv = abra_skilllv;
+ clif_item_skill(sd, abra_skillid, abra_skilllv);
+ }
+ }
+ else
+ {// mob-casted
struct unit_data *ud = unit_bl2ud(src);
int inf = skill_get_inf(abra_skillid);
int target_id = 0;
@@ -7485,8 +7492,7 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
//Abracadabra skill, skip requisites!
if(type&1)
{ //Clear out the data.
- sd->skillitem = sd->skillitemlv = 0;
- sd->state.abra_flag = 0;
+ sd->skillitem = sd->skillitemlv = sd->state.abra_flag = 0;
}
return 1;
}