summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-12-02 10:58:21 +0100
committerHaru <haru@dotalux.com>2014-12-02 10:58:21 +0100
commitf92b392439cd5f2b517e9c829d9f518e1f5b392a (patch)
tree49f308799deba3e6b54800c9220c518c03c67b97 /src/map/script.c
parent93216b60f0a37c07ede003e9d548c892ae543cfe (diff)
downloadhercules-f92b392439cd5f2b517e9c829d9f518e1f5b392a.tar.gz
hercules-f92b392439cd5f2b517e9c829d9f518e1f5b392a.tar.bz2
hercules-f92b392439cd5f2b517e9c829d9f518e1f5b392a.tar.xz
hercules-f92b392439cd5f2b517e9c829d9f518e1f5b392a.zip
Removed petheal command
- Follow-up to 8bb0078 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c57
1 files changed, 7 insertions, 50 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 7a1ef6e4b..93c9865e5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12738,46 +12738,6 @@ BUILDIN(petrecovery)
}
/*==========================================
- * pet healing [Valaris] //Rewritten by [Skotlex]
- *------------------------------------------*/
-BUILDIN(petheal)
-{
- struct pet_data *pd;
- TBL_PC *sd=script->rid2sd(st);
-
- if(sd==NULL || sd->pd==NULL)
- return true;
-
- pd=sd->pd;
- if (pd->s_skill)
- { //Clear previous skill
- if (pd->s_skill->timer != INVALID_TIMER)
- {
- if (pd->s_skill->id)
- timer->delete(pd->s_skill->timer, pet->skill_support_timer);
- else
- timer->delete(pd->s_skill->timer, pet->heal_timer);
- }
- } else //init memory
- pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support));
-
- pd->s_skill->id=0; //This id identifies that it IS petheal rather than pet_skillsupport
- //Use the lv as the amount to heal
- pd->s_skill->lv=script_getnum(st,2);
- pd->s_skill->delay=script_getnum(st,3);
- pd->s_skill->hp=script_getnum(st,4);
- pd->s_skill->sp=script_getnum(st,5);
-
- //Use delay as initial offset to avoid skill/heal exploits
- if (battle_config.pet_equip_required && pd->pet.equip == 0)
- pd->s_skill->timer = INVALID_TIMER;
- else
- pd->s_skill->timer = timer->add(timer->gettick()+pd->s_skill->delay*1000,pet->heal_timer,sd->bl.id,0);
-
- return true;
-}
-
-/*==========================================
* pet attack skills [Valaris] //Rewritten by [Skotlex]
*------------------------------------------*/
/// petskillattack <skill id>,<level>,<rate>,<bonusrate>
@@ -12840,17 +12800,15 @@ BUILDIN(petskillsupport) {
return true;
pd=sd->pd;
- if (pd->s_skill)
- { //Clear previous skill
- if (pd->s_skill->timer != INVALID_TIMER)
- {
- if (pd->s_skill->id)
- timer->delete(pd->s_skill->timer, pet->skill_support_timer);
- else
- timer->delete(pd->s_skill->timer, pet->heal_timer);
+ if (pd->s_skill) {
+ //Clear previous skill
+ if (pd->s_skill->timer != INVALID_TIMER) {
+ timer->delete(pd->s_skill->timer, pet->skill_support_timer);
}
- } else //init memory
+ } else {
+ //init memory
pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support));
+ }
pd->s_skill->id=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
pd->s_skill->lv=script_getnum(st,3);
@@ -19235,7 +19193,6 @@ void script_parse_builtin(void) {
BUILDIN_DEF(petskillbonus,"iiii"), // [Valaris]
BUILDIN_DEF(petrecovery,"ii"), // [Valaris]
BUILDIN_DEF(petloot,"i"), // [Valaris]
- BUILDIN_DEF_DEPRECATED(petheal,"iiii"), // Deprecated 2014-10-27 [Haru]
BUILDIN_DEF(petskillattack,"viii"), // [Skotlex]
BUILDIN_DEF(petskillattack2,"viiii"), // [Valaris]
BUILDIN_DEF(petskillsupport,"viiii"), // [Skotlex]