Jump to content
  • 0

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


trickzjen23

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  11/25/11
  • Last Seen:  

How can we change the effect of Sanctuary to heal only 1 instead of 777 for red plant monsters?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   11
  • Joined:  11/28/11
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...