Jump to content
  • 0
Sign in to follow this  
daanizin

SHARP SHOOTING FRIEND GUILD

Question

HELLO, 

I'm trying to enable friendly fire (miss) in the sharp shooting via the source, in skill.c in the function:

static int skill_attack

 and at first I put it like this, but it didn't have any effect when I turn on @gvgon it doesn't hit the ally with sharp shooting:

 

if ( skill_id == SN_SHARPSHOOTING )
{
killer_sd = BL_CAST(BL_PC, src);
dest_sd = BL_CAST(BL_PC, bl);

if ( killer_sd && dest_sd && bl->type == BL_PC)
 {
 if ( map_flag_gvg(killer_sd->bl.m) || map_flag_gvg2(killer_sd->bl.m) || map->list[killer_sd->bl.m].flag.gvg_castle )
 {
 if ( killer_sd->status.guild_id == dest_sd->status.guild_id )
 {
 dmg.damage = dmg.damage2 = 0;
 dmg.dmg_lv = ATK_MISS;
 }
 }
 else if ( map->list[killer_sd->bl.m].flag.pvp || map->list[killer_sd->bl.m].flag.pvp_noguild || map->list[killer_sd->bl.m].flag.pvp_noparty )
 ; // if you are on a pvp map, take it normally [Isaac]
 else
 {
 if ( killer_sd->status.guild_id == dest_sd->status.guild_id )
 {
 dmg.damage = dmg.damage2 = 0;
 dmg.dmg_lv = ATK_MISS;
 }
 }
 }
 else if ( killer_sd && src->type == BL_PC && bl->type == BL_MOB && map->list[killer_sd->bl.m].flag.battleground )
 {
 dmg.damage = dmg.damage2 = 0;
 dmg.dmg_lv = ATK_MISS;
 }
 }

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.