Jump to content
  • 0
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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