summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-29 15:22:47 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-29 15:22:47 +0000
commit183f6daa38233b34fd92b735159c15df021f3488 (patch)
treed410cdc16b0999856fb2f140f0f97b49e2a88457 /src/map/pc.c
parentf648da19a914152a6d772f377dda110fa9248972 (diff)
downloadhercules-183f6daa38233b34fd92b735159c15df021f3488.tar.gz
hercules-183f6daa38233b34fd92b735159c15df021f3488.tar.bz2
hercules-183f6daa38233b34fd92b735159c15df021f3488.tar.xz
hercules-183f6daa38233b34fd92b735159c15df021f3488.zip
- Now gvg_dungeon mapflag will activate the other mapflags which are required: pvp, pvp_nocalcrank and pvp_noparty/pvp_noguild (they are forced to off if gvg_dungeon is on and viceversa)
- Cleaned the pvp ranking code so that it takes effect even if pvp_nocalcrank is active WHEN the map is a gvg_dungeon one. - Cleaned up a bit the pvp ranking timer code. - Now homuncs and their masters are the only ones who can use support skills on the homunc. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9360 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 51fb2e23a..4218aad55 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5070,14 +5070,16 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
}
}
// pvp
- if( map[sd->bl.m].flag.pvp && !battle_config.pk_mode){ // disable certain pvp functions on pk_mode [Valaris]
- if (!map[sd->bl.m].flag.pvp_nocalcrank) {
- sd->pvp_point -= 5;
- sd->pvp_lost++;
- if (src && src->type == BL_PC) {
- struct map_session_data *ssd = (struct map_session_data *)src;
- if (ssd) { ssd->pvp_point++; ssd->pvp_won++; }
- }
+ // disable certain pvp functions on pk_mode [Valaris]
+ if (map[sd->bl.m].flag.pvp && !battle_config.pk_mode &&
+ (!map[sd->bl.m].flag.pvp_nocalcrank || map[sd->bl.m].flag.gvg_dungeon))
+ { //Pvp points always take effect on gvg_dungeon maps.
+ sd->pvp_point -= 5;
+ sd->pvp_lost++;
+ if (src && src->type == BL_PC) {
+ struct map_session_data *ssd = (struct map_session_data *)src;
+ ssd->pvp_point++;
+ ssd->pvp_won++;
}
if( sd->pvp_point < 0 ){
sd->pvp_point=0;
@@ -6623,14 +6625,8 @@ int pc_calc_pvprank(struct map_session_data *sd)
{
int old;
struct map_data *m;
-
- nullpo_retr(0, sd);
- nullpo_retr(0, m=&map[sd->bl.m]);
-
+ m=&map[sd->bl.m];
old=sd->pvp_rank;
-
- if( !(m->flag.pvp) )
- return 0;
sd->pvp_rank=1;
map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd);
if(old!=sd->pvp_rank || sd->pvp_lastusers!=m->users)
@@ -6644,8 +6640,6 @@ int pc_calc_pvprank(struct map_session_data *sd)
int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd=NULL;
- if(battle_config.pk_mode) // disable pvp ranking if pk_mode on [Valaris]
- return 0;
sd=map_id2sd(id);
if(sd==NULL)