summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-01 14:57:56 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-01 14:57:56 -0300
commitb59dd805edc48d4883f277cb80c5156760e19039 (patch)
tree829d3de18933d57b3cf051a48e3a03253a1024aa /src
parent7b48f7b7652239620aa50512f1a8791a1f48366f (diff)
downloadevol-hercules-b59dd805edc48d4883f277cb80c5156760e19039.tar.gz
evol-hercules-b59dd805edc48d4883f277cb80c5156760e19039.tar.bz2
evol-hercules-b59dd805edc48d4883f277cb80c5156760e19039.tar.xz
evol-hercules-b59dd805edc48d4883f277cb80c5156760e19039.zip
Add support to custom Homunculus skills.
Diffstat (limited to 'src')
-rw-r--r--src/emap/skill.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/emap/skill.c b/src/emap/skill.c
index 38fb265..3bfb1ad 100644
--- a/src/emap/skill.c
+++ b/src/emap/skill.c
@@ -18,6 +18,7 @@
#include "common/timer.h"
#include "map/pc.h"
#include "map/npc.h"
+#include "map/homunculus.h"
#include "map/script.h"
#include "map/skill.h"
@@ -92,8 +93,14 @@ bool eskill_castend_nodamage_id_unknown(struct block_list *src,
}
//ShowDebug("Operation start!\n");
// 1: Check if src can become a sd; If not, ABORT
- struct map_session_data *sd = NULL;
- sd = BL_CAST(BL_PC, src);
+ struct map_session_data *sd = NULL;
+ if (src->type == BL_HOM) {
+ struct homun_data *hd = NULL;
+ hd = BL_CAST(BL_HOM, src);
+ sd = hd->master;
+ } else {
+ sd = BL_CAST(BL_PC, src);
+ }
if (!sd)
return true;
@@ -102,6 +109,7 @@ bool eskill_castend_nodamage_id_unknown(struct block_list *src,
pc->setreg(sd, script->add_variable("@skillTarget"), bl->id);
pc->setreg(sd, script->add_variable("@skillTargetX"), bl->x);
pc->setreg(sd, script->add_variable("@skillTargetY"), bl->y);
+ pc->setreg(sd, script->add_variable("@skillCaster"), src->id);
//ShowDebug("Data filled! Targed was %d\n", bl->id);
if (sd)
{