Jump to content
  • 0

Party vs Party cell bug.


trickzjen23

Question


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

Hello developers, please help me. i am trying to figure out why the PK cell needs to use /ns or holding shift to cast a final strike to the other party. Some other users are able to attack without /ns. It's really weird.

I was trying to make certain cells to be pvp enable. not PK but partied users shouldn't be able to attack each other. Everything is working but some users are required to use /ns to attack.

 this is what's on my battle.c

Quote

 if(s_guild && t_guild && (s_guild == t_guild || guild_isallied(s_guild, t_guild)))
                state |= BCT_GUILD;
        }
        if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) {
            struct map_session_data *sd = BL_CAST( BL_PC, s_bl ), *tsd = BL_CAST( BL_PC, t_bl );
            if ( map_getcell( sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKPK ) && map_getcell( tsd->bl.m, tsd->bl.x, tsd->bl.y, CELL_CHKPK ) )
                {
                    if( flag&(BCT_PARTY|BCT_ENEMY ) )
                    {
                        int s_party = status_get_party_id(s_bl);
                        if( s_party && s_party == status_get_party_id(t_bl) )
                            state |= BCT_PARTY;
                        else
                            state |= BCT_ENEMY;
                    }
                }
        }

    }
    


    if( !state ) //If not an enemy, nor a guild, nor party, nor yourself, it's neutral.
 

Link to comment
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.   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...