|
@@ -1682,9 +1682,9 @@ bool pc_adoption(map_session_data *p1_sd, map_session_data *p2_sd, map_session_d
|
|
|
|
|
|
// Restore progress
|
|
// Restore progress
|
|
b_sd->status.job_level = joblevel;
|
|
b_sd->status.job_level = joblevel;
|
|
- clif_updatestatus(b_sd, SP_JOBLEVEL);
|
|
|
|
|
|
+ clif_updatestatus(*b_sd, SP_JOBLEVEL);
|
|
b_sd->status.job_exp = jobexp;
|
|
b_sd->status.job_exp = jobexp;
|
|
- clif_updatestatus(b_sd, SP_JOBEXP);
|
|
|
|
|
|
+ clif_updatestatus(*b_sd, SP_JOBEXP);
|
|
|
|
|
|
// Baby Skills
|
|
// Baby Skills
|
|
pc_skill(b_sd, WE_BABY, 1, ADDSKILL_PERMANENT);
|
|
pc_skill(b_sd, WE_BABY, 1, ADDSKILL_PERMANENT);
|
|
@@ -2204,7 +2204,7 @@ bool pc_authok(map_session_data *sd, uint32 login_id2, time_t expiration_time, i
|
|
/**
|
|
/**
|
|
* Fixes login-without-aura glitch (the screen won't blink at this point, don't worry :P)
|
|
* Fixes login-without-aura glitch (the screen won't blink at this point, don't worry :P)
|
|
**/
|
|
**/
|
|
- clif_changemap(sd,sd->bl.m,sd->bl.x,sd->bl.y);
|
|
|
|
|
|
+ clif_changemap( *sd, sd->bl.m, sd->bl.x, sd->bl.y );
|
|
}
|
|
}
|
|
|
|
|
|
pc_validate_skill(sd);
|
|
pc_validate_skill(sd);
|
|
@@ -2233,11 +2233,11 @@ bool pc_authok(map_session_data *sd, uint32 login_id2, time_t expiration_time, i
|
|
// Check EXP overflow, since in previous revision EXP on Max Level can be more than 'official' Max EXP
|
|
// Check EXP overflow, since in previous revision EXP on Max Level can be more than 'official' Max EXP
|
|
if (pc_is_maxbaselv(sd) && sd->status.base_exp > MAX_LEVEL_BASE_EXP) {
|
|
if (pc_is_maxbaselv(sd) && sd->status.base_exp > MAX_LEVEL_BASE_EXP) {
|
|
sd->status.base_exp = MAX_LEVEL_BASE_EXP;
|
|
sd->status.base_exp = MAX_LEVEL_BASE_EXP;
|
|
- clif_updatestatus(sd, SP_BASEEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_BASEEXP);
|
|
}
|
|
}
|
|
if (pc_is_maxjoblv(sd) && sd->status.job_exp > MAX_LEVEL_JOB_EXP) {
|
|
if (pc_is_maxjoblv(sd) && sd->status.job_exp > MAX_LEVEL_JOB_EXP) {
|
|
sd->status.job_exp = MAX_LEVEL_JOB_EXP;
|
|
sd->status.job_exp = MAX_LEVEL_JOB_EXP;
|
|
- clif_updatestatus(sd, SP_JOBEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_JOBEXP);
|
|
}
|
|
}
|
|
|
|
|
|
// Request all registries (auth is considered completed whence they arrive)
|
|
// Request all registries (auth is considered completed whence they arrive)
|
|
@@ -3003,7 +3003,7 @@ int pc_disguise(map_session_data *sd, int class_)
|
|
|
|
|
|
if (sd->bl.prev != nullptr) {
|
|
if (sd->bl.prev != nullptr) {
|
|
pc_stop_walking(sd, 0);
|
|
pc_stop_walking(sd, 0);
|
|
- clif_clearunit_area(&sd->bl, CLR_OUTSIGHT);
|
|
|
|
|
|
+ clif_clearunit_area( sd->bl, CLR_OUTSIGHT );
|
|
}
|
|
}
|
|
|
|
|
|
if (!class_) {
|
|
if (!class_) {
|
|
@@ -3020,7 +3020,7 @@ int pc_disguise(map_session_data *sd, int class_)
|
|
if (class_ == sd->status.class_ && pc_iscarton(sd))
|
|
if (class_ == sd->status.class_ && pc_iscarton(sd))
|
|
{ //It seems the cart info is lost on undisguise.
|
|
{ //It seems the cart info is lost on undisguise.
|
|
clif_cartlist(sd);
|
|
clif_cartlist(sd);
|
|
- clif_updatestatus(sd,SP_CARTINFO);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_CARTINFO);
|
|
}
|
|
}
|
|
if (sd->chatID) {
|
|
if (sd->chatID) {
|
|
struct chat_data* cd;
|
|
struct chat_data* cd;
|
|
@@ -5691,7 +5691,7 @@ char pc_payzeny(map_session_data *sd, int zeny, enum e_log_pick_type type, uint3
|
|
return 1; //Not enough.
|
|
return 1; //Not enough.
|
|
|
|
|
|
sd->status.zeny -= zeny;
|
|
sd->status.zeny -= zeny;
|
|
- clif_updatestatus(sd,SP_ZENY);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_ZENY);
|
|
|
|
|
|
log_zeny(*sd, type, log_charid, -zeny);
|
|
log_zeny(*sd, type, log_charid, -zeny);
|
|
if( zeny > 0 && sd->state.showzeny ) {
|
|
if( zeny > 0 && sd->state.showzeny ) {
|
|
@@ -5725,7 +5725,7 @@ char pc_getzeny(map_session_data *sd, int zeny, enum e_log_pick_type type, uint3
|
|
zeny = MAX_ZENY - sd->status.zeny;
|
|
zeny = MAX_ZENY - sd->status.zeny;
|
|
|
|
|
|
sd->status.zeny += zeny;
|
|
sd->status.zeny += zeny;
|
|
- clif_updatestatus(sd,SP_ZENY);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_ZENY);
|
|
|
|
|
|
log_zeny(*sd, type, log_charid, zeny);
|
|
log_zeny(*sd, type, log_charid, zeny);
|
|
if( zeny > 0 && sd->state.showzeny ) {
|
|
if( zeny > 0 && sd->state.showzeny ) {
|
|
@@ -5952,7 +5952,7 @@ enum e_additem_result pc_additem(map_session_data *sd,struct item *item,int amou
|
|
log_pick_pc(sd, log_type, amount, &sd->inventory.u.items_inventory[i]);
|
|
log_pick_pc(sd, log_type, amount, &sd->inventory.u.items_inventory[i]);
|
|
|
|
|
|
sd->weight += w;
|
|
sd->weight += w;
|
|
- clif_updatestatus(sd,SP_WEIGHT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_WEIGHT);
|
|
//Auto-equip
|
|
//Auto-equip
|
|
if(id->flag.autoequip)
|
|
if(id->flag.autoequip)
|
|
pc_equipitem(sd, i, id->equip);
|
|
pc_equipitem(sd, i, id->equip);
|
|
@@ -6003,9 +6003,9 @@ char pc_delitem(map_session_data *sd,int n,int amount,int type, short reason, e_
|
|
sd->inventory_data[n] = nullptr;
|
|
sd->inventory_data[n] = nullptr;
|
|
}
|
|
}
|
|
if(!(type&1))
|
|
if(!(type&1))
|
|
- clif_delitem(sd,n,amount,reason);
|
|
|
|
|
|
+ clif_delitem( *sd, n, amount, reason );
|
|
if(!(type&2))
|
|
if(!(type&2))
|
|
- clif_updatestatus(sd,SP_WEIGHT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_WEIGHT);
|
|
|
|
|
|
pc_show_questinfo(sd);
|
|
pc_show_questinfo(sd);
|
|
|
|
|
|
@@ -6057,7 +6057,8 @@ bool pc_dropitem(map_session_data *sd,int n,int amount)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
pc_delitem(sd, n, amount, 1, 0, LOG_TYPE_PICKDROP_PLAYER);
|
|
pc_delitem(sd, n, amount, 1, 0, LOG_TYPE_PICKDROP_PLAYER);
|
|
- clif_dropitem(sd, n, amount);
|
|
|
|
|
|
+ clif_dropitem( *sd, n, amount );
|
|
|
|
+
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -6484,7 +6485,7 @@ enum e_additem_result pc_cart_additem(map_session_data *sd,struct item *item,int
|
|
log_pick_pc(sd, log_type, amount, &sd->cart.u.items_cart[i]);
|
|
log_pick_pc(sd, log_type, amount, &sd->cart.u.items_cart[i]);
|
|
|
|
|
|
sd->cart_weight += w;
|
|
sd->cart_weight += w;
|
|
- clif_updatestatus(sd,SP_CARTINFO);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_CARTINFO);
|
|
|
|
|
|
return ADDITEM_SUCCESS;
|
|
return ADDITEM_SUCCESS;
|
|
}
|
|
}
|
|
@@ -6510,7 +6511,7 @@ void pc_cart_delitem(map_session_data *sd,int n,int amount,int type,e_log_pick_t
|
|
}
|
|
}
|
|
if(!type) {
|
|
if(!type) {
|
|
clif_cart_delitem(sd,n,amount);
|
|
clif_cart_delitem(sd,n,amount);
|
|
- clif_updatestatus(sd,SP_CARTINFO);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_CARTINFO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -6541,7 +6542,7 @@ void pc_putitemtocart(map_session_data *sd,int idx,int amount)
|
|
else {
|
|
else {
|
|
clif_cart_additem_ack(sd, (flag == ADDITEM_OVERAMOUNT) ? ADDITEM_TO_CART_FAIL_COUNT : ADDITEM_TO_CART_FAIL_WEIGHT);
|
|
clif_cart_additem_ack(sd, (flag == ADDITEM_OVERAMOUNT) ? ADDITEM_TO_CART_FAIL_COUNT : ADDITEM_TO_CART_FAIL_WEIGHT);
|
|
clif_additem(sd, idx, amount, 0);
|
|
clif_additem(sd, idx, amount, 0);
|
|
- clif_delitem(sd, idx, amount, 0);
|
|
|
|
|
|
+ clif_delitem( *sd, idx, amount, 0 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -6953,7 +6954,7 @@ enum e_setpos pc_setpos(map_session_data* sd, unsigned short mapindex, int x, in
|
|
|
|
|
|
if(sd->bl.prev != nullptr){
|
|
if(sd->bl.prev != nullptr){
|
|
unit_remove_map_pc(sd,clrtype);
|
|
unit_remove_map_pc(sd,clrtype);
|
|
- clif_changemap(sd,m,x,y); // [MouseJstr]
|
|
|
|
|
|
+ clif_changemap( *sd, m, x, y );
|
|
} else if(sd->state.active) //Tag player for rewarping after map-loading is done. [Skotlex]
|
|
} else if(sd->state.active) //Tag player for rewarping after map-loading is done. [Skotlex]
|
|
sd->state.rewarp = 1;
|
|
sd->state.rewarp = 1;
|
|
|
|
|
|
@@ -8095,11 +8096,11 @@ int pc_checkbaselevelup(map_session_data *sd) {
|
|
if (battle_config.pet_lv_rate && sd->pd) //<Skotlex> update pet's level
|
|
if (battle_config.pet_lv_rate && sd->pd) //<Skotlex> update pet's level
|
|
status_calc_pet(sd->pd,SCO_NONE);
|
|
status_calc_pet(sd->pd,SCO_NONE);
|
|
|
|
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_TRAITPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_BASELEVEL);
|
|
|
|
- clif_updatestatus(sd,SP_BASEEXP);
|
|
|
|
- clif_updatestatus(sd,SP_NEXTBASEEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_TRAITPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_BASELEVEL);
|
|
|
|
+ clif_updatestatus(*sd,SP_BASEEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_NEXTBASEEXP);
|
|
status_calc_pc(sd,SCO_FORCE);
|
|
status_calc_pc(sd,SCO_FORCE);
|
|
status_percent_heal(&sd->bl,100,100);
|
|
status_percent_heal(&sd->bl,100,100);
|
|
|
|
|
|
@@ -8166,10 +8167,10 @@ int pc_checkjoblevelup(map_session_data *sd)
|
|
}
|
|
}
|
|
} while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next);
|
|
} while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next);
|
|
|
|
|
|
- clif_updatestatus(sd,SP_JOBLEVEL);
|
|
|
|
- clif_updatestatus(sd,SP_JOBEXP);
|
|
|
|
- clif_updatestatus(sd,SP_NEXTJOBEXP);
|
|
|
|
- clif_updatestatus(sd,SP_SKILLPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBLEVEL);
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_NEXTJOBEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_SKILLPOINT);
|
|
status_calc_pc(sd,SCO_FORCE);
|
|
status_calc_pc(sd,SCO_FORCE);
|
|
clif_misceffect(&sd->bl,1);
|
|
clif_misceffect(&sd->bl,1);
|
|
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)) )
|
|
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)) )
|
|
@@ -8338,7 +8339,7 @@ void pc_gainexp(map_session_data *sd, struct block_list *src, t_exp base_exp, t_
|
|
sd->status.base_exp = util::safe_addition_cap(sd->status.base_exp, base_exp, MAX_EXP);
|
|
sd->status.base_exp = util::safe_addition_cap(sd->status.base_exp, base_exp, MAX_EXP);
|
|
|
|
|
|
if (!pc_checkbaselevelup(sd))
|
|
if (!pc_checkbaselevelup(sd))
|
|
- clif_updatestatus(sd,SP_BASEEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_BASEEXP);
|
|
}
|
|
}
|
|
|
|
|
|
// Give EXP for Job Level
|
|
// Give EXP for Job Level
|
|
@@ -8346,7 +8347,7 @@ void pc_gainexp(map_session_data *sd, struct block_list *src, t_exp base_exp, t_
|
|
sd->status.job_exp = util::safe_addition_cap(sd->status.job_exp, job_exp, MAX_EXP);
|
|
sd->status.job_exp = util::safe_addition_cap(sd->status.job_exp, job_exp, MAX_EXP);
|
|
|
|
|
|
if (!pc_checkjoblevelup(sd))
|
|
if (!pc_checkjoblevelup(sd))
|
|
- clif_updatestatus(sd,SP_JOBEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBEXP);
|
|
}
|
|
}
|
|
|
|
|
|
if (flag&1)
|
|
if (flag&1)
|
|
@@ -8372,14 +8373,14 @@ void pc_lostexp(map_session_data *sd, t_exp base_exp, t_exp job_exp) {
|
|
base_exp = u64min(sd->status.base_exp, base_exp);
|
|
base_exp = u64min(sd->status.base_exp, base_exp);
|
|
sd->status.base_exp -= base_exp;
|
|
sd->status.base_exp -= base_exp;
|
|
clif_displayexp(sd, base_exp, SP_BASEEXP, false, true);
|
|
clif_displayexp(sd, base_exp, SP_BASEEXP, false, true);
|
|
- clif_updatestatus(sd, SP_BASEEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_BASEEXP);
|
|
}
|
|
}
|
|
|
|
|
|
if (job_exp) {
|
|
if (job_exp) {
|
|
job_exp = u64min(sd->status.job_exp, job_exp);
|
|
job_exp = u64min(sd->status.job_exp, job_exp);
|
|
sd->status.job_exp -= job_exp;
|
|
sd->status.job_exp -= job_exp;
|
|
clif_displayexp(sd, job_exp, SP_JOBEXP, false, true);
|
|
clif_displayexp(sd, job_exp, SP_JOBEXP, false, true);
|
|
- clif_updatestatus(sd, SP_JOBEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_JOBEXP);
|
|
}
|
|
}
|
|
|
|
|
|
if (sd->state.showexp && (base_exp || job_exp))
|
|
if (sd->state.showexp && (base_exp || job_exp))
|
|
@@ -8730,15 +8731,15 @@ bool pc_statusup(map_session_data* sd, int type, int increase)
|
|
status_calc_pc(sd,SCO_NONE);
|
|
status_calc_pc(sd,SCO_NONE);
|
|
|
|
|
|
// update increase cost indicator
|
|
// update increase cost indicator
|
|
- clif_updatestatus(sd, SP_USTR + type-SP_STR);
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + type-SP_STR ) );
|
|
|
|
|
|
// update statpoint count
|
|
// update statpoint count
|
|
- clif_updatestatus(sd, SP_STATUSPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_STATUSPOINT);
|
|
|
|
|
|
// update stat value
|
|
// update stat value
|
|
clif_statusupack(sd, type, 1, final_value); // required
|
|
clif_statusupack(sd, type, 1, final_value); // required
|
|
if( final_value > 255 )
|
|
if( final_value > 255 )
|
|
- clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value);
|
|
achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value);
|
|
|
|
|
|
@@ -8777,12 +8778,12 @@ int pc_statusup2(map_session_data* sd, int type, int val)
|
|
|
|
|
|
// update increase cost indicator
|
|
// update increase cost indicator
|
|
if( need != pc_need_status_point(sd,type,1) )
|
|
if( need != pc_need_status_point(sd,type,1) )
|
|
- clif_updatestatus(sd, SP_USTR + type-SP_STR);
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( SP_USTR + type-SP_STR ) );
|
|
|
|
|
|
// update stat value
|
|
// update stat value
|
|
clif_statusupack(sd,type,1,val); // required
|
|
clif_statusupack(sd,type,1,val); // required
|
|
if( val > 255 )
|
|
if( val > 255 )
|
|
- clif_updatestatus(sd,type); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
return val;
|
|
return val;
|
|
}
|
|
}
|
|
@@ -8893,15 +8894,15 @@ bool pc_traitstatusup(map_session_data* sd, int type, int increase)
|
|
status_calc_pc(sd, SCO_NONE);
|
|
status_calc_pc(sd, SCO_NONE);
|
|
|
|
|
|
// update increase cost indicator
|
|
// update increase cost indicator
|
|
- clif_updatestatus(sd, SP_UPOW + type - SP_POW);
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + type - SP_POW ) );
|
|
|
|
|
|
// update statpoint count
|
|
// update statpoint count
|
|
- clif_updatestatus(sd, SP_TRAITPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_TRAITPOINT);
|
|
|
|
|
|
// update stat value
|
|
// update stat value
|
|
clif_statusupack(sd, type, 1, final_value); // required
|
|
clif_statusupack(sd, type, 1, final_value); // required
|
|
if (final_value > 255)
|
|
if (final_value > 255)
|
|
- clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
//achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value);
|
|
//achievement_update_objective(sd, AG_GOAL_STATUS, 1, final_value);
|
|
|
|
|
|
@@ -8938,12 +8939,12 @@ int pc_traitstatusup2(map_session_data* sd, int type, int val)
|
|
|
|
|
|
// update increase cost indicator
|
|
// update increase cost indicator
|
|
if (need != pc_need_trait_point(sd, type, 1))
|
|
if (need != pc_need_trait_point(sd, type, 1))
|
|
- clif_updatestatus(sd, SP_UPOW + type - SP_POW);
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( SP_UPOW + type - SP_POW ) );
|
|
|
|
|
|
// update stat value
|
|
// update stat value
|
|
clif_statusupack(sd, type, 1, val); // required
|
|
clif_statusupack(sd, type, 1, val); // required
|
|
if (val > 255)
|
|
if (val > 255)
|
|
- clif_updatestatus(sd, type); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
+ clif_updatestatus(*sd, static_cast<_sp>( type ) ); // send after the 'ack' to override the truncated value
|
|
|
|
|
|
return val;
|
|
return val;
|
|
}
|
|
}
|
|
@@ -8994,9 +8995,9 @@ void pc_skillup(map_session_data *sd,uint16 skill_id)
|
|
range = skill_get_range2(&sd->bl, skill_id, lv, false);
|
|
range = skill_get_range2(&sd->bl, skill_id, lv, false);
|
|
upgradable = (lv < skill_tree_get_max(sd->status.skill[idx].id, sd->status.class_)) ? 1 : 0;
|
|
upgradable = (lv < skill_tree_get_max(sd->status.skill[idx].id, sd->status.class_)) ? 1 : 0;
|
|
clif_skillup(sd,skill_id,lv,range,upgradable);
|
|
clif_skillup(sd,skill_id,lv,range,upgradable);
|
|
- clif_updatestatus(sd,SP_SKILLPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_SKILLPOINT);
|
|
if( skill_id == GN_REMODELING_CART ) /* cart weight info was updated by status_calc_pc */
|
|
if( skill_id == GN_REMODELING_CART ) /* cart weight info was updated by status_calc_pc */
|
|
- clif_updatestatus(sd,SP_CARTINFO);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_CARTINFO);
|
|
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)))
|
|
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)))
|
|
clif_status_change(&sd->bl, EFST_DEVIL1, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL.
|
|
clif_status_change(&sd->bl, EFST_DEVIL1, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL.
|
|
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
|
|
@@ -9117,41 +9118,41 @@ int pc_resetlvl(map_session_data* sd,int type)
|
|
sd->status.job_exp=0;
|
|
sd->status.job_exp=0;
|
|
}
|
|
}
|
|
|
|
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_TRAITPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_STR);
|
|
|
|
- clif_updatestatus(sd,SP_AGI);
|
|
|
|
- clif_updatestatus(sd,SP_VIT);
|
|
|
|
- clif_updatestatus(sd,SP_INT);
|
|
|
|
- clif_updatestatus(sd,SP_DEX);
|
|
|
|
- clif_updatestatus(sd,SP_LUK);
|
|
|
|
- clif_updatestatus(sd,SP_POW);
|
|
|
|
- clif_updatestatus(sd,SP_STA);
|
|
|
|
- clif_updatestatus(sd,SP_WIS);
|
|
|
|
- clif_updatestatus(sd,SP_SPL);
|
|
|
|
- clif_updatestatus(sd,SP_CON);
|
|
|
|
- clif_updatestatus(sd,SP_CRT);
|
|
|
|
- clif_updatestatus(sd,SP_BASELEVEL);
|
|
|
|
- clif_updatestatus(sd,SP_JOBLEVEL);
|
|
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_BASEEXP);
|
|
|
|
- clif_updatestatus(sd,SP_JOBEXP);
|
|
|
|
- clif_updatestatus(sd,SP_NEXTBASEEXP);
|
|
|
|
- clif_updatestatus(sd,SP_NEXTJOBEXP);
|
|
|
|
- clif_updatestatus(sd,SP_SKILLPOINT);
|
|
|
|
-
|
|
|
|
- clif_updatestatus(sd,SP_USTR); // Updates needed stat points - Valaris
|
|
|
|
- clif_updatestatus(sd,SP_UAGI);
|
|
|
|
- clif_updatestatus(sd,SP_UVIT);
|
|
|
|
- clif_updatestatus(sd,SP_UINT);
|
|
|
|
- clif_updatestatus(sd,SP_UDEX);
|
|
|
|
- clif_updatestatus(sd,SP_ULUK); // End Addition
|
|
|
|
- clif_updatestatus(sd,SP_UPOW);
|
|
|
|
- clif_updatestatus(sd,SP_USTA);
|
|
|
|
- clif_updatestatus(sd,SP_UWIS);
|
|
|
|
- clif_updatestatus(sd,SP_USPL);
|
|
|
|
- clif_updatestatus(sd,SP_UCON);
|
|
|
|
- clif_updatestatus(sd,SP_UCRT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_TRAITPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_STR);
|
|
|
|
+ clif_updatestatus(*sd,SP_AGI);
|
|
|
|
+ clif_updatestatus(*sd,SP_VIT);
|
|
|
|
+ clif_updatestatus(*sd,SP_INT);
|
|
|
|
+ clif_updatestatus(*sd,SP_DEX);
|
|
|
|
+ clif_updatestatus(*sd,SP_LUK);
|
|
|
|
+ clif_updatestatus(*sd,SP_POW);
|
|
|
|
+ clif_updatestatus(*sd,SP_STA);
|
|
|
|
+ clif_updatestatus(*sd,SP_WIS);
|
|
|
|
+ clif_updatestatus(*sd,SP_SPL);
|
|
|
|
+ clif_updatestatus(*sd,SP_CON);
|
|
|
|
+ clif_updatestatus(*sd,SP_CRT);
|
|
|
|
+ clif_updatestatus(*sd,SP_BASELEVEL);
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBLEVEL);
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_BASEEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_NEXTBASEEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_NEXTJOBEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_SKILLPOINT);
|
|
|
|
+
|
|
|
|
+ clif_updatestatus(*sd,SP_USTR); // Updates needed stat points - Valaris
|
|
|
|
+ clif_updatestatus(*sd,SP_UAGI);
|
|
|
|
+ clif_updatestatus(*sd,SP_UVIT);
|
|
|
|
+ clif_updatestatus(*sd,SP_UINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_UDEX);
|
|
|
|
+ clif_updatestatus(*sd,SP_ULUK); // End Addition
|
|
|
|
+ clif_updatestatus(*sd,SP_UPOW);
|
|
|
|
+ clif_updatestatus(*sd,SP_USTA);
|
|
|
|
+ clif_updatestatus(*sd,SP_UWIS);
|
|
|
|
+ clif_updatestatus(*sd,SP_USPL);
|
|
|
|
+ clif_updatestatus(*sd,SP_UCON);
|
|
|
|
+ clif_updatestatus(*sd,SP_UCRT);
|
|
|
|
|
|
for(i=0;i<EQI_MAX;i++) { // unequip items that can't be equipped by base 1 [Valaris]
|
|
for(i=0;i<EQI_MAX;i++) { // unequip items that can't be equipped by base 1 [Valaris]
|
|
if(sd->equip_index[i] >= 0)
|
|
if(sd->equip_index[i] >= 0)
|
|
@@ -9179,7 +9180,7 @@ int pc_resetstate(map_session_data* sd)
|
|
ShowError( "pc_resetstate: Capping the Level to %d to reset the stats of %d:%d, the base level (%d) is greater than the max level supported.\n",
|
|
ShowError( "pc_resetstate: Capping the Level to %d to reset the stats of %d:%d, the base level (%d) is greater than the max level supported.\n",
|
|
pc_maxbaselv( sd ), sd->status.account_id, sd->status.char_id, sd->status.base_level );
|
|
pc_maxbaselv( sd ), sd->status.account_id, sd->status.char_id, sd->status.base_level );
|
|
sd->status.base_level = pc_maxbaselv( sd );
|
|
sd->status.base_level = pc_maxbaselv( sd );
|
|
- clif_updatestatus( sd, SP_BASELEVEL );
|
|
|
|
|
|
+ clif_updatestatus( *sd, SP_BASELEVEL );
|
|
}
|
|
}
|
|
|
|
|
|
sd->status.status_point = statpoint_db.get_table_point( sd->status.base_level );
|
|
sd->status.status_point = statpoint_db.get_table_point( sd->status.base_level );
|
|
@@ -9206,34 +9207,34 @@ int pc_resetstate(map_session_data* sd)
|
|
pc_setstat(sd, SP_CON, 0);
|
|
pc_setstat(sd, SP_CON, 0);
|
|
pc_setstat(sd, SP_CRT, 0);
|
|
pc_setstat(sd, SP_CRT, 0);
|
|
|
|
|
|
- clif_updatestatus(sd,SP_STR);
|
|
|
|
- clif_updatestatus(sd,SP_AGI);
|
|
|
|
- clif_updatestatus(sd,SP_VIT);
|
|
|
|
- clif_updatestatus(sd,SP_INT);
|
|
|
|
- clif_updatestatus(sd,SP_DEX);
|
|
|
|
- clif_updatestatus(sd,SP_LUK);
|
|
|
|
- clif_updatestatus(sd,SP_POW);
|
|
|
|
- clif_updatestatus(sd,SP_STA);
|
|
|
|
- clif_updatestatus(sd,SP_WIS);
|
|
|
|
- clif_updatestatus(sd,SP_SPL);
|
|
|
|
- clif_updatestatus(sd,SP_CON);
|
|
|
|
- clif_updatestatus(sd,SP_CRT);
|
|
|
|
-
|
|
|
|
- clif_updatestatus(sd,SP_USTR); // Updates needed stat points - Valaris
|
|
|
|
- clif_updatestatus(sd,SP_UAGI);
|
|
|
|
- clif_updatestatus(sd,SP_UVIT);
|
|
|
|
- clif_updatestatus(sd,SP_UINT);
|
|
|
|
- clif_updatestatus(sd,SP_UDEX);
|
|
|
|
- clif_updatestatus(sd,SP_ULUK); // End Addition
|
|
|
|
- clif_updatestatus(sd,SP_UPOW);
|
|
|
|
- clif_updatestatus(sd,SP_USTA);
|
|
|
|
- clif_updatestatus(sd,SP_UWIS);
|
|
|
|
- clif_updatestatus(sd,SP_USPL);
|
|
|
|
- clif_updatestatus(sd,SP_UCON);
|
|
|
|
- clif_updatestatus(sd,SP_UCRT);
|
|
|
|
-
|
|
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_TRAITPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_STR);
|
|
|
|
+ clif_updatestatus(*sd,SP_AGI);
|
|
|
|
+ clif_updatestatus(*sd,SP_VIT);
|
|
|
|
+ clif_updatestatus(*sd,SP_INT);
|
|
|
|
+ clif_updatestatus(*sd,SP_DEX);
|
|
|
|
+ clif_updatestatus(*sd,SP_LUK);
|
|
|
|
+ clif_updatestatus(*sd,SP_POW);
|
|
|
|
+ clif_updatestatus(*sd,SP_STA);
|
|
|
|
+ clif_updatestatus(*sd,SP_WIS);
|
|
|
|
+ clif_updatestatus(*sd,SP_SPL);
|
|
|
|
+ clif_updatestatus(*sd,SP_CON);
|
|
|
|
+ clif_updatestatus(*sd,SP_CRT);
|
|
|
|
+
|
|
|
|
+ clif_updatestatus(*sd,SP_USTR); // Updates needed stat points - Valaris
|
|
|
|
+ clif_updatestatus(*sd,SP_UAGI);
|
|
|
|
+ clif_updatestatus(*sd,SP_UVIT);
|
|
|
|
+ clif_updatestatus(*sd,SP_UINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_UDEX);
|
|
|
|
+ clif_updatestatus(*sd,SP_ULUK); // End Addition
|
|
|
|
+ clif_updatestatus(*sd,SP_UPOW);
|
|
|
|
+ clif_updatestatus(*sd,SP_USTA);
|
|
|
|
+ clif_updatestatus(*sd,SP_UWIS);
|
|
|
|
+ clif_updatestatus(*sd,SP_USPL);
|
|
|
|
+ clif_updatestatus(*sd,SP_UCON);
|
|
|
|
+ clif_updatestatus(*sd,SP_UCRT);
|
|
|
|
+
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_TRAITPOINT);
|
|
|
|
|
|
if( sd->mission_mobid ) { //bugreport:2200
|
|
if( sd->mission_mobid ) { //bugreport:2200
|
|
sd->mission_mobid = 0;
|
|
sd->mission_mobid = 0;
|
|
@@ -9356,7 +9357,7 @@ int pc_resetskill(map_session_data* sd, int flag)
|
|
sd->status.skill_point += skill_point;
|
|
sd->status.skill_point += skill_point;
|
|
|
|
|
|
if (flag&1) {
|
|
if (flag&1) {
|
|
- clif_updatestatus(sd,SP_SKILLPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_SKILLPOINT);
|
|
clif_skillinfoblock(sd);
|
|
clif_skillinfoblock(sd);
|
|
status_calc_pc(sd, SCO_FORCE);
|
|
status_calc_pc(sd, SCO_FORCE);
|
|
}
|
|
}
|
|
@@ -9508,9 +9509,9 @@ static TIMER_FUNC(pc_respawn_timer){
|
|
*------------------------------------------*/
|
|
*------------------------------------------*/
|
|
void pc_damage(map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp, unsigned int ap)
|
|
void pc_damage(map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp, unsigned int ap)
|
|
{
|
|
{
|
|
- if (ap) clif_updatestatus(sd,SP_AP);
|
|
|
|
- if (sp) clif_updatestatus(sd,SP_SP);
|
|
|
|
- if (hp) clif_updatestatus(sd,SP_HP);
|
|
|
|
|
|
+ if (ap) clif_updatestatus(*sd,SP_AP);
|
|
|
|
+ if (sp) clif_updatestatus(*sd,SP_SP);
|
|
|
|
+ if (hp) clif_updatestatus(*sd,SP_HP);
|
|
else return;
|
|
else return;
|
|
|
|
|
|
if (!src)
|
|
if (!src)
|
|
@@ -9552,7 +9553,7 @@ void pc_close_npc(map_session_data *sd,int flag)
|
|
|
|
|
|
if (sd->npc_id || sd->npc_shopid) {
|
|
if (sd->npc_id || sd->npc_shopid) {
|
|
if (sd->state.using_fake_npc) {
|
|
if (sd->state.using_fake_npc) {
|
|
- clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
|
|
|
|
|
|
+ clif_clearunit_single( sd->npc_id, CLR_OUTSIGHT, *sd );
|
|
sd->state.using_fake_npc = 0;
|
|
sd->state.using_fake_npc = 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -9575,7 +9576,7 @@ void pc_close_npc(map_session_data *sd,int flag)
|
|
#endif
|
|
#endif
|
|
if (sd->st) {
|
|
if (sd->st) {
|
|
if (sd->st->state == CLOSE) {
|
|
if (sd->st->state == CLOSE) {
|
|
- clif_scriptclose(sd, sd->npc_id);
|
|
|
|
|
|
+ clif_scriptclose( *sd, sd->npc_id );
|
|
clif_scriptclear( *sd, sd->npc_id ); // [Ind/Hercules]
|
|
clif_scriptclear( *sd, sd->npc_id ); // [Ind/Hercules]
|
|
sd->st->state = END; // Force to end now
|
|
sd->st->state = END; // Force to end now
|
|
}
|
|
}
|
|
@@ -9959,9 +9960,9 @@ int pc_dead(map_session_data *sd,struct block_list *src)
|
|
}
|
|
}
|
|
|
|
|
|
void pc_revive(map_session_data *sd,unsigned int hp, unsigned int sp, unsigned int ap) {
|
|
void pc_revive(map_session_data *sd,unsigned int hp, unsigned int sp, unsigned int ap) {
|
|
- if(hp) clif_updatestatus(sd,SP_HP);
|
|
|
|
- if(sp) clif_updatestatus(sd,SP_SP);
|
|
|
|
- if(ap) clif_updatestatus(sd,SP_AP);
|
|
|
|
|
|
+ if(hp) clif_updatestatus(*sd,SP_HP);
|
|
|
|
+ if(sp) clif_updatestatus(*sd,SP_SP);
|
|
|
|
+ if(ap) clif_updatestatus(*sd,SP_AP);
|
|
|
|
|
|
pc_setstand(sd, true);
|
|
pc_setstand(sd, true);
|
|
if(battle_config.pc_invincible_time > 0)
|
|
if(battle_config.pc_invincible_time > 0)
|
|
@@ -10230,11 +10231,11 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
|
}
|
|
}
|
|
sd->status.base_level = val;
|
|
sd->status.base_level = val;
|
|
sd->status.base_exp = 0;
|
|
sd->status.base_exp = 0;
|
|
- // clif_updatestatus(sd, SP_BASELEVEL); // Gets updated at the bottom
|
|
|
|
- clif_updatestatus(sd, SP_NEXTBASEEXP);
|
|
|
|
- clif_updatestatus(sd, SP_STATUSPOINT);
|
|
|
|
- clif_updatestatus(sd, SP_TRAITPOINT);
|
|
|
|
- clif_updatestatus(sd, SP_BASEEXP);
|
|
|
|
|
|
+ // clif_updatestatus(*sd, SP_BASELEVEL); // Gets updated at the bottom
|
|
|
|
+ clif_updatestatus(*sd, SP_NEXTBASEEXP);
|
|
|
|
+ clif_updatestatus(*sd, SP_STATUSPOINT);
|
|
|
|
+ clif_updatestatus(*sd, SP_TRAITPOINT);
|
|
|
|
+ clif_updatestatus(*sd, SP_BASEEXP);
|
|
status_calc_pc(sd, SCO_FORCE);
|
|
status_calc_pc(sd, SCO_FORCE);
|
|
if(sd->status.party_id)
|
|
if(sd->status.party_id)
|
|
party_send_levelup(sd);
|
|
party_send_levelup(sd);
|
|
@@ -10243,13 +10244,13 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
|
if (val >= sd->status.job_level) {
|
|
if (val >= sd->status.job_level) {
|
|
if (val > pc_maxjoblv(sd)) val = pc_maxjoblv(sd);
|
|
if (val > pc_maxjoblv(sd)) val = pc_maxjoblv(sd);
|
|
sd->status.skill_point += val - sd->status.job_level;
|
|
sd->status.skill_point += val - sd->status.job_level;
|
|
- clif_updatestatus(sd, SP_SKILLPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_SKILLPOINT);
|
|
}
|
|
}
|
|
sd->status.job_level = val;
|
|
sd->status.job_level = val;
|
|
sd->status.job_exp = 0;
|
|
sd->status.job_exp = 0;
|
|
- // clif_updatestatus(sd, SP_JOBLEVEL); // Gets updated at the bottom
|
|
|
|
- clif_updatestatus(sd, SP_NEXTJOBEXP);
|
|
|
|
- clif_updatestatus(sd, SP_JOBEXP);
|
|
|
|
|
|
+ // clif_updatestatus(*sd, SP_JOBLEVEL); // Gets updated at the bottom
|
|
|
|
+ clif_updatestatus(*sd, SP_NEXTJOBEXP);
|
|
|
|
+ clif_updatestatus(*sd, SP_JOBEXP);
|
|
status_calc_pc(sd, SCO_FORCE);
|
|
status_calc_pc(sd, SCO_FORCE);
|
|
break;
|
|
break;
|
|
case SP_SKILLPOINT:
|
|
case SP_SKILLPOINT:
|
|
@@ -10304,7 +10305,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
|
if( sd->battle_status.max_hp < sd->battle_status.hp )
|
|
if( sd->battle_status.max_hp < sd->battle_status.hp )
|
|
{
|
|
{
|
|
sd->battle_status.hp = sd->battle_status.max_hp;
|
|
sd->battle_status.hp = sd->battle_status.max_hp;
|
|
- clif_updatestatus(sd, SP_HP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_HP);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SP_SP:
|
|
case SP_SP:
|
|
@@ -10316,7 +10317,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
|
if( sd->battle_status.max_sp < sd->battle_status.sp )
|
|
if( sd->battle_status.max_sp < sd->battle_status.sp )
|
|
{
|
|
{
|
|
sd->battle_status.sp = sd->battle_status.max_sp;
|
|
sd->battle_status.sp = sd->battle_status.max_sp;
|
|
- clif_updatestatus(sd, SP_SP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_SP);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SP_AP:
|
|
case SP_AP:
|
|
@@ -10327,7 +10328,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
|
|
|
|
|
if (sd->battle_status.max_ap < sd->battle_status.ap) {
|
|
if (sd->battle_status.max_ap < sd->battle_status.ap) {
|
|
sd->battle_status.ap = sd->battle_status.max_ap;
|
|
sd->battle_status.ap = sd->battle_status.max_ap;
|
|
- clif_updatestatus(sd, SP_AP);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_AP);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case SP_STR:
|
|
case SP_STR:
|
|
@@ -10456,7 +10457,7 @@ bool pc_setparam(map_session_data *sd,int64 type,int64 val_tmp)
|
|
ShowError("pc_setparam: Attempted to set unknown parameter '%lld'.\n", type);
|
|
ShowError("pc_setparam: Attempted to set unknown parameter '%lld'.\n", type);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- clif_updatestatus(sd,static_cast<int>(type));
|
|
|
|
|
|
+ clif_updatestatus(*sd,static_cast<_sp>(type));
|
|
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -10479,11 +10480,11 @@ void pc_heal(map_session_data *sd,unsigned int hp,unsigned int sp, unsigned int
|
|
clif_heal(sd->fd,SP_AP,ap);
|
|
clif_heal(sd->fd,SP_AP,ap);
|
|
} else {
|
|
} else {
|
|
if(hp)
|
|
if(hp)
|
|
- clif_updatestatus(sd,SP_HP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_HP);
|
|
if(sp)
|
|
if(sp)
|
|
- clif_updatestatus(sd,SP_SP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_SP);
|
|
if (ap)
|
|
if (ap)
|
|
- clif_updatestatus(sd,SP_AP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_AP);
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -10739,56 +10740,56 @@ bool pc_jobchange(map_session_data *sd,int job, char upper)
|
|
sd->status.base_level = pc_maxbaselv(sd);
|
|
sd->status.base_level = pc_maxbaselv(sd);
|
|
sd->status.base_exp=0;
|
|
sd->status.base_exp=0;
|
|
pc_resetstate(sd);
|
|
pc_resetstate(sd);
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_TRAITPOINT);
|
|
|
|
- clif_updatestatus(sd,SP_BASELEVEL);
|
|
|
|
- clif_updatestatus(sd,SP_BASEEXP);
|
|
|
|
- clif_updatestatus(sd,SP_NEXTBASEEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_TRAITPOINT);
|
|
|
|
+ clif_updatestatus(*sd,SP_BASELEVEL);
|
|
|
|
+ clif_updatestatus(*sd,SP_BASEEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_NEXTBASEEXP);
|
|
}
|
|
}
|
|
|
|
|
|
// Give or reduce transcendent status points
|
|
// Give or reduce transcendent status points
|
|
if( (b_class&JOBL_UPPER) && !(previous_class&JOBL_UPPER) ){ // Change from a non t class to a t class -> give points
|
|
if( (b_class&JOBL_UPPER) && !(previous_class&JOBL_UPPER) ){ // Change from a non t class to a t class -> give points
|
|
sd->status.status_point += battle_config.transcendent_status_points;
|
|
sd->status.status_point += battle_config.transcendent_status_points;
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
}else if( !(b_class&JOBL_UPPER) && (previous_class&JOBL_UPPER) ){ // Change from a t class to a non t class -> remove points
|
|
}else if( !(b_class&JOBL_UPPER) && (previous_class&JOBL_UPPER) ){ // Change from a t class to a non t class -> remove points
|
|
if( sd->status.status_point < battle_config.transcendent_status_points ){
|
|
if( sd->status.status_point < battle_config.transcendent_status_points ){
|
|
// The player already used his bonus points, so we have to reset his status points
|
|
// The player already used his bonus points, so we have to reset his status points
|
|
pc_resetstate(sd);
|
|
pc_resetstate(sd);
|
|
}else{
|
|
}else{
|
|
sd->status.status_point -= battle_config.transcendent_status_points;
|
|
sd->status.status_point -= battle_config.transcendent_status_points;
|
|
- clif_updatestatus(sd,SP_STATUSPOINT);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_STATUSPOINT);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Give or reduce trait status points
|
|
// Give or reduce trait status points
|
|
if ((b_class & JOBL_FOURTH) && !(previous_class & JOBL_FOURTH)) {// Change to a 4th job.
|
|
if ((b_class & JOBL_FOURTH) && !(previous_class & JOBL_FOURTH)) {// Change to a 4th job.
|
|
sd->status.trait_point += battle_config.trait_points_job_change;
|
|
sd->status.trait_point += battle_config.trait_points_job_change;
|
|
- clif_updatestatus(sd, SP_TRAITPOINT);
|
|
|
|
- clif_updatestatus(sd, SP_UPOW);
|
|
|
|
- clif_updatestatus(sd, SP_USTA);
|
|
|
|
- clif_updatestatus(sd, SP_UWIS);
|
|
|
|
- clif_updatestatus(sd, SP_USPL);
|
|
|
|
- clif_updatestatus(sd, SP_UCON);
|
|
|
|
- clif_updatestatus(sd, SP_UCRT);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_TRAITPOINT);
|
|
|
|
+ clif_updatestatus(*sd, SP_UPOW);
|
|
|
|
+ clif_updatestatus(*sd, SP_USTA);
|
|
|
|
+ clif_updatestatus(*sd, SP_UWIS);
|
|
|
|
+ clif_updatestatus(*sd, SP_USPL);
|
|
|
|
+ clif_updatestatus(*sd, SP_UCON);
|
|
|
|
+ clif_updatestatus(*sd, SP_UCRT);
|
|
} else if (!(b_class & JOBL_FOURTH) && (previous_class & JOBL_FOURTH)) {// Change to a non 4th job.
|
|
} else if (!(b_class & JOBL_FOURTH) && (previous_class & JOBL_FOURTH)) {// Change to a non 4th job.
|
|
if (sd->status.trait_point < battle_config.trait_points_job_change) {
|
|
if (sd->status.trait_point < battle_config.trait_points_job_change) {
|
|
// Player may have already used the trait status points. Force a reset.
|
|
// Player may have already used the trait status points. Force a reset.
|
|
pc_resetstate(sd);
|
|
pc_resetstate(sd);
|
|
} else {
|
|
} else {
|
|
sd->status.trait_point = 0;
|
|
sd->status.trait_point = 0;
|
|
- clif_updatestatus(sd, SP_TRAITPOINT);
|
|
|
|
- clif_updatestatus(sd, SP_UPOW);
|
|
|
|
- clif_updatestatus(sd, SP_USTA);
|
|
|
|
- clif_updatestatus(sd, SP_UWIS);
|
|
|
|
- clif_updatestatus(sd, SP_USPL);
|
|
|
|
- clif_updatestatus(sd, SP_UCON);
|
|
|
|
- clif_updatestatus(sd, SP_UCRT);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_TRAITPOINT);
|
|
|
|
+ clif_updatestatus(*sd, SP_UPOW);
|
|
|
|
+ clif_updatestatus(*sd, SP_USTA);
|
|
|
|
+ clif_updatestatus(*sd, SP_UWIS);
|
|
|
|
+ clif_updatestatus(*sd, SP_USPL);
|
|
|
|
+ clif_updatestatus(*sd, SP_UCON);
|
|
|
|
+ clif_updatestatus(*sd, SP_UCRT);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- clif_updatestatus(sd,SP_JOBLEVEL);
|
|
|
|
- clif_updatestatus(sd,SP_JOBEXP);
|
|
|
|
- clif_updatestatus(sd,SP_NEXTJOBEXP);
|
|
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBLEVEL);
|
|
|
|
+ clif_updatestatus(*sd,SP_JOBEXP);
|
|
|
|
+ clif_updatestatus(*sd,SP_NEXTJOBEXP);
|
|
|
|
|
|
for(i=0;i<EQI_MAX;i++) {
|
|
for(i=0;i<EQI_MAX;i++) {
|
|
if(sd->equip_index[i] >= 0)
|
|
if(sd->equip_index[i] >= 0)
|
|
@@ -11007,7 +11008,7 @@ void pc_setoption(map_session_data *sd,int type, int subtype)
|
|
#ifndef NEW_CARTS
|
|
#ifndef NEW_CARTS
|
|
if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On
|
|
if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On
|
|
clif_cartlist(sd);
|
|
clif_cartlist(sd);
|
|
- clif_updatestatus(sd, SP_CARTINFO);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_CARTINFO);
|
|
if(pc_checkskill(sd, MC_PUSHCART) < 10)
|
|
if(pc_checkskill(sd, MC_PUSHCART) < 10)
|
|
status_calc_pc(sd,SCO_NONE); //Apply speed penalty.
|
|
status_calc_pc(sd,SCO_NONE); //Apply speed penalty.
|
|
} else if( !( type&OPTION_CART ) && p_type&OPTION_CART ){ //Cart Off
|
|
} else if( !( type&OPTION_CART ) && p_type&OPTION_CART ){ //Cart Off
|
|
@@ -11090,7 +11091,7 @@ bool pc_setcart(map_session_data *sd,int type) {
|
|
clif_cartlist(sd);
|
|
clif_cartlist(sd);
|
|
status_calc_cart_weight(sd, (e_status_calc_weight_opt)(CALCWT_ITEM|CALCWT_MAXBONUS|CALCWT_CARTSTATE));
|
|
status_calc_cart_weight(sd, (e_status_calc_weight_opt)(CALCWT_ITEM|CALCWT_MAXBONUS|CALCWT_CARTSTATE));
|
|
}
|
|
}
|
|
- clif_updatestatus(sd, SP_CARTINFO);
|
|
|
|
|
|
+ clif_updatestatus(*sd, SP_CARTINFO);
|
|
sc_start(&sd->bl, &sd->bl, SC_PUSH_CART, 100, type, 0);
|
|
sc_start(&sd->bl, &sd->bl, SC_PUSH_CART, 100, type, 0);
|
|
break;
|
|
break;
|
|
}
|
|
}
|