summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-02 22:02:56 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-02 22:03:58 +0300
commit5e5321e2588f5bdc076bd4b40c5c585a8a02a56d (patch)
treeb87b3c2ab61a3e6a6766df902eef725c9885bceb /src/map
parentc81fee18c0d5ed70f8717679ee16cebe5e591c58 (diff)
downloadhercules-5e5321e2588f5bdc076bd4b40c5c585a8a02a56d.tar.gz
hercules-5e5321e2588f5bdc076bd4b40c5c585a8a02a56d.tar.bz2
hercules-5e5321e2588f5bdc076bd4b40c5c585a8a02a56d.tar.xz
hercules-5e5321e2588f5bdc076bd4b40c5c585a8a02a56d.zip
Fix map flag pvp_nocalcrank if use at or script command for enable pvp.
Fixes #2056
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c3
-rw-r--r--src/map/script.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 290611c9b..ae0c776c6 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1606,7 +1606,8 @@ int atcommand_pvpon_sub(struct block_list *bl,va_list ap)
sd = BL_UCAST(BL_PC, bl);
if (sd->pvp_timer == INVALID_TIMER) {
- sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0);
+ if (!map->list[sd->bl.m].flag.pvp_nocalcrank)
+ sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0);
sd->pvp_rank = 0;
sd->pvp_lastusers = 0;
sd->pvp_point = 5;
diff --git a/src/map/script.c b/src/map/script.c
index b9a826b93..e127c4f4f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13006,7 +13006,8 @@ int script_mapflag_pvp_sub(struct block_list *bl, va_list ap)
sd = BL_UCAST(BL_PC, bl);
if (sd->pvp_timer == INVALID_TIMER) {
- sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0);
+ if (!map->list[sd->bl.m].flag.pvp_nocalcrank)
+ sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0);
sd->pvp_rank = 0;
sd->pvp_lastusers = 0;
sd->pvp_point = 5;
@@ -13245,7 +13246,8 @@ BUILDIN(pvpon)
if( sd->bl.m != m || sd->pvp_timer != INVALID_TIMER )
continue; // not applicable
- sd->pvp_timer = timer->add(timer->gettick()+200,pc->calc_pvprank_timer,sd->bl.id,0);
+ if (!map->list[m].flag.pvp_nocalcrank)
+ sd->pvp_timer = timer->add(timer->gettick()+200,pc->calc_pvprank_timer,sd->bl.id,0);
sd->pvp_rank = 0;
sd->pvp_lastusers = 0;
sd->pvp_point = 5;