summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/skill.c24
2 files changed, 16 insertions, 9 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9129294c5..068eaea60 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.
2008/01/10
+ * Fixed Abracadabra unable to cast non-targeted skills (bugreport:186)
* Another round of login server cleaning [ultramage]
- fixed passwordencrypt on SQL not behaving correctly (since r10753)
- corrected some column lengths in the login db (username, password,...)
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;
}