Jump to content
  • 0

Modify Skill Sanctuary Heal effect to 1 for mode red plant monsters


Question

1 answer to this question

Recommended Posts

  • 1
Posted (edited)

In src/map/skill.c

Find:

case PR_SANCTUARY:
			hp = (skill_lv > 6) ? 777 : skill_lv * 100;
break;

 

Replace with:

case PR_SANCTUARY:
    if ( target->type == BL_MOB ) {
        struct status_data *tstatus = status->get_status_data((TBL_MOB*)target);
        if (tstatus->mode&MD_PLANT){
            hp = 1;
            break;
        }
    }
        hp = (skill_lv > 6) ? 777 : skill_lv * 100;
break;

The above code would make sanctuary heal 1 hp to all plant monsters.

 

For only red plants, instead of above replacement,

Replace with:

case PR_SANCTUARY:
    if (((TBL_MOB*)target)->class_ == 1078)	//red plant mob id
        hp = 1;
    else
        hp = (skill_lv > 6) ? 777 : skill_lv * 100;
break;

 

Edited by rootKid

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...