Merge branch 'master' of https://github.com/rathena/rathena into feature/official_packet_obfuscation
This commit is contained in:
commit
86f1cebee8
@ -92,6 +92,7 @@ duel_only_on_same_map: no
|
|||||||
// Official - Only affects the walking routines of characters, including monsters.
|
// Official - Only affects the walking routines of characters, including monsters.
|
||||||
// If a unit stops walking and is on a cell with more than stack limit
|
// If a unit stops walking and is on a cell with more than stack limit
|
||||||
// characters on it, it will walk to the closest free cell.
|
// characters on it, it will walk to the closest free cell.
|
||||||
|
// Set to 0 for no cell stacking checks and free movement.
|
||||||
// Custom - This variation will make every full cell to be considered a wall.
|
// Custom - This variation will make every full cell to be considered a wall.
|
||||||
// NOTE: For the custom setting to take effect you have to use a server compiled
|
// NOTE: For the custom setting to take effect you have to use a server compiled
|
||||||
// with Cell Stack Limit support (see src/map/map.h)
|
// with Cell Stack Limit support (see src/map/map.h)
|
||||||
|
@ -7704,7 +7704,7 @@ static const struct _battle_data {
|
|||||||
{ "bone_drop", &battle_config.bone_drop, 0, 0, 2, },
|
{ "bone_drop", &battle_config.bone_drop, 0, 0, 2, },
|
||||||
{ "buyer_name", &battle_config.buyer_name, 1, 0, 1, },
|
{ "buyer_name", &battle_config.buyer_name, 1, 0, 1, },
|
||||||
{ "skill_wall_check", &battle_config.skill_wall_check, 1, 0, 1, },
|
{ "skill_wall_check", &battle_config.skill_wall_check, 1, 0, 1, },
|
||||||
{ "official_cell_stack_limit", &battle_config.official_cell_stack_limit, 1, 1, 255, },
|
{ "official_cell_stack_limit", &battle_config.official_cell_stack_limit, 1, 0, 255, },
|
||||||
{ "custom_cell_stack_limit", &battle_config.custom_cell_stack_limit, 1, 1, 255, },
|
{ "custom_cell_stack_limit", &battle_config.custom_cell_stack_limit, 1, 1, 255, },
|
||||||
{ "dancing_weaponswitch_fix", &battle_config.dancing_weaponswitch_fix, 1, 0, 1, },
|
{ "dancing_weaponswitch_fix", &battle_config.dancing_weaponswitch_fix, 1, 0, 1, },
|
||||||
|
|
||||||
|
@ -10083,6 +10083,13 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
|
|||||||
if(sd->sc.data[SC_RUN] || sd->sc.data[SC_WUGDASH])
|
if(sd->sc.data[SC_RUN] || sd->sc.data[SC_WUGDASH])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
RFIFOPOS(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0], &x, &y, NULL);
|
||||||
|
|
||||||
|
//A move command one cell west is only valid if the target cell is free
|
||||||
|
if(battle_config.official_cell_stack_limit > 0
|
||||||
|
&& sd->bl.x == x+1 && sd->bl.y == y && map_count_oncell(sd->bl.m, x, y, BL_CHAR|BL_NPC, 1))
|
||||||
|
return;
|
||||||
|
|
||||||
// Cloaking wall check is actually updated when you click to process next movement
|
// Cloaking wall check is actually updated when you click to process next movement
|
||||||
// not when you move each cell. This is official behaviour.
|
// not when you move each cell. This is official behaviour.
|
||||||
if (sd->sc.data[SC_CLOAKING])
|
if (sd->sc.data[SC_CLOAKING])
|
||||||
@ -10090,8 +10097,6 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
|
|||||||
|
|
||||||
pc_delinvincibletimer(sd);
|
pc_delinvincibletimer(sd);
|
||||||
|
|
||||||
RFIFOPOS(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0], &x, &y, NULL);
|
|
||||||
|
|
||||||
//Set last idle time... [Skotlex]
|
//Set last idle time... [Skotlex]
|
||||||
if (battle_config.idletime_option&IDLE_WALK)
|
if (battle_config.idletime_option&IDLE_WALK)
|
||||||
sd->idletime = last_tick;
|
sd->idletime = last_tick;
|
||||||
|
@ -1334,7 +1334,8 @@ int mob_unlocktarget(struct mob_data *md, unsigned int tick)
|
|||||||
md->ud.target_to = 0;
|
md->ud.target_to = 0;
|
||||||
unit_set_target(&md->ud, 0);
|
unit_set_target(&md->ud, 0);
|
||||||
}
|
}
|
||||||
if(map_count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
|
if(battle_config.official_cell_stack_limit > 0
|
||||||
|
&& map_count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
|
||||||
unit_walktoxy(&md->bl, md->bl.x, md->bl.y, 8);
|
unit_walktoxy(&md->bl, md->bl.x, md->bl.y, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
src/map/pc.c
12
src/map/pc.c
@ -1617,8 +1617,6 @@ void pc_calc_skilltree(struct map_session_data *sd)
|
|||||||
if (sk_id == NV_BASIC || sk_id == NV_FIRSTAID || sk_id == WE_CALLBABY)
|
if (sk_id == NV_BASIC || sk_id == NV_FIRSTAID || sk_id == WE_CALLBABY)
|
||||||
continue;
|
continue;
|
||||||
sd->status.skill[sk_idx].id = 0;
|
sd->status.skill[sk_idx].id = 0;
|
||||||
sd->status.skill[sk_idx].lv = 0;
|
|
||||||
sd->status.skill[sk_idx].flag = SKILL_FLAG_PERMANENT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1705,7 +1703,7 @@ void pc_calc_skilltree(struct map_session_data *sd)
|
|||||||
continue;
|
continue;
|
||||||
if( (skill_get_inf2(skid)&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) )
|
if( (skill_get_inf2(skid)&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) )
|
||||||
continue; //Do not include Quest/Wedding skills.
|
continue; //Do not include Quest/Wedding skills.
|
||||||
if( sd->status.skill[sk_idx].id == 0 ) { //do we really want skid as index ? //Lighta
|
if( sd->status.skill[sk_idx].id == 0 ) {
|
||||||
sd->status.skill[sk_idx].id = skid;
|
sd->status.skill[sk_idx].id = skid;
|
||||||
sd->status.skill[sk_idx].flag = SKILL_FLAG_TEMPORARY; // So it is not saved, and tagged as a "bonus" skill.
|
sd->status.skill[sk_idx].flag = SKILL_FLAG_TEMPORARY; // So it is not saved, and tagged as a "bonus" skill.
|
||||||
} else if( skid != NV_BASIC )
|
} else if( skid != NV_BASIC )
|
||||||
@ -4809,7 +4807,7 @@ int pc_useitem(struct map_session_data *sd,int n)
|
|||||||
if( sd->item_delay[i].nameid ) {// found
|
if( sd->item_delay[i].nameid ) {// found
|
||||||
if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) {
|
if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) {
|
||||||
int e_tick = DIFF_TICK(sd->item_delay[i].tick, tick)/1000;
|
int e_tick = DIFF_TICK(sd->item_delay[i].tick, tick)/1000;
|
||||||
char e_msg[100];
|
char e_msg[CHAT_SIZE_MAX];
|
||||||
if( e_tick > 99 )
|
if( e_tick > 99 )
|
||||||
sprintf(e_msg,msg_txt(sd,379), // Item Failed. [%s] is cooling down. Wait %.1f minutes.
|
sprintf(e_msg,msg_txt(sd,379), // Item Failed. [%s] is cooling down. Wait %.1f minutes.
|
||||||
itemdb_jname(sd->item_delay[i].nameid), (double)e_tick / 60);
|
itemdb_jname(sd->item_delay[i].nameid), (double)e_tick / 60);
|
||||||
@ -6757,8 +6755,8 @@ void pc_skillup(struct map_session_data *sd,uint16 skill_id)
|
|||||||
if (!pc_has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown
|
if (!pc_has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown
|
||||||
clif_skillinfoblock(sd);
|
clif_skillinfoblock(sd);
|
||||||
}
|
}
|
||||||
else
|
//else
|
||||||
ShowDebug("Skill Level up failed. ID:%d idx:%d (CID=%d. AID=%d)\n", skill_id, idx, sd->status.char_id, sd->status.account_id);
|
// ShowDebug("Skill Level up failed. ID:%d idx:%d (CID=%d. AID=%d)\n", skill_id, idx, sd->status.char_id, sd->status.account_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7017,7 +7015,7 @@ int pc_resetskill(struct map_session_data* sd, int flag)
|
|||||||
if (lv == 0 || skill_id == 0)
|
if (lv == 0 || skill_id == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
inf2 = skill_get_inf2(i);
|
inf2 = skill_get_inf2(skill_id);
|
||||||
|
|
||||||
if( inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL) ) //Avoid reseting wedding/linker skills.
|
if( inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL) ) //Avoid reseting wedding/linker skills.
|
||||||
continue;
|
continue;
|
||||||
|
@ -520,7 +520,8 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
|
|||||||
ud->to_x = bl->x;
|
ud->to_x = bl->x;
|
||||||
ud->to_y = bl->y;
|
ud->to_y = bl->y;
|
||||||
|
|
||||||
if(map_count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
|
if(battle_config.official_cell_stack_limit > 0
|
||||||
|
&& map_count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
|
||||||
//Walked on occupied cell, call unit_walktoxy again
|
//Walked on occupied cell, call unit_walktoxy again
|
||||||
if(ud->steptimer != INVALID_TIMER) {
|
if(ud->steptimer != INVALID_TIMER) {
|
||||||
//Execute step timer on next step instead
|
//Execute step timer on next step instead
|
||||||
|
Loading…
x
Reference in New Issue
Block a user