diff options
author | mekolat <mekolat@gmail.com> | 2015-04-03 14:20:01 -0400 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2015-04-04 00:27:43 -0500 |
commit | ee8dff7687f120cbe55dccc56c1ae1f711bb68b5 (patch) | |
tree | 04d071bbd1799e4b5f3b33d32bed99098b7d6acb /src/map/pc.cpp | |
parent | 7f31bde507bee63e36ddaefd5d16ab314b98b601 (diff) | |
download | tmwa-ee8dff7687f120cbe55dccc56c1ae1f711bb68b5.tar.gz tmwa-ee8dff7687f120cbe55dccc56c1ae1f711bb68b5.tar.bz2 tmwa-ee8dff7687f120cbe55dccc56c1ae1f711bb68b5.tar.xz tmwa-ee8dff7687f120cbe55dccc56c1ae1f711bb68b5.zip |
make pvp use channels
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r-- | src/map/pc.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 6a94f31..8b0391b 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -290,7 +290,9 @@ int pc_iskiller(dumb_ptr<map_session_data> src, if (src->bl_type != BL::PC || target->bl_type != BL::PC) return 0; - if (src->state.pvpon && target->state.pvpon && !src->bl_m->flag.get(MapFlag::NOPVP)) + if ((src->state.pvpchannel == 1) && (target->state.pvpchannel == 1) && !src->bl_m->flag.get(MapFlag::NOPVP)) + return 1; + if ((src->state.pvpchannel > 1) && (target->state.pvpchannel == src->state.pvpchannel)) // this one does not respect NOPVP return 1; return 0; } @@ -919,7 +921,7 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) int bl; int aspd_rate, refinedef = 0; int str, dstr, dex; - int b_pvpon = 0; + int b_pvpchannel = 0; nullpo_retz(sd); @@ -1422,8 +1424,8 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) clif_updatestatus(sd, SP::HP); if (b_sp != sd->status.sp) clif_updatestatus(sd, SP::SP); - if (b_pvpon != sd->state.pvpon) - sd->state.pvpon = b_pvpon; + if (b_pvpchannel != sd->state.pvpchannel) + sd->state.pvpchannel = b_pvpchannel; return 0; } |