Good day,
I have my server with PK mode on outside towns, and added a command to Toggle PK mode On/Off, which works but the only problem is the following:
I'm having a problem when the player tries to buff party members with Area of Effect buffs such as Magnificat or Angelus.
If both players have PK Mode OFF, the AoE buff will not work on party members, but if the caster is in PK Mode ON or all party members have PK Mode ON, the buff will work on everyone.
What should I change here (src/map/battle.cpp) in order to make it work so:
- Caster & party members receive Party buff if both have PK Mode OFF.
- Caster & party members receive Party buff if both have PK Mode ON.
- Party buffs will not work if the caster is in PK mode ON and the party members have it OFF.
switch( t_bl->type ) { //Checks on target master
case BL_PC: {
struct map_session_data *sd;
struct status_change *sc = NULL;
struct map_session_data *ssd;
if( t_bl == s_bl )
break;
sd = BL_CAST(BL_PC, t_bl);
sc = status_get_sc(t_bl);
//Edit: Added ssd for enabling use of support skills on party members in pvp maps, stores map_session_data for source of attack/skill.
ssd = BL_CAST(BL_PC,s_bl);
if( (sd->state.monster_ignore || (sc->data[SC_KINGS_GRACE] && s_bl->type != BL_PC)) && flag&BCT_ENEMY )
return 0; // Global immunity only to Attacks
//Edit:
if( mapdata->flag[MF_PVP] && sd->state.pk_mode == 1 && flag&BCT_ENEMY && s_bl->type != BL_MOB ) {
if(sd->status.party_id == ssd->status.party_id)
state|=BCT_PARTY;
else
return 0;
}
...
Please, I ask you for support and will greatly thank you for your help!!
Question
OscarScorp
Good day,
I have my server with PK mode on outside towns, and added a command to Toggle PK mode On/Off, which works but the only problem is the following:
I'm having a problem when the player tries to buff party members with Area of Effect buffs such as Magnificat or Angelus.
If both players have PK Mode OFF, the AoE buff will not work on party members, but if the caster is in PK Mode ON or all party members have PK Mode ON, the buff will work on everyone.
What should I change here (src/map/battle.cpp) in order to make it work so:
- Caster & party members receive Party buff if both have PK Mode OFF.
- Caster & party members receive Party buff if both have PK Mode ON.
- Party buffs will not work if the caster is in PK mode ON and the party members have it OFF.
switch( t_bl->type ) { //Checks on target master case BL_PC: { struct map_session_data *sd; struct status_change *sc = NULL; struct map_session_data *ssd; if( t_bl == s_bl ) break; sd = BL_CAST(BL_PC, t_bl); sc = status_get_sc(t_bl); //Edit: Added ssd for enabling use of support skills on party members in pvp maps, stores map_session_data for source of attack/skill. ssd = BL_CAST(BL_PC,s_bl); if( (sd->state.monster_ignore || (sc->data[SC_KINGS_GRACE] && s_bl->type != BL_PC)) && flag&BCT_ENEMY ) return 0; // Global immunity only to Attacks //Edit: if( mapdata->flag[MF_PVP] && sd->state.pk_mode == 1 && flag&BCT_ENEMY && s_bl->type != BL_MOB ) { if(sd->status.party_id == ssd->status.party_id) state|=BCT_PARTY; else return 0; } ...
Please, I ask you for support and will greatly thank you for your help!!

Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.