Jump to content
  • 0
Sign in to follow this  
Nebraskka

Stop "Magnus Exorcismus" damage after Fly Wing (or out of range)

Question

Happy holidays!

 

Does there any existing mechanism that allows to implement this behavior?

End ME damage and it's unitcells immediatly after caster leaving it's view range.

 

Trying to prevent ME/wing spam gameplay, that currently allowing to flood all map with ME and gaing lot's of experience without being touched.

 

Any directions would be appreciated <3

Edited by Nebraskka

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Try to do this in src/map/skill.c:

 

int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {...	nullpo_ret(src);	// Source is the master behind the attack (player/mob/pet)	nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.	nullpo_ret(bl); //Target to be attacked.	if (src != dsrc) {		//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]		if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2))			return 0;		if( skill_id == PR_MAGNUS && !check_distance_bl(src,dsrc,battle_config.area_size) ) //If distance between "damage source" ME and "source" aka player exceeds view range, it has no effect.			return 0;	}...}

Add the 2nd check, the one with if( skill_id == PR_MAGNUS ...)

Not tested, sorry.

Share this post


Link to post
Share on other sites
  • 0

Try to do this in src/map/skill.c:

 

int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {...	nullpo_ret(src);	// Source is the master behind the attack (player/mob/pet)	nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.	nullpo_ret(bl); //Target to be attacked.	if (src != dsrc) {		//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]		if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2))			return 0;		if( skill_id == PR_MAGNUS && !check_distance_bl(src,dsrc,battle_config.area_size) ) //If distance between "damage source" ME and "source" aka player exceeds view range, it has no effect.			return 0;	}...}

Add the 2nd check, the one with if( skill_id == PR_MAGNUS ...)

Not tested, sorry.

 

Success! What an elegant solution.

Thanks for your time! :lv:

Edited by Nebraskka

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.