- 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://svn.code.sf.net/p/rathena/svn/trunk@9360 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
e4e42fbcb7
commit
c22f5854dc
@ -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.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
2006/11/29
|
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
|
* 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]
|
uses the default walk speed if the player has no speed yet. [Skotlex]
|
||||||
2006/11/28
|
2006/11/28
|
||||||
|
@ -8330,13 +8330,11 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
|||||||
if(sd->status.guild_id)
|
if(sd->status.guild_id)
|
||||||
guild_send_memberinfoshort(sd,1);
|
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(map[sd->bl.m].flag.pvp){
|
||||||
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
|
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
|
||||||
if (sd->pvp_timer == -1)
|
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_timer= add_timer(gettick()+200,
|
||||||
|
pc_calc_pvprank_timer,sd->bl.id,0);
|
||||||
sd->pvp_rank=0;
|
sd->pvp_rank=0;
|
||||||
sd->pvp_lastusers=0;
|
sd->pvp_lastusers=0;
|
||||||
sd->pvp_point=5;
|
sd->pvp_point=5;
|
||||||
|
@ -2452,7 +2452,10 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
|
|||||||
}
|
}
|
||||||
else if (strcmpi(w3,"gvg_dungeon")==0) {
|
else if (strcmpi(w3,"gvg_dungeon")==0) {
|
||||||
map[m].flag.gvg_dungeon=state;
|
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) {
|
else if (strcmpi(w3,"gvg_castle")==0) {
|
||||||
map[m].flag.gvg_castle=state;
|
map[m].flag.gvg_castle=state;
|
||||||
|
28
src/map/pc.c
28
src/map/pc.c
@ -5070,14 +5070,16 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// pvp
|
// pvp
|
||||||
if( map[sd->bl.m].flag.pvp && !battle_config.pk_mode){ // disable certain pvp functions on pk_mode [Valaris]
|
// disable certain pvp functions on pk_mode [Valaris]
|
||||||
if (!map[sd->bl.m].flag.pvp_nocalcrank) {
|
if (map[sd->bl.m].flag.pvp && !battle_config.pk_mode &&
|
||||||
sd->pvp_point -= 5;
|
(!map[sd->bl.m].flag.pvp_nocalcrank || map[sd->bl.m].flag.gvg_dungeon))
|
||||||
sd->pvp_lost++;
|
{ //Pvp points always take effect on gvg_dungeon maps.
|
||||||
if (src && src->type == BL_PC) {
|
sd->pvp_point -= 5;
|
||||||
struct map_session_data *ssd = (struct map_session_data *)src;
|
sd->pvp_lost++;
|
||||||
if (ssd) { ssd->pvp_point++; ssd->pvp_won++; }
|
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 ){
|
if( sd->pvp_point < 0 ){
|
||||||
sd->pvp_point=0;
|
sd->pvp_point=0;
|
||||||
@ -6623,14 +6625,8 @@ int pc_calc_pvprank(struct map_session_data *sd)
|
|||||||
{
|
{
|
||||||
int old;
|
int old;
|
||||||
struct map_data *m;
|
struct map_data *m;
|
||||||
|
m=&map[sd->bl.m];
|
||||||
nullpo_retr(0, sd);
|
|
||||||
nullpo_retr(0, m=&map[sd->bl.m]);
|
|
||||||
|
|
||||||
old=sd->pvp_rank;
|
old=sd->pvp_rank;
|
||||||
|
|
||||||
if( !(m->flag.pvp) )
|
|
||||||
return 0;
|
|
||||||
sd->pvp_rank=1;
|
sd->pvp_rank=1;
|
||||||
map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd);
|
map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd);
|
||||||
if(old!=sd->pvp_rank || sd->pvp_lastusers!=m->users)
|
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)
|
int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data)
|
||||||
{
|
{
|
||||||
struct map_session_data *sd=NULL;
|
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);
|
sd=map_id2sd(id);
|
||||||
if(sd==NULL)
|
if(sd==NULL)
|
||||||
|
@ -1102,10 +1102,11 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
|
|||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
case BL_HOM:
|
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
|
//Placed here instead of battle_check_target because support skill
|
||||||
//invocations don't call that function.
|
//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;
|
return 0;
|
||||||
default:
|
default:
|
||||||
//Check for chase-walk/hiding/cloaking opponents.
|
//Check for chase-walk/hiding/cloaking opponents.
|
||||||
|
@ -1627,6 +1627,7 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
|
|||||||
if(sd->pvp_timer!=-1) {
|
if(sd->pvp_timer!=-1) {
|
||||||
delete_timer(sd->pvp_timer,pc_calc_pvprank_timer);
|
delete_timer(sd->pvp_timer,pc_calc_pvprank_timer);
|
||||||
sd->pvp_timer = -1;
|
sd->pvp_timer = -1;
|
||||||
|
sd->pvp_rank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pc_issit(sd)) {
|
if(pc_issit(sd)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user