Jump to content
  • 0

Devotion skill


Question

14 answers to this question

Recommended Posts

Posted (edited)

on your trunk/src/map/skill.c

Remove these lines of codes

clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
status_fix_damage(NULL, d_bl, damage, 0);

And add these line of codes

bool devo_flag = false; /* false = paladin devoing; true = player */
if ( src )
{
struct status_change *tsc;
tsc = status_get_sc(src);

/* Per official standards, following skills should reflect at the bl */
if( (tsc->data[sC_KAITE] && attack_type == BF_MAGIC) ||
(tsc->data[sC_REFLECTDAMAGE] && attack_type != BF_MAGIC)
 )
devo_flag = true;
}

clif_damage(
( (devo_flag) ? bl:d_bl),  
( (devo_flag) ? bl:d_bl), gettick(), 0, 0, damage, 0, 0, 0);
status_fix_damage(
( (devo_flag) ? bl:NULL),  
( (devo_flag) ? bl:d_bl), damage, 0, 0);

Recompile your server. I never tested it. Try for yourself. DON'T FORGET TO BACK UP YOUR FILES.

Edited by Traumatized
Posted

on your trunk/src/map/skill.c

Remove these lines of codes

clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
status_fix_damage(NULL, d_bl, damage, 0);

And add these line of codes

bool devo_flag = false; /* false = paladin devoing; true = player */
if ( src )
{
struct status_change *tsc;
tsc = status_get_sc(src);

/* Per official standards, following skills should reflect at the bl */
if( (tsc->data[sC_KAITE] && attack_type == BF_MAGIC) ||
(tsc->data[sC_REFLECTDAMAGE] && attack_type != BF_MAGIC)
 )
devo_flag = true;
}

clif_damage(
( (devo_flag) ? bl:d_bl),  
( (devo_flag) ? bl:d_bl), gettick(), 0, 0, damage, 0, 0, 0);
status_fix_damage(
( (devo_flag) ? bl:NULL),  
( (devo_flag) ? bl:d_bl), damage, 0, 0);

Recompile your server. I never tested it. Try for yourself. DON'T FORGET TO BACK UP YOUR FILES.

is this working ? Sorry for my bad english

Posted

ye look not so bad but vcc will probably complain for the devo_flag declaration not at begining of a scope. (so encapsulate all this with {} for easy fix)

and you need to add a chk on tsc to avoid mapcrash, otherwise if src == BL_PET => tsc = null => tsc->data == segfault boom.

rest look fine

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...