diff options
-rw-r--r-- | Changelog-Trunk.txt | 7 | ||||
-rw-r--r-- | src/map/clif.c | 8 | ||||
-rw-r--r-- | src/map/npc.c | 5 | ||||
-rw-r--r-- | src/map/pc.c | 28 | ||||
-rw-r--r-- | src/map/status.c | 5 | ||||
-rw-r--r-- | src/map/unit.c | 1 |
6 files changed, 29 insertions, 25 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index a9da0b8ac..74c42b118 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,13 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/11/29
+ * 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) [Skotlex]
+ * Cleaned the pvp ranking code so that it takes effect even if
+ pvp_nocalcrank is active WHEN the map is a gvg_dungeon one. [Skotlex]
+ * Now homuncs and their masters are the only ones who can use support
+ skills on them. [Skotlex]
* Some cleaning on the homunc speed calculating code, so that it correctly
uses the default walk speed if the player has no speed yet. [Skotlex]
2006/11/28
diff --git a/src/map/clif.c b/src/map/clif.c index 380a57095..682158408 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8330,13 +8330,11 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if(sd->status.guild_id)
guild_send_memberinfoshort(sd,1);
- // pvp
- //if(sd->pvp_timer!=-1 && !battle_config.pk_mode) /PVP Client crash fix* Removed timer deletion
- // delete_timer(sd->pvp_timer,pc_calc_pvprank_timer);
if(map[sd->bl.m].flag.pvp){
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
- if (sd->pvp_timer == -1)
- sd->pvp_timer=add_timer(gettick()+200,pc_calc_pvprank_timer,sd->bl.id,0);
+ if (!map[sd->bl.m].flag.pvp_nocalcrank)
+ sd->pvp_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/npc.c b/src/map/npc.c index 236f0a7e0..7dd0f146c 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2452,7 +2452,10 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4) }
else if (strcmpi(w3,"gvg_dungeon")==0) {
map[m].flag.gvg_dungeon=state;
- if (state) map[m].flag.pvp=0;
+ map[m].flag.pvp=state;
+ map[m].flag.pvp_noparty=!state;
+ map[m].flag.pvp_noguild=!state;
+ map[m].flag.pvp_nocalcrank=state;
}
else if (strcmpi(w3,"gvg_castle")==0) {
map[m].flag.gvg_castle=state;
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) diff --git a/src/map/status.c b/src/map/status.c index 3b36944c1..6c97a70b3 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1102,10 +1102,11 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int return 1;
return 0;
case BL_HOM:
- //Can't use support skills on homun
+ //Can't use support skills on homun (only master/self can)
//Placed here instead of battle_check_target because support skill
//invocations don't call that function.
- if (skill_num && skill_get_inf(skill_num)&INF_SUPPORT_SKILL)
+ if (skill_num && skill_get_inf(skill_num)&INF_SUPPORT_SKILL &&
+ battle_get_master(target) != src)
return 0;
default:
//Check for chase-walk/hiding/cloaking opponents.
diff --git a/src/map/unit.c b/src/map/unit.c index 9ee07430a..9b6e4e85c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1627,6 +1627,7 @@ int unit_remove_map(struct block_list *bl, int clrtype) { if(sd->pvp_timer!=-1) { delete_timer(sd->pvp_timer,pc_calc_pvprank_timer); sd->pvp_timer = -1; + sd->pvp_rank = 0; } if(pc_issit(sd)) { |