Hercules merges:
-- 8ec2353: Fix bad login values. bugreport:86 -- c653a70: Added a warning for out of bounds coordinates. bugreport:419 -- 08ad9b1: Fixed bleeding not giving exp. bugreport:5811 -- 370bfb7: Updated renewal critical damage. bugreport:4464 -- 1e21ff7: Fixed @hide not getting saved on relog. bugreport:7102 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17266 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
6e9ce692b3
commit
8066c5c790
@ -1125,8 +1125,8 @@ int mmo_auth(struct login_session_data* sd, bool isServer) {
|
||||
|
||||
// update session data
|
||||
sd->account_id = acc.account_id;
|
||||
sd->login_id1 = rnd();
|
||||
sd->login_id2 = rnd();
|
||||
sd->login_id1 = rnd() + 1;
|
||||
sd->login_id2 = rnd() + 1;
|
||||
safestrncpy(sd->lastlogin, acc.lastlogin, sizeof(sd->lastlogin));
|
||||
sd->sex = acc.sex;
|
||||
sd->group_id = acc.group_id;
|
||||
|
@ -1954,7 +1954,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
|
||||
if (flag.cri)
|
||||
{
|
||||
wd.type = 0x0a;
|
||||
#ifdef RENEWAL
|
||||
flag.hit = 1;
|
||||
#else
|
||||
flag.idef = flag.idef2 = flag.hit = 1;
|
||||
#endif
|
||||
} else { //Check for Perfect Hit
|
||||
if(sd && sd->bonus.perfect_hit > 0 && rnd()%100 < sd->bonus.perfect_hit)
|
||||
flag.hit = 1;
|
||||
@ -3454,6 +3458,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
|
||||
if( flag.lh )
|
||||
wd.damage2 = battle_calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 3, wd.flag);
|
||||
|
||||
#ifdef RENEWAL
|
||||
if( flag.cri ){
|
||||
ATK_ADDRATE( sd->bonus.crit_atk_rate >= 100 ? sd->bonus.crit_atk_rate - 60 : 40 );
|
||||
}
|
||||
#endif
|
||||
|
||||
if( skill_id == CR_SHIELDBOOMERANG || skill_id == PA_SHIELDCHAIN )
|
||||
{ //Refine bonus applies after cards and elements.
|
||||
short index= sd->equip_index[EQI_HAND_L];
|
||||
|
@ -2138,6 +2138,10 @@ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const
|
||||
return strchr(start,'\n');// skip and continue
|
||||
}
|
||||
|
||||
if( m != -1 && ( x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys ) ) {
|
||||
ShowWarning("npc_parse_warp: coordinates %d/%d are out of bounds in map %s(%dx%d), in file '%s', line '%d'\n", x, y, map[m].name, map[m].xs, map[m].ys,filepath,strline(buffer,start-buffer));
|
||||
}
|
||||
|
||||
CREATE(nd, struct npc_data, 1);
|
||||
|
||||
nd->bl.id = npc_get_new_npc_id();
|
||||
@ -2203,6 +2207,10 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
|
||||
m = map_mapname2mapid(mapname);
|
||||
}
|
||||
|
||||
if( m != -1 && ( x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys ) ) {
|
||||
ShowWarning("npc_parse_shop: coordinates %d/%d are out of bounds in map %s(%dx%d), in file '%s', line '%d'\n", x, y, map[m].name, map[m].xs, map[m].ys,filepath,strline(buffer,start-buffer));
|
||||
}
|
||||
|
||||
if( !strcasecmp(w2,"cashshop") )
|
||||
type = CASHSHOP;
|
||||
else
|
||||
@ -2588,6 +2596,10 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
|
||||
m = map_mapname2mapid(mapname);
|
||||
}
|
||||
|
||||
if( m != -1 && ( x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys ) ) {
|
||||
ShowError("npc_parse_duplicate: coordinates %d/%d are out of bounds in map %s(%dx%d), in file '%s', line '%d'\n", x, y, map[m].name, map[m].xs, map[m].ys,filepath,strline(buffer,start-buffer));
|
||||
}
|
||||
|
||||
if( type == WARP && sscanf(w4, "%d,%d", &xs, &ys) == 2 );// <spanx>,<spany>
|
||||
else if( type == SCRIPT && sscanf(w4, "%d,%d,%d", &class_, &xs, &ys) == 3);// <sprite id>,<triggerX>,<triggerY>
|
||||
else if( type != WARP ) class_ = atoi(w4);// <sprite id>
|
||||
|
28
src/map/pc.c
28
src/map/pc.c
@ -521,9 +521,9 @@ int pc_makesavestatus(struct map_session_data *sd)
|
||||
//Only copy the Cart/Peco/Falcon options, the rest are handled via
|
||||
//status change load/saving. [Skotlex]
|
||||
#ifdef NEW_CARTS
|
||||
sd->status.option = sd->sc.option&(OPTION_FALCON|OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_MOUNTING);
|
||||
sd->status.option = sd->sc.option&(OPTION_INVISIBLE|OPTION_FALCON|OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_MOUNTING);
|
||||
#else
|
||||
sd->status.option = sd->sc.option&(OPTION_CART|OPTION_FALCON|OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_MOUNTING);
|
||||
sd->status.option = sd->sc.option&(OPTION_INVISIBLE|OPTION_CART|OPTION_FALCON|OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_MOUNTING);
|
||||
#endif
|
||||
if (sd->sc.data[SC_JAILED])
|
||||
{ //When Jailed, do not move last point.
|
||||
@ -1005,12 +1005,11 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
|
||||
pc_setinventorydata(sd);
|
||||
pc_setequipindex(sd);
|
||||
|
||||
status_change_init(&sd->bl);
|
||||
if( sd->status.option&OPTION_INVISIBLE && !pc_can_use_command( sd, "hide", COMMAND_ATCOMMAND ) ){
|
||||
sd->status.option &= ~OPTION_INVISIBLE;
|
||||
}
|
||||
|
||||
if (pc_can_use_command(sd, "hide", COMMAND_ATCOMMAND))
|
||||
sd->status.option &= (OPTION_MASK | OPTION_INVISIBLE);
|
||||
else
|
||||
sd->status.option &= OPTION_MASK;
|
||||
status_change_init(&sd->bl);
|
||||
|
||||
sd->sc.option = sd->status.option; //This is the actual option used in battle.
|
||||
//Set here because we need the inventory data for weapon sprite parsing.
|
||||
@ -1237,6 +1236,21 @@ int pc_reg_received(struct map_session_data *sd)
|
||||
|
||||
pc_inventory_rentals(sd);
|
||||
|
||||
if( sd->sc.option&OPTION_INVISIBLE ) {
|
||||
sd->vd.class_ = INVISIBLE_CLASS;
|
||||
clif_displaymessage( sd->fd, msg_txt( sd, 11 ) ); // Invisible: On
|
||||
// decrement the number of pvp players on the map
|
||||
map[sd->bl.m].users_pvp--;
|
||||
|
||||
if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ){
|
||||
// unregister the player for ranking
|
||||
delete_timer( sd->pvp_timer, pc_calc_pvprank_timer );
|
||||
sd->pvp_timer = INVALID_TIMER;
|
||||
}
|
||||
|
||||
clif_changeoption( &sd->bl );
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -9215,7 +9215,6 @@ int status_change_clear(struct block_list* bl, int type) {
|
||||
sc->opt1 = 0;
|
||||
sc->opt2 = 0;
|
||||
sc->opt3 = 0;
|
||||
sc->option &= OPTION_MASK;
|
||||
|
||||
if( type == 0 || type == 2 )
|
||||
clif_changeoption(bl);
|
||||
@ -10091,6 +10090,9 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
|
||||
if (--(sce->val4) >= 0) {
|
||||
int hp = rnd()%600 + 200;
|
||||
struct block_list* src = map_id2bl(sce->val2);
|
||||
if( src && bl && bl->type == BL_MOB ){
|
||||
mob_log_damage( (TBL_MOB*)bl, src, sd || hp < status->hp ? hp : status->hp - 1 );
|
||||
}
|
||||
map_freeblock_lock();
|
||||
status_fix_damage(src, bl, sd||hp<status->hp?hp:status->hp-1, 1);
|
||||
if( sc->data[type] ) {
|
||||
|
@ -1519,7 +1519,6 @@ enum {
|
||||
|
||||
// compound constants
|
||||
OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5,
|
||||
OPTION_MASK = ~OPTION_INVISIBLE,
|
||||
};
|
||||
|
||||
//Defines for the manner system [Skotlex]
|
||||
|
Loading…
x
Reference in New Issue
Block a user