summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c842
1 files changed, 421 insertions, 421 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b5d5e3140..2b00dc78b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -424,7 +424,7 @@ static int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t
return 0;
}
- iPc->inventory_rentals(sd);
+ pc->inventory_rentals(sd);
return 1;
}
@@ -457,7 +457,7 @@ void pc_inventory_rentals(struct map_session_data *sd)
status_change_end(&sd->bl,SC_ALL_RIDING,INVALID_TIMER);
}
clif->rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
- iPc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
+ pc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
} else {
expire_tick = (unsigned int)(sd->status.inventory[i].expire_time - time(NULL)) * 1000;
clif->rental_time(sd->fd, sd->status.inventory[i].nameid, (int)(expire_tick / 1000));
@@ -485,7 +485,7 @@ void pc_inventory_rental_add(struct map_session_data *sd, int seconds)
td = iTimer->get_timer(sd->rental_timer);
if( DIFF_TICK(td->tick, iTimer->gettick()) > tick )
{ // Update Timer as this one ends first than the current one
- iPc->inventory_rental_clear(sd);
+ pc->inventory_rental_clear(sd);
sd->rental_timer = iTimer->add_timer(iTimer->gettick() + tick, pc_inventory_rental_end, sd->bl.id, 0);
}
}
@@ -520,7 +520,7 @@ int pc_makesavestatus(struct map_session_data *sd)
#endif
if (sd->sc.data[SC_JAILED]) { //When Jailed, do not move last point.
if(pc_isdead(sd)){
- iPc->setrestartvalue(sd,0);
+ pc->setrestartvalue(sd,0);
} else {
sd->status.hp = sd->battle_status.hp;
sd->status.sp = sd->battle_status.sp;
@@ -532,7 +532,7 @@ int pc_makesavestatus(struct map_session_data *sd)
}
if(pc_isdead(sd)){
- iPc->setrestartvalue(sd,0);
+ pc->setrestartvalue(sd,0);
memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
} else {
sd->status.hp = sd->battle_status.hp;
@@ -603,7 +603,7 @@ int pc_equippoint(struct map_session_data *sd,int n)
if(sd->inventory_data[n]->look == W_DAGGER ||
sd->inventory_data[n]->look == W_1HSWORD ||
sd->inventory_data[n]->look == W_1HAXE) {
- if(ep == EQP_HAND_R && (iPc->checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN ||
+ if(ep == EQP_HAND_R && (pc->checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN ||
(sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech]
return EQP_ARMS;
}
@@ -768,10 +768,10 @@ bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd
return false; // Both parents need to be in the same party
// Parents need to have their ring equipped
- if( !iPc->isequipped(p1_sd, WEDDING_RING_M) && !iPc->isequipped(p1_sd, WEDDING_RING_F) )
+ if( !pc->isequipped(p1_sd, WEDDING_RING_M) && !pc->isequipped(p1_sd, WEDDING_RING_F) )
return false;
- if( !iPc->isequipped(p2_sd, WEDDING_RING_M) && !iPc->isequipped(p2_sd, WEDDING_RING_F) )
+ if( !pc->isequipped(p2_sd, WEDDING_RING_M) && !pc->isequipped(p2_sd, WEDDING_RING_F) )
return false;
// Already adopted a baby
@@ -805,15 +805,15 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd,
int job, joblevel;
unsigned int jobexp;
- if( !iPc->can_Adopt(p1_sd, p2_sd, b_sd) )
+ if( !pc->can_Adopt(p1_sd, p2_sd, b_sd) )
return false;
// Preserve current job levels and progress
joblevel = b_sd->status.job_level;
jobexp = b_sd->status.job_exp;
- job = iPc->mapid2jobid(b_sd->class_|JOBL_BABY, b_sd->status.sex);
- if( job != -1 && !iPc->jobchange(b_sd, job, 0) )
+ job = pc->mapid2jobid(b_sd->class_|JOBL_BABY, b_sd->status.sex);
+ if( job != -1 && !pc->jobchange(b_sd, job, 0) )
{ // Success, proceed to configure parents and baby skills
p1_sd->status.child = b_sd->status.char_id;
p2_sd->status.child = b_sd->status.char_id;
@@ -827,12 +827,12 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd,
clif->updatestatus(b_sd, SP_JOBEXP);
// Baby Skills
- iPc->skill(b_sd, WE_BABY, 1, 0);
- iPc->skill(b_sd, WE_CALLPARENT, 1, 0);
+ pc->skill(b_sd, WE_BABY, 1, 0);
+ pc->skill(b_sd, WE_CALLPARENT, 1, 0);
// Parents Skills
- iPc->skill(p1_sd, WE_CALLBABY, 1, 0);
- iPc->skill(p2_sd, WE_CALLBABY, 1, 0);
+ pc->skill(p1_sd, WE_CALLBABY, 1, 0);
+ pc->skill(p2_sd, WE_CALLBABY, 1, 0);
return true;
}
@@ -935,7 +935,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
}
//Set the map-server used job id. [Skotlex]
- i = iPc->jobid2mapid(sd->status.class_);
+ i = pc->jobid2mapid(sd->status.class_);
if (i == -1) { //Invalid class?
ShowError("pc_authok: Invalid class %d for player %s (%d:%d). Class was changed to novice.\n", sd->status.class_, sd->status.name, sd->status.account_id, sd->status.char_id);
sd->status.class_ = JOB_NOVICE;
@@ -1005,10 +1005,10 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
if (!(battle_config.display_skill_fail&2))
sd->state.showdelay = 1;
- iPc->setinventorydata(sd);
+ pc->setinventorydata(sd);
pc_setequipindex(sd);
- if( sd->status.option & OPTION_INVISIBLE && !iPc->can_use_command(sd, "@hide") )
+ if( sd->status.option & OPTION_INVISIBLE && !pc->can_use_command(sd, "@hide") )
sd->status.option &=~ OPTION_INVISIBLE;
status_change_init(&sd->bl);
@@ -1047,11 +1047,11 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->hate_mob[i] = -1;
//warp player
- if ((i=iPc->setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, CLR_OUTSIGHT)) != 0) {
+ if ((i=pc->setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, CLR_OUTSIGHT)) != 0) {
ShowError ("Last_point_map %s - id %d not found (error code %d)\n", mapindex_id2name(sd->status.last_point.map), sd->status.last_point.map, i);
// try warping to a default map instead (church graveyard)
- if (iPc->setpos(sd, mapindex_name2id(MAP_PRONTERA), 273, 354, CLR_OUTSIGHT) != 0) {
+ if (pc->setpos(sd, mapindex_name2id(MAP_PRONTERA), 273, 354, CLR_OUTSIGHT) != 0) {
// if we fail again
clif->authfail_fd(sd->fd, 0);
return false;
@@ -1109,7 +1109,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
/**
* Check if player have any item cooldowns on
**/
- iPc->itemcd_do(sd,true);
+ pc->itemcd_do(sd,true);
/* [Ind/Hercules] */
sd->sc_display = NULL;
@@ -1191,7 +1191,7 @@ int pc_reg_received(struct map_session_data *sd)
sd->hate_mob[i] = pc_readglobalreg(sd,sg_info[i].hate_var)-1;
}
- if ((i = iPc->checkskill(sd,RG_PLAGIARISM)) > 0) {
+ if ((i = pc->checkskill(sd,RG_PLAGIARISM)) > 0) {
sd->cloneskill_id = pc_readglobalreg(sd,"CLONE_SKILL");
if (sd->cloneskill_id > 0 && (idx = skill->get_index(sd->cloneskill_id))) {
sd->status.skill[idx].id = sd->cloneskill_id;
@@ -1201,7 +1201,7 @@ int pc_reg_received(struct map_session_data *sd)
sd->status.skill[idx].flag = SKILL_FLAG_PLAGIARIZED;
}
}
- if ((i = iPc->checkskill(sd,SC_REPRODUCE)) > 0) {
+ if ((i = pc->checkskill(sd,SC_REPRODUCE)) > 0) {
sd->reproduceskill_id = pc_readglobalreg(sd,"REPRODUCE_SKILL");
if( sd->reproduceskill_id > 0 && (idx = skill->get_index(sd->reproduceskill_id))) {
sd->status.skill[idx].id = sd->reproduceskill_id;
@@ -1238,7 +1238,7 @@ int pc_reg_received(struct map_session_data *sd)
if (!chrif_auth_finished(sd))
ShowError("pc_reg_received: Failed to properly remove player %d:%d from logging db!\n", sd->status.account_id, sd->status.char_id);
- iPc->load_combo(sd);
+ pc->load_combo(sd);
status_calc_pc(sd,1);
chrif_scdata_request(sd->status.account_id, sd->status.char_id);
@@ -1251,7 +1251,7 @@ int pc_reg_received(struct map_session_data *sd)
clif->pLoadEndAck(sd->fd, sd);
}
- iPc->inventory_rentals(sd);
+ pc->inventory_rentals(sd);
if( sd->sc.option & OPTION_INVISIBLE ) {
sd->vd.class_ = INVISIBLE_CLASS;
@@ -1260,7 +1260,7 @@ int pc_reg_received(struct map_session_data *sd)
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
- iTimer->delete_timer( sd->pvp_timer, iPc->calc_pvprank_timer );
+ iTimer->delete_timer( sd->pvp_timer, pc->calc_pvprank_timer );
sd->pvp_timer = INVALID_TIMER;
}
clif->changeoption(&sd->bl);
@@ -1279,7 +1279,7 @@ static int pc_calc_skillpoint(struct map_session_data* sd)
nullpo_ret(sd);
for(i=1;i<MAX_SKILL;i++){
- if( (skill_lv = iPc->checkskill2(sd,i)) > 0) {
+ if( (skill_lv = pc->checkskill2(sd,i)) > 0) {
inf2 = skill_db[i].inf2;
if((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
!(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL)) //Do not count wedding/link skills. [Skotlex]
@@ -1305,14 +1305,14 @@ int pc_calc_skilltree(struct map_session_data *sd)
int c=0;
nullpo_ret(sd);
- i = iPc->calc_skilltree_normalize_job(sd);
- c = iPc->mapid2jobid(i, sd->status.sex);
+ i = pc->calc_skilltree_normalize_job(sd);
+ c = pc->mapid2jobid(i, sd->status.sex);
if( c == -1 )
{ //Unable to normalize job??
ShowError("pc_calc_skilltree: Unable to normalize job %d for character %s (%d:%d)\n", i, sd->status.name, sd->status.account_id, sd->status.char_id);
return 1;
}
- c = iPc->class2idx(c);
+ c = pc->class2idx(c);
for( i = 0; i < MAX_SKILL; i++ ) {
if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED ) //Don't touch these
@@ -1410,7 +1410,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
else if (sd->status.skill[idx2].flag >= SKILL_FLAG_REPLACED_LV_0) //Real lerned level
k = sd->status.skill[idx2].flag - SKILL_FLAG_REPLACED_LV_0;
else
- k = iPc->checkskill2(sd,idx2);
+ k = pc->checkskill2(sd,idx2);
if (k < skill_tree[c][i].need[j].lv) {
f = 0;
break;
@@ -1443,7 +1443,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
} while(flag);
//
- if( c > 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && sd->status.skill_point == 0 && iPc->famerank(sd->status.char_id, MAPID_TAEKWON) )
+ if( c > 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && sd->status.skill_point == 0 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) )
{
/* Taekwon Ranger Bonus Skill Tree
============================================
@@ -1479,13 +1479,13 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill_id)
if(battle_config.skillfree)
return; //Function serves no purpose if this is set
- i = iPc->calc_skilltree_normalize_job(sd);
- c = iPc->mapid2jobid(i, sd->status.sex);
+ i = pc->calc_skilltree_normalize_job(sd);
+ c = pc->mapid2jobid(i, sd->status.sex);
if (c == -1) { //Unable to normalize job??
ShowError("pc_check_skilltree: Unable to normalize job %d for character %s (%d:%d)\n", i, sd->status.name, sd->status.account_id, sd->status.char_id);
return;
}
- c = iPc->class2idx(c);
+ c = pc->class2idx(c);
do {
flag = 0;
for( i = 0; i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0; i++ ) {
@@ -1502,7 +1502,7 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill_id)
else if( sd->status.skill[idx2].flag >= SKILL_FLAG_REPLACED_LV_0) //Real lerned level
k = sd->status.skill[idx2].flag - SKILL_FLAG_REPLACED_LV_0;
else
- k = iPc->checkskill2(sd,idx2);
+ k = pc->checkskill2(sd,idx2);
if( k < skill_tree[c][i].need[j].lv ) {
f = 0;
break;
@@ -1557,7 +1557,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
skill_point = pc_calc_skillpoint(sd);
- novice_skills = max_level[iPc->class2idx(JOB_NOVICE)][1] - 1;
+ novice_skills = max_level[pc->class2idx(JOB_NOVICE)][1] - 1;
// limit 1st class and above to novice job levels
if(skill_point < novice_skills)
@@ -1574,7 +1574,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
{
// if neither 2nd nor 3rd jobchange levels are known, we have to assume a default for 2nd
if (!sd->change_level_3rd)
- sd->change_level_2nd = max_level[iPc->class2idx(iPc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex))][1];
+ sd->change_level_2nd = max_level[pc->class2idx(pc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex))][1];
else
sd->change_level_2nd = 1 + skill_point + sd->status.skill_point
- (sd->status.job_level - 1)
@@ -1913,7 +1913,7 @@ int pc_delautobonus(struct map_session_data* sd, struct s_autobonus *autobonus,c
}
else
{ // Logout / Unequipped an item with an activated bonus
- iTimer->delete_timer(autobonus[i].active,iPc->endautobonus);
+ iTimer->delete_timer(autobonus[i].active,pc->endautobonus);
autobonus[i].active = INVALID_TIMER;
}
}
@@ -1941,7 +1941,7 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
script_run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]);
}
- autobonus->active = iTimer->add_timer(iTimer->gettick()+autobonus->duration, iPc->endautobonus, sd->bl.id, (intptr_t)autobonus);
+ autobonus->active = iTimer->add_timer(iTimer->gettick()+autobonus->duration, pc->endautobonus, sd->bl.id, (intptr_t)autobonus);
sd->state.autobonus |= autobonus->pos;
status_calc_pc(sd,0);
@@ -3556,7 +3556,7 @@ int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
// remember the card id to insert
nameid = sd->status.inventory[idx_card].nameid;
- if( iPc->delitem(sd,idx_card,1,1,0,LOG_TYPE_OTHER) == 1 )
+ if( pc->delitem(sd,idx_card,1,1,0,LOG_TYPE_OTHER) == 1 )
{// failed
clif->insert_card(sd,idx_equip,idx_card,1);
}
@@ -3581,9 +3581,9 @@ int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
{
int skill,val = orig_value,rate1 = 0,rate2 = 0;
- if((skill=iPc->checkskill(sd,MC_DISCOUNT))>0) // merchant discount
+ if((skill=pc->checkskill(sd,MC_DISCOUNT))>0) // merchant discount
rate1 = 5+skill*2-((skill==10)? 1:0);
- if((skill=iPc->checkskill(sd,RG_COMPULSION))>0) // rogue discount
+ if((skill=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount
rate2 = 5+skill*4;
if(rate1 < rate2) rate1 = rate2;
if(rate1)
@@ -3600,7 +3600,7 @@ int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
{
int skill,val = orig_value,rate = 0;
- if((skill=iPc->checkskill(sd,MC_OVERCHARGE))>0) //OverCharge
+ if((skill=pc->checkskill(sd,MC_OVERCHARGE))>0) //OverCharge
rate = 5+skill*2-((skill==10)? 1:0);
if(rate)
val = (int)((double)orig_value*(double)(100+rate)/100.);
@@ -3889,7 +3889,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
if( i >= MAX_INVENTORY )
{
- i = iPc->search_inventory(sd,0);
+ i = pc->search_inventory(sd,0);
if( i < 0 )
return 4;
@@ -3912,17 +3912,17 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
clif->updatestatus(sd,SP_WEIGHT);
//Auto-equip
if(data->flag.autoequip)
- iPc->equipitem(sd, i, data->equip);
+ pc->equipitem(sd, i, data->equip);
/* rental item check */
if( item_data->expire_time ) {
if( time(NULL) > item_data->expire_time ) {
clif->rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
- iPc->delitem(sd, i, sd->status.inventory[i].amount, 1, 0, LOG_TYPE_OTHER);
+ pc->delitem(sd, i, sd->status.inventory[i].amount, 1, 0, LOG_TYPE_OTHER);
} else {
int seconds = (int)( item_data->expire_time - time(NULL) );
clif->rental_time(sd->fd, sd->status.inventory[i].nameid, seconds);
- iPc->inventory_rental_add(sd, seconds);
+ pc->inventory_rental_add(sd, seconds);
}
}
@@ -3952,7 +3952,7 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reas
sd->weight -= sd->inventory_data[n]->weight*amount ;
if( sd->status.inventory[n].amount <= 0 ){
if(sd->status.inventory[n].equip)
- iPc->unequipitem(sd,n,3);
+ pc->unequipitem(sd,n,3);
memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0]));
sd->inventory_data[n] = NULL;
}
@@ -3984,7 +3984,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
sd->status.inventory[n].amount <= 0 ||
sd->status.inventory[n].amount < amount ||
sd->state.trading || sd->state.vending ||
- !sd->inventory_data[n] //iPc->delitem would fail on this case.
+ !sd->inventory_data[n] //pc->delitem would fail on this case.
)
return 0;
@@ -3994,7 +3994,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
return 0; //Can't drop items in nodrop mapflag maps.
}
- if( !iPc->candrop(sd,&sd->status.inventory[n]) )
+ if( !pc->candrop(sd,&sd->status.inventory[n]) )
{
clif->message (sd->fd, msg_txt(263));
return 0;
@@ -4003,7 +4003,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
if (!iMap->addflooritem(&sd->status.inventory[n], amount, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 2))
return 0;
- iPc->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);
return 1;
}
@@ -4103,7 +4103,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
- if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (iPc->get_group_level(sd) < item->item_usage.override) ) {
+ if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc->get_group_level(sd) < item->item_usage.override) ) {
clif->msgtable(sd->fd,664);
//clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474));
return 0; // You cannot use this item while sitting.
@@ -4268,7 +4268,7 @@ int pc_useitem(struct map_session_data *sd,int n)
if( !pc_isUseitem(sd,n) )
return 0;
- // Store information for later use before it is lost (via iPc->delitem) [Paradox924X]
+ // Store information for later use before it is lost (via pc->delitem) [Paradox924X]
nameid = sd->inventory_data[n]->nameid;
if (nameid != ITEMID_NAUTHIZ && sd->sc.opt1 > 0 && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING)
@@ -4348,7 +4348,7 @@ int pc_useitem(struct map_session_data *sd,int n)
if( map[sd->bl.m].zone->disabled_items[i] == nameid ) {
if( battle_config.item_restricted_consumption_type ) {
clif->useitemack(sd,n,sd->status.inventory[n].amount-1,true);
- iPc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME);
+ pc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME);
}
return 0;
}
@@ -4367,12 +4367,12 @@ int pc_useitem(struct map_session_data *sd,int n)
else {
if( sd->status.inventory[n].expire_time == 0 ) {
clif->useitemack(sd,n,amount-1,true);
- iPc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME); // Rental Usable Items are not deleted until expiration
+ pc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME); // Rental Usable Items are not deleted until expiration
} else
clif->useitemack(sd,n,0,false);
}
if(sd->status.inventory[n].card[0]==CARD0_CREATE &&
- iPc->famerank(MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3]), MAPID_ALCHEMIST))
+ pc->famerank(MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3]), MAPID_ALCHEMIST))
{
potion_flag = 2; // Famous player's potions have 50% more efficiency
if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ROGUE)
@@ -4412,7 +4412,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
return 1;
}
- if( !itemdb_cancartstore(item_data, iPc->get_group_level(sd)) )
+ if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) )
{ // Check item trade restrictions [Skotlex]
clif->message (sd->fd, msg_txt(264));
return 1;
@@ -4507,8 +4507,8 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending )
return 1;
- if( iPc->cart_additem(sd,item_data,amount,LOG_TYPE_NONE) == 0 )
- return iPc->delitem(sd,idx,amount,0,5,LOG_TYPE_NONE);
+ if( pc->cart_additem(sd,item_data,amount,LOG_TYPE_NONE) == 0 )
+ return pc->delitem(sd,idx,amount,0,5,LOG_TYPE_NONE);
return 1;
}
@@ -4535,7 +4535,7 @@ int pc_cartitem_amount(struct map_session_data* sd, int idx, int amount)
/*==========================================
* Retrieve an item at index idx from cart.
* Return:
- * 0 = player not found or (FIXME) succes (from iPc->cart_delitem)
+ * 0 = player not found or (FIXME) succes (from pc->cart_delitem)
* 1 = failure
*------------------------------------------*/
int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
@@ -4552,8 +4552,8 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
if(item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->state.vending )
return 1;
- if((flag = iPc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
- return iPc->cart_delitem(sd,idx,amount,0,LOG_TYPE_NONE);
+ if((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
+ return pc->cart_delitem(sd,idx,amount,0,LOG_TYPE_NONE);
clif->additem(sd,0,0,flag);
return 1;
@@ -4636,7 +4636,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
tmp_item.nameid = itemid;
tmp_item.amount = 1;
tmp_item.identify = itemdb_isidentified2(data);
- flag = iPc->additem(sd,&tmp_item,1,LOG_TYPE_PICKDROP_PLAYER);
+ flag = pc->additem(sd,&tmp_item,1,LOG_TYPE_PICKDROP_PLAYER);
//TODO: Should we disable stealing when the item you stole couldn't be added to your inventory? Perhaps players will figure out a way to exploit this behaviour otherwise?
md->state.steal_flag = UCHAR_MAX; //you can't steal from this mob any more
@@ -4683,13 +4683,13 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
return 0;
// FIXME: This formula is either custom or outdated.
- skill = iPc->checkskill(sd,RG_STEALCOIN)*10;
+ skill = pc->checkskill(sd,RG_STEALCOIN)*10;
rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;
if(rnd()%1000 < rate)
{
int amount = md->level*10 + rnd()%100;
- iPc->getzeny(sd, amount, LOG_TYPE_STEAL, NULL);
+ pc->getzeny(sd, amount, LOG_TYPE_STEAL, NULL);
md->state.steal_coin_flag = 1;
return 1;
}
@@ -4714,8 +4714,8 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
if( pc_isdead(sd) ) { //Revive dead people before warping them
- iPc->setstand(sd);
- iPc->setrestartvalue(sd,1);
+ pc->setstand(sd);
+ pc->setrestartvalue(sd,1);
}
m = iMap->mapindex2mapid(mapindex);
@@ -4771,7 +4771,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
for( i = 0; i < sd->queues_count; i++ ) {
struct hQueue *queue;
if( (queue = script->queue(sd->queues[i])) && queue->onMapChange[0] != '\0' ) {
- iPc->setregstr(sd, add_str("QMapChangeTo"), map[m].name);
+ pc->setregstr(sd, add_str("QMapChangeTo"), map[m].name);
npc_event(sd, queue->onMapChange, 0);
}
}
@@ -4799,8 +4799,8 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
for( i = 0; i < EQI_MAX; i++ ) {
if( sd->equip_index[ i ] >= 0 )
- if( !iPc->isequip( sd , sd->equip_index[ i ] ) )
- iPc->unequipitem( sd , sd->equip_index[ i ] , 2 );
+ if( !pc->isequip( sd , sd->equip_index[ i ] ) )
+ pc->unequipitem( sd , sd->equip_index[ i ] , 2 );
}
if (battle_config.clear_unit_onwarp&BL_PC)
skill->clear_unitgroup(&sd->bl);
@@ -4836,7 +4836,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
sd->mapindex = mapindex;
sd->bl.x=x;
sd->bl.y=y;
- iPc->clean_skilltree(sd);
+ pc->clean_skilltree(sd);
chrif_save(sd,2);
chrif_changemapserver(sd, ip, (short)port);
@@ -4909,7 +4909,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
* Warp player sd to random location on current map.
* May fail if no walkable cell found (1000 attempts).
* Return:
- * 0 = fail or FIXME success (from iPc->setpos)
+ * 0 = fail or FIXME success (from pc->setpos)
* x(1|2) = fail
*------------------------------------------*/
int pc_randomwarp(struct map_session_data *sd, clr_type type)
@@ -4930,7 +4930,7 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type)
}while(iMap->getcell(m,x,y,CELL_CHKNOPASS) && (i++)<1000 );
if (i < 1000)
- return iPc->setpos(sd,map[sd->bl.m].index,x,y,type);
+ return pc->setpos(sd,map[sd->bl.m].index,x,y,type);
return 0;
}
@@ -4956,7 +4956,7 @@ int pc_memo(struct map_session_data* sd, int pos)
return 0; // invalid input
// check required skill level
- skill = iPc->checkskill(sd, AL_WARP);
+ skill = pc->checkskill(sd, AL_WARP);
if( skill < 1 ) {
clif->skill_memomessage(sd,2); // "You haven't learned Warp."
return 0;
@@ -5616,7 +5616,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data)
if (tbl == NULL || pc_isdead(sd) || status_isdead(tbl))
{
- iPc->stop_following(sd);
+ pc->stop_following(sd);
return 0;
}
@@ -5629,7 +5629,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data)
if (!check_distance_bl(&sd->bl, tbl, 5))
unit_walktobl(&sd->bl, tbl, 5, 0);
} else
- iPc->setpos(sd, map_id2index(tbl->m), tbl->x, tbl->y, CLR_TELEPORT);
+ pc->setpos(sd, map_id2index(tbl->m), tbl->x, tbl->y, CLR_TELEPORT);
}
sd->followtimer = iTimer->add_timer(
tick + 1000, // increase time a bit to loosen up map's load
@@ -5659,7 +5659,7 @@ int pc_follow(struct map_session_data *sd,int target_id)
if (bl == NULL /*|| bl->type != BL_PC*/)
return 1;
if (sd->followtimer != INVALID_TIMER)
- iPc->stop_following(sd);
+ pc->stop_following(sd);
sd->followtarget = target_id;
pc_follow_timer(INVALID_TIMER, iTimer->gettick(), sd->bl.id, 0);
@@ -5668,7 +5668,7 @@ int pc_follow(struct map_session_data *sd,int target_id)
}
int pc_checkbaselevelup(struct map_session_data *sd) {
- unsigned int next = iPc->nextbaseexp(sd);
+ unsigned int next = pc->nextbaseexp(sd);
if (!next || sd->status.base_exp < next)
return 0;
@@ -5679,11 +5679,11 @@ int pc_checkbaselevelup(struct map_session_data *sd) {
if(!battle_config.multi_level_up && sd->status.base_exp > next-1)
sd->status.base_exp = next-1;
- next = iPc->gets_status_point(sd->status.base_level);
+ next = pc->gets_status_point(sd->status.base_level);
sd->status.base_level ++;
sd->status.status_point += next;
- } while ((next=iPc->nextbaseexp(sd)) > 0 && sd->status.base_exp >= next);
+ } while ((next=pc->nextbaseexp(sd)) > 0 && sd->status.base_exp >= next);
if (battle_config.pet_lv_rate && sd->pd) //<Skotlex> update pet's level
status_calc_pet(sd->pd,0);
@@ -5713,7 +5713,7 @@ int pc_checkbaselevelup(struct map_session_data *sd) {
if(sd->status.party_id)
iParty->send_levelup(sd);
- iPc->baselevelchanged(sd);
+ pc->baselevelchanged(sd);
return 1;
}
@@ -5723,7 +5723,7 @@ void pc_baselevelchanged(struct map_session_data *sd) {
for( i = 0; i < EQI_MAX; i++ ) {
if( sd->equip_index[i] >= 0 ) {
if( sd->inventory_data[ sd->equip_index[i] ]->elvmax && sd->status.base_level > (unsigned int)sd->inventory_data[ sd->equip_index[i] ]->elvmax )
- iPc->unequipitem(sd, sd->equip_index[i], 3);
+ pc->unequipitem(sd, sd->equip_index[i], 3);
}
}
#endif
@@ -5731,7 +5731,7 @@ void pc_baselevelchanged(struct map_session_data *sd) {
}
int pc_checkjoblevelup(struct map_session_data *sd)
{
- unsigned int next = iPc->nextjobexp(sd);
+ unsigned int next = pc->nextjobexp(sd);
nullpo_ret(sd);
if(!next || sd->status.job_exp < next)
@@ -5746,7 +5746,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
sd->status.job_level ++;
sd->status.skill_point ++;
- } while ((next=iPc->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);
@@ -5754,7 +5754,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
clif->updatestatus(sd,SP_SKILLPOINT);
status_calc_pc(sd,0);
clif->misceffect(&sd->bl,1);
- if (iPc->checkskill(sd, SG_DEVIL) && !iPc->nextjobexp(sd))
+ if (pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd))
clif->status_change(&sd->bl,SI_DEVIL, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL.
npc_script_event(sd, NPCE_JOBLVUP);
@@ -5809,8 +5809,8 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
if(src) pc_calcexp(sd, &base_exp, &job_exp, src);
- nextb = iPc->nextbaseexp(sd);
- nextj = iPc->nextjobexp(sd);
+ nextb = pc->nextbaseexp(sd);
+ nextj = pc->nextjobexp(sd);
if(sd->state.showexp || battle_config.max_exp_gain_rate){
if (nextb > 0)
@@ -5836,22 +5836,22 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
//Cap exp to the level up requirement of the previous level when you are at max level, otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex]
if (base_exp) {
- nextb = nextb?UINT_MAX:iPc->thisbaseexp(sd);
+ nextb = nextb?UINT_MAX:pc->thisbaseexp(sd);
if(sd->status.base_exp > nextb - base_exp)
sd->status.base_exp = nextb;
else
sd->status.base_exp += base_exp;
- iPc->checkbaselevelup(sd);
+ pc->checkbaselevelup(sd);
clif->updatestatus(sd,SP_BASEEXP);
}
if (job_exp) {
- nextj = nextj?UINT_MAX:iPc->thisjobexp(sd);
+ nextj = nextj?UINT_MAX:pc->thisjobexp(sd);
if(sd->status.job_exp > nextj - job_exp)
sd->status.job_exp = nextj;
else
sd->status.job_exp += job_exp;
- iPc->checkjoblevelup(sd);
+ pc->checkjoblevelup(sd);
clif->updatestatus(sd,SP_JOBEXP);
}
@@ -5874,12 +5874,12 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
*------------------------------------------*/
unsigned int pc_maxbaselv(struct map_session_data *sd)
{
- return max_level[iPc->class2idx(sd->status.class_)][0];
+ return max_level[pc->class2idx(sd->status.class_)][0];
}
unsigned int pc_maxjoblv(struct map_session_data *sd)
{
- return max_level[iPc->class2idx(sd->status.class_)][1];
+ return max_level[pc->class2idx(sd->status.class_)][1];
}
/*==========================================
@@ -5891,19 +5891,19 @@ unsigned int pc_nextbaseexp(struct map_session_data *sd)
{
nullpo_ret(sd);
- if(sd->status.base_level>=iPc->maxbaselv(sd) || sd->status.base_level<=0)
+ if(sd->status.base_level>=pc->maxbaselv(sd) || sd->status.base_level<=0)
return 0;
- return exp_table[iPc->class2idx(sd->status.class_)][0][sd->status.base_level-1];
+ return exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-1];
}
//Base exp needed for this level.
unsigned int pc_thisbaseexp(struct map_session_data *sd)
{
- if(sd->status.base_level>iPc->maxbaselv(sd) || sd->status.base_level<=1)
+ if(sd->status.base_level>pc->maxbaselv(sd) || sd->status.base_level<=1)
return 0;
- return exp_table[iPc->class2idx(sd->status.class_)][0][sd->status.base_level-2];
+ return exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-2];
}
@@ -5919,17 +5919,17 @@ unsigned int pc_nextjobexp(struct map_session_data *sd)
{
nullpo_ret(sd);
- if(sd->status.job_level>=iPc->maxjoblv(sd) || sd->status.job_level<=0)
+ if(sd->status.job_level>=pc->maxjoblv(sd) || sd->status.job_level<=0)
return 0;
- return exp_table[iPc->class2idx(sd->status.class_)][1][sd->status.job_level-1];
+ return exp_table[pc->class2idx(sd->status.class_)][1][sd->status.job_level-1];
}
//Job exp needed for this level.
unsigned int pc_thisjobexp(struct map_session_data *sd)
{
- if(sd->status.job_level>iPc->maxjoblv(sd) || sd->status.job_level<=1)
+ if(sd->status.job_level>pc->maxjoblv(sd) || sd->status.job_level<=1)
return 0;
- return exp_table[iPc->class2idx(sd->status.class_)][1][sd->status.job_level-2];
+ return exp_table[pc->class2idx(sd->status.class_)][1][sd->status.job_level-2];
}
/// Returns the value of the specified stat.
@@ -6020,7 +6020,7 @@ int pc_statusup(struct map_session_data* sd, int type)
nullpo_ret(sd);
// check conditions
- need = iPc->need_status_point(sd,type,1);
+ need = pc->need_status_point(sd,type,1);
if( type < SP_STR || type > SP_LUK || need < 0 || need > sd->status.status_point )
{
clif->statusupack(sd,type,0,0);
@@ -6042,7 +6042,7 @@ int pc_statusup(struct map_session_data* sd, int type)
status_calc_pc(sd,0);
// update increase cost indicator
- if( need != iPc->need_status_point(sd,type,1) )
+ if( need != pc->need_status_point(sd,type,1) )
clif->updatestatus(sd, SP_USTR + type-SP_STR);
// update statpoint count
@@ -6073,7 +6073,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
return 1;
}
- need = iPc->need_status_point(sd,type,1);
+ need = pc->need_status_point(sd,type,1);
// set new value
max = pc_maxparameter(sd);
@@ -6082,7 +6082,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
status_calc_pc(sd,0);
// update increase cost indicator
- if( need != iPc->need_status_point(sd,type,1) )
+ if( need != pc->need_status_point(sd,type,1) )
clif->updatestatus(sd, SP_USTR + type-SP_STR);
// update stat value
@@ -6123,8 +6123,8 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) {
sd->status.skill_point--;
if( !skill_db[index].inf )
status_calc_pc(sd,0); // Only recalculate for passive skills.
- else if( sd->status.skill_point == 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && iPc->famerank(sd->status.char_id, MAPID_TAEKWON) )
- iPc->calc_skilltree(sd); // Required to grant all TK Ranger skills.
+ else if( sd->status.skill_point == 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) )
+ pc->calc_skilltree(sd); // Required to grant all TK Ranger skills.
else
pc_check_skilltree(sd, skill_id); // Check if a new skill can Lvlup
@@ -6173,8 +6173,8 @@ int pc_allskillup(struct map_session_data *sd)
}
} else {
int inf2;
- for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[iPc->class2idx(sd->status.class_)][i].id)>0;i++){
- int idx = skill_tree[iPc->class2idx(sd->status.class_)][i].idx;
+ for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[pc->class2idx(sd->status.class_)][i].id)>0;i++){
+ int idx = skill_tree[pc->class2idx(sd->status.class_)][i].idx;
inf2 = skill_db[idx].inf2;
if (
(inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) ||
@@ -6204,7 +6204,7 @@ int pc_resetlvl(struct map_session_data* sd,int type)
nullpo_ret(sd);
if (type != 3) //Also reset skills
- iPc->resetskill(sd, 0);
+ pc->resetskill(sd, 0);
if(type == 1){
sd->status.skill_point=0;
@@ -6224,8 +6224,8 @@ int pc_resetlvl(struct map_session_data* sd,int type)
if(sd->status.class_ == JOB_NOVICE_HIGH) {
sd->status.status_point=100; // not 88 [celest]
// give platinum skills upon changing
- iPc->skill(sd,142,1,0);
- iPc->skill(sd,143,1,0);
+ pc->skill(sd,142,1,0);
+ pc->skill(sd,143,1,0);
}
}
@@ -6270,8 +6270,8 @@ int pc_resetlvl(struct map_session_data* sd,int type)
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(!iPc->isequip(sd,sd->equip_index[i]))
- iPc->unequipitem(sd,sd->equip_index[i],2);
+ if(!pc->isequip(sd,sd->equip_index[i]))
+ pc->unequipitem(sd,sd->equip_index[i],2);
}
if ((type == 1 || type == 2 || type == 3) && sd->status.party_id)
@@ -6303,12 +6303,12 @@ int pc_resetstate(struct map_session_data* sd)
else
{
int add=0;
- add += iPc->need_status_point(sd, SP_STR, 1-pc_getstat(sd, SP_STR));
- add += iPc->need_status_point(sd, SP_AGI, 1-pc_getstat(sd, SP_AGI));
- add += iPc->need_status_point(sd, SP_VIT, 1-pc_getstat(sd, SP_VIT));
- add += iPc->need_status_point(sd, SP_INT, 1-pc_getstat(sd, SP_INT));
- add += iPc->need_status_point(sd, SP_DEX, 1-pc_getstat(sd, SP_DEX));
- add += iPc->need_status_point(sd, SP_LUK, 1-pc_getstat(sd, SP_LUK));
+ add += pc->need_status_point(sd, SP_STR, 1-pc_getstat(sd, SP_STR));
+ add += pc->need_status_point(sd, SP_AGI, 1-pc_getstat(sd, SP_AGI));
+ add += pc->need_status_point(sd, SP_VIT, 1-pc_getstat(sd, SP_VIT));
+ add += pc->need_status_point(sd, SP_INT, 1-pc_getstat(sd, SP_INT));
+ add += pc->need_status_point(sd, SP_DEX, 1-pc_getstat(sd, SP_DEX));
+ add += pc->need_status_point(sd, SP_LUK, 1-pc_getstat(sd, SP_LUK));
sd->status.status_point+=add;
}
@@ -6366,35 +6366,35 @@ int pc_resetskill(struct map_session_data* sd, int flag)
/**
* It has been confirmed on official server that when you reset skills with a ranked tweakwon your skills are not reset (because you have all of them anyway)
**/
- if( (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && iPc->famerank(sd->status.char_id, MAPID_TAEKWON) )
+ if( (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) )
return 0;
- if( iPc->checkskill(sd, SG_DEVIL) && !iPc->nextjobexp(sd) ) //Remove perma blindness due to skill-reset. [Skotlex]
+ if( pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd) ) //Remove perma blindness due to skill-reset. [Skotlex]
clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_DEVIL);
i = sd->sc.option;
- if( i&OPTION_RIDING && (!iPc->checkskill(sd, KN_RIDING) || (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) )
+ if( i&OPTION_RIDING && (!pc->checkskill(sd, KN_RIDING) || (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) )
i &= ~OPTION_RIDING;
- if( i&OPTION_FALCON && iPc->checkskill(sd, HT_FALCON) )
+ if( i&OPTION_FALCON && pc->checkskill(sd, HT_FALCON) )
i &= ~OPTION_FALCON;
- if( i&OPTION_DRAGON && iPc->checkskill(sd, RK_DRAGONTRAINING) )
+ if( i&OPTION_DRAGON && pc->checkskill(sd, RK_DRAGONTRAINING) )
i &= ~OPTION_DRAGON;
- if( i&OPTION_WUG && iPc->checkskill(sd, RA_WUGMASTERY) )
+ if( i&OPTION_WUG && pc->checkskill(sd, RA_WUGMASTERY) )
i &= ~OPTION_WUG;
- if( i&OPTION_WUGRIDER && iPc->checkskill(sd, RA_WUGRIDER) )
+ if( i&OPTION_WUGRIDER && pc->checkskill(sd, RA_WUGRIDER) )
i &= ~OPTION_WUGRIDER;
if( i&OPTION_MADOGEAR && ( sd->class_&MAPID_THIRDMASK ) == MAPID_MECHANIC )
i &= ~OPTION_MADOGEAR;
#ifndef NEW_CARTS
- if( i&OPTION_CART && iPc->checkskill(sd, MC_PUSHCART) )
+ if( i&OPTION_CART && pc->checkskill(sd, MC_PUSHCART) )
i &= ~OPTION_CART;
#else
if( sd->sc.data[SC_PUSH_CART] )
- iPc->setcart(sd, 0);
+ pc->setcart(sd, 0);
#endif
if( i != sd->sc.option )
- iPc->setoption(sd, i);
+ pc->setoption(sd, i);
- if( homun_alive(sd->hd) && iPc->checkskill(sd, AM_CALLHOMUN) )
+ if( homun_alive(sd->hd) && pc->checkskill(sd, AM_CALLHOMUN) )
homun->vaporize(sd, 0);
}
@@ -6544,9 +6544,9 @@ void pc_respawn(struct map_session_data* sd, clr_type clrtype)
if( sd->bg_id && bg_member_respawn(sd) )
return; // member revived by battleground
- iPc->setstand(sd);
- iPc->setrestartvalue(sd,3);
- if( iPc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, clrtype) )
+ pc->setstand(sd);
+ pc->setrestartvalue(sd,3);
+ if( pc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, clrtype) )
clif->resurrection(&sd->bl, 1); //If warping fails, send a normal stand up packet.
}
@@ -6556,7 +6556,7 @@ static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data)
if( sd != NULL )
{
sd->pvp_point=0;
- iPc->respawn(sd,CLR_OUTSIGHT);
+ pc->respawn(sd,CLR_OUTSIGHT);
}
return 0;
@@ -6575,7 +6575,7 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h
return;
if( pc_issit(sd) ) {
- iPc->setstand(sd);
+ pc->setstand(sd);
skill->sit(sd,0);
}
@@ -6641,7 +6641,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
npc_event_dequeue(sd);
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
- iPc->setparam(sd, SP_KILLERRID, src?src->id:0);
+ pc->setparam(sd, SP_KILLERRID, src?src->id:0);
if( sd->bg_id ) {/* TODO: purge when bgqueue is deemed ok */
struct battleground_data *bg;
@@ -6673,7 +6673,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
sd->st->state = END;
}
- /* e.g. not killed thru iPc->damage */
+ /* e.g. not killed thru pc->damage */
if( pc_issit(sd) ) {
clif->sc_end(&sd->bl,sd->bl.id,SELF,SI_SIT);
}
@@ -6688,10 +6688,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
sd->hp_loss.tick = sd->sp_loss.tick = sd->hp_regen.tick = sd->sp_regen.tick = 0;
if ( sd && sd->spiritball )
- iPc->delspiritball(sd,sd->spiritball,0);
+ pc->delspiritball(sd,sd->spiritball,0);
for(i = 1; i < 5; i++)
- iPc->del_talisman(sd, sd->talisman[i], i);
+ pc->del_talisman(sd, sd->talisman[i], i);
if (src) {
switch (src->type) {
@@ -6701,7 +6701,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if(md->target_id==sd->bl.id)
mob_unlocktarget(md,tick);
if(battle_config.mobs_level_up && md->status.hp &&
- (unsigned int)md->level < iPc->maxbaselv(sd) &&
+ (unsigned int)md->level < pc->maxbaselv(sd) &&
!md->guardian_data && !md->special_state.ai// Guardians/summons should not level. [Skotlex]
) { // monster level up [Valaris]
clif->misceffect(&md->bl,0);
@@ -6731,7 +6731,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if (src && src->type == BL_PC) {
struct map_session_data *ssd = (struct map_session_data *)src;
- iPc->setparam(ssd, SP_KILLEDRID, sd->bl.id);
+ pc->setparam(ssd, SP_KILLEDRID, sd->bl.id);
npc_script_event(ssd, NPCE_KILLPC);
if (battle_config.pk_mode&2) {
@@ -6781,15 +6781,15 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
// activate Steel body if a super novice dies at 99+% exp [celest]
if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag)
{
- unsigned int next = iPc->nextbaseexp(sd);
- if( next == 0 ) next = iPc->thisbaseexp(sd);
+ unsigned int next = pc->nextbaseexp(sd);
+ if( next == 0 ) next = pc->thisbaseexp(sd);
if( get_percentage(sd->status.base_exp,next) >= 99 ) {
sd->state.snovice_dead_flag = 1;
- iPc->setstand(sd);
+ pc->setstand(sd);
status_percent_heal(&sd->bl, 100, 100);
clif->resurrection(&sd->bl, 1);
if(battle_config.pc_invincible_time)
- iPc->setinvincibletimer(sd, battle_config.pc_invincible_time);
+ pc->setinvincibletimer(sd, battle_config.pc_invincible_time);
sc_start(&sd->bl,status_skill2sc(MO_STEELBODY),100,1,skill->get_time(MO_STEELBODY,1));
if(map_flag_gvg(sd->bl.m))
pc_respawn_timer(INVALID_TIMER, iTimer->gettick(), sd->bl.id, 0);
@@ -6807,7 +6807,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if (battle_config.death_penalty_base > 0) {
switch (battle_config.death_penalty_type) {
case 1:
- base_penalty = (unsigned int) ((double)iPc->nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000);
+ base_penalty = (unsigned int) ((double)pc->nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000);
break;
case 2:
base_penalty = (unsigned int) ((double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000);
@@ -6825,7 +6825,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
base_penalty = 0;
switch (battle_config.death_penalty_type) {
case 1:
- base_penalty = (unsigned int) ((double)iPc->nextjobexp(sd) * (double)battle_config.death_penalty_job/10000);
+ base_penalty = (unsigned int) ((double)pc->nextjobexp(sd) * (double)battle_config.death_penalty_job/10000);
break;
case 2:
base_penalty = (unsigned int) ((double)sd->status.job_exp * (double)battle_config.death_penalty_job/10000);
@@ -6842,7 +6842,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
{
base_penalty = (unsigned int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.);
if(base_penalty)
- iPc->payzeny(sd, base_penalty, LOG_TYPE_PICKDROP_PLAYER, NULL);
+ pc->payzeny(sd, base_penalty, LOG_TYPE_PICKDROP_PLAYER, NULL);
}
}
@@ -6874,8 +6874,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
int n = eq_n[rnd()%eq_num];
if(rnd()%10000 < per){
if(sd->status.inventory[n].equip)
- iPc->unequipitem(sd,n,3);
- iPc->dropitem(sd,n,1);
+ pc->unequipitem(sd,n,3);
+ pc->dropitem(sd,n,1);
}
}
}
@@ -6887,8 +6887,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
|| (type == 2 && sd->status.inventory[i].equip)
|| type == 3) ){
if(sd->status.inventory[i].equip)
- iPc->unequipitem(sd,i,3);
- iPc->dropitem(sd,i,1);
+ pc->unequipitem(sd,i,3);
+ pc->dropitem(sd,i,1);
break;
}
}
@@ -6940,9 +6940,9 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) {
if(hp) clif->updatestatus(sd,SP_HP);
if(sp) clif->updatestatus(sd,SP_SP);
- iPc->setstand(sd);
+ pc->setstand(sd);
if(battle_config.pc_invincible_time > 0)
- iPc->setinvincibletimer(sd, battle_config.pc_invincible_time);
+ pc->setinvincibletimer(sd, battle_config.pc_invincible_time);
if( sd->state.gmaster_flag ) {
guild->aura_refresh(sd,GD_LEADERSHIP,guild->checkskill(sd->state.gmaster_flag,GD_LEADERSHIP));
@@ -6969,16 +6969,16 @@ int pc_readparam(struct map_session_data* sd,int type)
case SP_BASELEVEL: val = sd->status.base_level; break;
case SP_JOBLEVEL: val = sd->status.job_level; break;
case SP_CLASS: val = sd->status.class_; break;
- case SP_BASEJOB: val = iPc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex); break; //Base job, extracting upper type.
+ case SP_BASEJOB: val = pc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex); break; //Base job, extracting upper type.
case SP_UPPER: val = sd->class_&JOBL_UPPER?1:(sd->class_&JOBL_BABY?2:0); break;
- case SP_BASECLASS: val = iPc->mapid2jobid(sd->class_&MAPID_BASEMASK, sd->status.sex); break; //Extract base class tree. [Skotlex]
+ case SP_BASECLASS: val = pc->mapid2jobid(sd->class_&MAPID_BASEMASK, sd->status.sex); break; //Extract base class tree. [Skotlex]
case SP_SEX: val = sd->status.sex; break;
case SP_WEIGHT: val = sd->weight; break;
case SP_MAXWEIGHT: val = sd->max_weight; break;
case SP_BASEEXP: val = sd->status.base_exp; break;
case SP_JOBEXP: val = sd->status.job_exp; break;
- case SP_NEXTBASEEXP: val = iPc->nextbaseexp(sd); break;
- case SP_NEXTJOBEXP: val = iPc->nextjobexp(sd); break;
+ case SP_NEXTBASEEXP: val = pc->nextbaseexp(sd); break;
+ case SP_NEXTJOBEXP: val = pc->nextjobexp(sd); break;
case SP_HP: val = sd->battle_status.hp; break;
case SP_MAXHP: val = sd->battle_status.max_hp; break;
case SP_SP: val = sd->battle_status.sp; break;
@@ -7114,12 +7114,12 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
switch(type){
case SP_BASELEVEL:
- if ((unsigned int)val > iPc->maxbaselv(sd)) //Capping to max
- val = iPc->maxbaselv(sd);
+ if ((unsigned int)val > pc->maxbaselv(sd)) //Capping to max
+ val = pc->maxbaselv(sd);
if ((unsigned int)val > sd->status.base_level) {
int stat=0;
for (i = 0; i < (int)((unsigned int)val - sd->status.base_level); i++)
- stat += iPc->gets_status_point(sd->status.base_level + i);
+ stat += pc->gets_status_point(sd->status.base_level + i);
sd->status.status_point += stat;
}
sd->status.base_level = (unsigned int)val;
@@ -7136,7 +7136,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
break;
case SP_JOBLEVEL:
if ((unsigned int)val >= sd->status.job_level) {
- if ((unsigned int)val > iPc->maxjoblv(sd)) val = iPc->maxjoblv(sd);
+ if ((unsigned int)val > pc->maxjoblv(sd)) val = pc->maxjoblv(sd);
sd->status.skill_point += val - sd->status.job_level;
clif->updatestatus(sd, SP_SKILLPOINT);
}
@@ -7160,15 +7160,15 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
sd->status.zeny = cap_value(val, 0, MAX_ZENY);
break;
case SP_BASEEXP:
- if(iPc->nextbaseexp(sd) > 0) {
+ if(pc->nextbaseexp(sd) > 0) {
sd->status.base_exp = val;
- iPc->checkbaselevelup(sd);
+ pc->checkbaselevelup(sd);
}
break;
case SP_JOBEXP:
- if(iPc->nextjobexp(sd) > 0) {
+ if(pc->nextjobexp(sd) > 0) {
sd->status.job_exp = val;
- iPc->checkjoblevelup(sd);
+ pc->checkjoblevelup(sd);
}
break;
case SP_SEX:
@@ -7283,8 +7283,8 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
if(hp) {
int i;
bonus = 100 + (sd->battle_status.vit<<1)
- + iPc->checkskill(sd,SM_RECOVERY)*10
- + iPc->checkskill(sd,AM_LEARNINGPOTION)*5;
+ + pc->checkskill(sd,SM_RECOVERY)*10
+ + pc->checkskill(sd,AM_LEARNINGPOTION)*5;
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
if (potion_flag > 1)
bonus += bonus*(potion_flag-1)*50/100;
@@ -7309,8 +7309,8 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
}
if(sp) {
bonus = 100 + (sd->battle_status.int_<<1)
- + iPc->checkskill(sd,MG_SRECOVERY)*10
- + iPc->checkskill(sd,AM_LEARNINGPOTION)*5;
+ + pc->checkskill(sd,MG_SRECOVERY)*10
+ + pc->checkskill(sd,AM_LEARNINGPOTION)*5;
if (potion_flag > 1)
bonus += bonus*(potion_flag-1)*50/100;
if(bonus != 100)
@@ -7407,7 +7407,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
return 1;
//Normalize job.
- b_class = iPc->jobid2mapid(job);
+ b_class = pc->jobid2mapid(job);
if (b_class == -1)
return 1;
switch (upper) {
@@ -7420,7 +7420,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
}
//This will automatically adjust bard/dancer classes to the correct gender
//That is, if you try to jobchange into dancer, it will turn you to bard.
- job = iPc->mapid2jobid(b_class, sd->status.sex);
+ job = pc->mapid2jobid(b_class, sd->status.sex);
if (job == -1)
return 1;
@@ -7465,7 +7465,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
}
if ( (b_class&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK) ) { //Things to remove when changing class tree.
- const int class_ = iPc->class2idx(sd->status.class_);
+ const int class_ = pc->class2idx(sd->status.class_);
short id;
for(i = 0; i < MAX_SKILL_TREE && (id = skill_tree[class_][i].id) > 0; i++) {
//Remove status specific to your current tree skills.
@@ -7477,19 +7477,19 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
if( (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && (b_class&MAPID_UPPERMASK) != MAPID_STAR_GLADIATOR) {
/* going off star glad lineage, reset feel to not store no-longer-used vars in the database */
- iPc->resetfeel(sd);
+ pc->resetfeel(sd);
}
sd->status.class_ = job;
- fame_flag = iPc->famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK);
+ fame_flag = pc->famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK);
sd->class_ = (unsigned short)b_class;
sd->status.job_level=1;
sd->status.job_exp=0;
- if (sd->status.base_level > iPc->maxbaselv(sd)) {
- sd->status.base_level = iPc->maxbaselv(sd);
+ if (sd->status.base_level > pc->maxbaselv(sd)) {
+ sd->status.base_level = pc->maxbaselv(sd);
sd->status.base_exp=0;
- iPc->resetstate(sd);
+ pc->resetstate(sd);
clif->updatestatus(sd,SP_STATUSPOINT);
clif->updatestatus(sd,SP_BASELEVEL);
clif->updatestatus(sd,SP_BASEEXP);
@@ -7502,14 +7502,14 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
for(i=0;i<EQI_MAX;i++) {
if(sd->equip_index[i] >= 0)
- if(!iPc->isequip(sd,sd->equip_index[i]))
- iPc->unequipitem(sd,sd->equip_index[i],2); // unequip invalid item for class
+ if(!pc->isequip(sd,sd->equip_index[i]))
+ pc->unequipitem(sd,sd->equip_index[i],2); // unequip invalid item for class
}
//Change look, if disguised, you need to undisguise
//to correctly calculate new job sprite without
if (sd->disguise != -1)
- iPc->disguise(sd, -1);
+ pc->disguise(sd, -1);
status_set_viewdata(&sd->bl, job);
clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); // move sprite update to prevent client crashes with incompatible equipment [Valaris]
@@ -7517,7 +7517,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
//Update skill tree.
- iPc->calc_skilltree(sd);
+ pc->calc_skilltree(sd);
clif->skillinfoblock(sd);
if (sd->ed)
@@ -7529,37 +7529,37 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
//Remove peco/cart/falcon
i = sd->sc.option;
- if( i&OPTION_RIDING && !iPc->checkskill(sd, KN_RIDING) )
+ if( i&OPTION_RIDING && !pc->checkskill(sd, KN_RIDING) )
i&=~OPTION_RIDING;
- if( i&OPTION_FALCON && !iPc->checkskill(sd, HT_FALCON) )
+ if( i&OPTION_FALCON && !pc->checkskill(sd, HT_FALCON) )
i&=~OPTION_FALCON;
- if( i&OPTION_DRAGON && !iPc->checkskill(sd,RK_DRAGONTRAINING) )
+ if( i&OPTION_DRAGON && !pc->checkskill(sd,RK_DRAGONTRAINING) )
i&=~OPTION_DRAGON;
- if( i&OPTION_WUGRIDER && !iPc->checkskill(sd,RA_WUGMASTERY) )
+ if( i&OPTION_WUGRIDER && !pc->checkskill(sd,RA_WUGMASTERY) )
i&=~OPTION_WUGRIDER;
- if( i&OPTION_WUG && !iPc->checkskill(sd,RA_WUGMASTERY) )
+ if( i&OPTION_WUG && !pc->checkskill(sd,RA_WUGMASTERY) )
i&=~OPTION_WUG;
if( i&OPTION_MADOGEAR ) //You do not need a skill for this.
i&=~OPTION_MADOGEAR;
#ifndef NEW_CARTS
- if( i&OPTION_CART && !iPc->checkskill(sd, MC_PUSHCART) )
+ if( i&OPTION_CART && !pc->checkskill(sd, MC_PUSHCART) )
i&=~OPTION_CART;
#else
- if( sd->sc.data[SC_PUSH_CART] && !iPc->checkskill(sd, MC_PUSHCART) )
- iPc->setcart(sd, 0);
+ if( sd->sc.data[SC_PUSH_CART] && !pc->checkskill(sd, MC_PUSHCART) )
+ pc->setcart(sd, 0);
#endif
if(i != sd->sc.option)
- iPc->setoption(sd, i);
+ pc->setoption(sd, i);
- if(homun_alive(sd->hd) && !iPc->checkskill(sd, AM_CALLHOMUN))
+ if(homun_alive(sd->hd) && !pc->checkskill(sd, AM_CALLHOMUN))
homun->vaporize(sd, 0);
if(sd->status.manner < 0)
clif->changestatus(sd,SP_MANNER,sd->status.manner);
status_calc_pc(sd,0);
- iPc->checkallowskill(sd);
- iPc->equiplookall(sd);
+ pc->checkallowskill(sd);
+ pc->equiplookall(sd);
//if you were previously famous, not anymore.
if (fame_flag) {
@@ -7677,7 +7677,7 @@ int pc_setoption(struct map_session_data *sd,int type)
sd->sc.option=type;
clif->changeoption(&sd->bl);
- if( (type&OPTION_RIDING && !(p_type&OPTION_RIDING)) || (type&OPTION_DRAGON && !(p_type&OPTION_DRAGON) && iPc->checkskill(sd,RK_DRAGONTRAINING) > 0) ) {
+ if( (type&OPTION_RIDING && !(p_type&OPTION_RIDING)) || (type&OPTION_DRAGON && !(p_type&OPTION_DRAGON) && pc->checkskill(sd,RK_DRAGONTRAINING) > 0) ) {
// Mounting
clif->sc_load(&sd->bl,sd->bl.id,AREA,SI_RIDING, 0, 0, 0);
status_calc_pc(sd,0);
@@ -7691,11 +7691,11 @@ int pc_setoption(struct map_session_data *sd,int type)
if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On
clif->cartlist(sd);
clif->updatestatus(sd, SP_CARTINFO);
- if(iPc->checkskill(sd, MC_PUSHCART) < 10)
+ if(pc->checkskill(sd, MC_PUSHCART) < 10)
status_calc_pc(sd,0); //Apply speed penalty.
} else if( !( type&OPTION_CART ) && p_type&OPTION_CART ){ //Cart Off
clif->clearcart(sd->fd);
- if(iPc->checkskill(sd, MC_PUSHCART) < 10)
+ if(pc->checkskill(sd, MC_PUSHCART) < 10)
status_calc_pc(sd,0); //Remove speed penalty.
}
#endif
@@ -7769,7 +7769,7 @@ int pc_setcart(struct map_session_data *sd,int type) {
if( type < 0 || type > MAX_CARTS )
return 1;// Never trust the values sent by the client! [Skotlex]
- if( iPc->checkskill(sd,MC_PUSHCART) <= 0 && type != 0 )
+ if( pc->checkskill(sd,MC_PUSHCART) <= 0 && type != 0 )
return 1;// Push cart is required
if( type == 0 && pc_iscarton(sd) )
@@ -7796,14 +7796,14 @@ int pc_setcart(struct map_session_data *sd,int type) {
break;
}
- if(iPc->checkskill(sd, MC_PUSHCART) < 10)
+ if(pc->checkskill(sd, MC_PUSHCART) < 10)
status_calc_pc(sd,0); //Recalc speed penalty.
#else
// Update option
option = sd->sc.option;
option &= ~OPTION_CART;// clear cart bits
option |= cart[type]; // set cart
- iPc->setoption(sd, option);
+ pc->setoption(sd, option);
#endif
return 0;
@@ -7815,10 +7815,10 @@ int pc_setcart(struct map_session_data *sd,int type) {
int pc_setfalcon(TBL_PC* sd, int flag)
{
if( flag ){
- if( iPc->checkskill(sd,HT_FALCON)>0 ) // add falcon if he have the skill
- iPc->setoption(sd,sd->sc.option|OPTION_FALCON);
+ if( pc->checkskill(sd,HT_FALCON)>0 ) // add falcon if he have the skill
+ pc->setoption(sd,sd->sc.option|OPTION_FALCON);
} else if( pc_isfalcon(sd) ){
- iPc->setoption(sd,sd->sc.option&~OPTION_FALCON); // remove falcon
+ pc->setoption(sd,sd->sc.option&~OPTION_FALCON); // remove falcon
}
return 0;
@@ -7830,10 +7830,10 @@ int pc_setfalcon(TBL_PC* sd, int flag)
int pc_setriding(TBL_PC* sd, int flag)
{
if( flag ){
- if( iPc->checkskill(sd,KN_RIDING) > 0 ) // add peco
- iPc->setoption(sd, sd->sc.option|OPTION_RIDING);
+ if( pc->checkskill(sd,KN_RIDING) > 0 ) // add peco
+ pc->setoption(sd, sd->sc.option|OPTION_RIDING);
} else if( pc_isriding(sd) ){
- iPc->setoption(sd, sd->sc.option&~OPTION_RIDING);
+ pc->setoption(sd, sd->sc.option&~OPTION_RIDING);
}
return 0;
@@ -7845,10 +7845,10 @@ int pc_setriding(TBL_PC* sd, int flag)
int pc_setmadogear(TBL_PC* sd, int flag)
{
if( flag ){
- if( iPc->checkskill(sd,NC_MADOLICENCE) > 0 )
- iPc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
+ if( pc->checkskill(sd,NC_MADOLICENCE) > 0 )
+ pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR);
} else if( pc_ismadogear(sd) ){
- iPc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
+ pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
}
return 0;
@@ -7861,9 +7861,9 @@ int pc_candrop(struct map_session_data *sd, struct item *item)
{
if( item && item->expire_time )
return 0;
- if( !iPc->can_give_items(sd) ) //check if this GM level can drop items
+ if( !pc->can_give_items(sd) ) //check if this GM level can drop items
return 0;
- return (itemdb_isdropable(item, iPc->get_group_level(sd)));
+ return (itemdb_isdropable(item, pc->get_group_level(sd)));
}
/*==========================================
@@ -8493,12 +8493,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
id = sd->inventory_data[n];
- pos = iPc->equippoint(sd,n); //With a few exceptions, item should go in all specified slots.
+ pos = pc->equippoint(sd,n); //With a few exceptions, item should go in all specified slots.
if(battle_config.battle_log)
ShowInfo("equip %d(%d) %x:%x\n",sd->status.inventory[n].nameid,n,id?id->equip:0,req_pos);
- if(!iPc->isequip(sd,n) || !(pos&req_pos) || sd->status.inventory[n].equip != 0 || sd->status.inventory[n].attribute==1 ) { // [Valaris]
- // FIXME: iPc->isequip: equip level failure uses 2 instead of 0
+ if(!pc->isequip(sd,n) || !(pos&req_pos) || sd->status.inventory[n].equip != 0 || sd->status.inventory[n].attribute==1 ) { // [Valaris]
+ // FIXME: pc->isequip: equip level failure uses 2 instead of 0
clif->equipitemack(sd,n,0,0); // fail
return 0;
}
@@ -8534,7 +8534,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
for(i=0;i<EQI_MAX;i++) {
if(pos & equip_pos[i]) {
if(sd->equip_index[i] >= 0) //Slot taken, remove item from there.
- iPc->unequipitem(sd,sd->equip_index[i],2);
+ pc->unequipitem(sd,sd->equip_index[i],2);
sd->equip_index[i] = n;
}
@@ -8576,21 +8576,21 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
//Added check to prevent sending the same look on multiple slots ->
//causes client to redraw item on top of itself. (suggested by Lupus)
- if(pos & EQP_HEAD_LOW && iPc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1) {
+ if(pos & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1) {
if(id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID)))
sd->status.head_bottom = id->look;
else
sd->status.head_bottom = 0;
clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
}
- if(pos & EQP_HEAD_TOP && iPc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1) {
+ if(pos & EQP_HEAD_TOP && pc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1) {
if(id)
sd->status.head_top = id->look;
else
sd->status.head_top = 0;
clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
}
- if(pos & EQP_HEAD_MID && iPc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1) {
+ if(pos & EQP_HEAD_MID && pc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1) {
if(id && !(pos&EQP_HEAD_TOP))
sd->status.head_mid = id->look;
else
@@ -8621,7 +8621,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
if(pos & EQP_SHOES)
clif->changelook(&sd->bl,LOOK_SHOES,0);
- if( pos&EQP_GARMENT && iPc->checkequip(sd,EQP_COSTUME_GARMENT) == -1 ) {
+ if( pos&EQP_GARMENT && pc->checkequip(sd,EQP_COSTUME_GARMENT) == -1 ) {
sd->status.robe = id ? id->look : 0;
clif->changelook(&sd->bl, LOOK_ROBE, sd->status.robe);
}
@@ -8632,7 +8632,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
- iPc->checkallowskill(sd); //Check if status changes should be halted.
+ pc->checkallowskill(sd); //Check if status changes should be halted.
iflag = sd->npc_item_flag;
/* check for combos (MUST be before status_calc_pc) */
@@ -8712,7 +8712,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
}
if(battle_config.battle_log)
- ShowInfo("unequip %d %x:%x\n",n,iPc->equippoint(sd,n),sd->status.inventory[n].equip);
+ ShowInfo("unequip %d %x:%x\n",n,pc->equippoint(sd,n),sd->status.inventory[n].equip);
if(!sd->status.inventory[n].equip){ //Nothing to unequip
clif->unequipitemack(sd,n,0,0);
@@ -8736,44 +8736,44 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
pc_calcweapontype(sd);
clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
}
- if(sd->status.inventory[n].equip & EQP_HEAD_LOW && iPc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1 ) {
+ if(sd->status.inventory[n].equip & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1 ) {
sd->status.head_bottom = 0;
clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
}
- if(sd->status.inventory[n].equip & EQP_HEAD_TOP && iPc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1 ) {
+ if(sd->status.inventory[n].equip & EQP_HEAD_TOP && pc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1 ) {
sd->status.head_top = 0;
clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
}
- if(sd->status.inventory[n].equip & EQP_HEAD_MID && iPc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1 ) {
+ if(sd->status.inventory[n].equip & EQP_HEAD_MID && pc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1 ) {
sd->status.head_mid = 0;
clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
}
if(sd->status.inventory[n].equip & EQP_COSTUME_HEAD_TOP) {
- sd->status.head_top = ( iPc->checkequip(sd,EQP_HEAD_TOP) >= 0 ) ? sd->inventory_data[iPc->checkequip(sd,EQP_HEAD_TOP)]->look : 0;
+ sd->status.head_top = ( pc->checkequip(sd,EQP_HEAD_TOP) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_TOP)]->look : 0;
clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
}
if(sd->status.inventory[n].equip & EQP_COSTUME_HEAD_MID) {
- sd->status.head_mid = ( iPc->checkequip(sd,EQP_HEAD_MID) >= 0 ) ? sd->inventory_data[iPc->checkequip(sd,EQP_HEAD_MID)]->look : 0;
+ sd->status.head_mid = ( pc->checkequip(sd,EQP_HEAD_MID) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_MID)]->look : 0;
clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
}
if(sd->status.inventory[n].equip & EQP_COSTUME_HEAD_LOW) {
- sd->status.head_bottom = ( iPc->checkequip(sd,EQP_HEAD_LOW) >= 0 ) ? sd->inventory_data[iPc->checkequip(sd,EQP_HEAD_LOW)]->look : 0;
+ sd->status.head_bottom = ( pc->checkequip(sd,EQP_HEAD_LOW) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_LOW)]->look : 0;
clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
}
if(sd->status.inventory[n].equip & EQP_SHOES)
clif->changelook(&sd->bl,LOOK_SHOES,0);
- if( sd->status.inventory[n].equip&EQP_GARMENT && iPc->checkequip(sd,EQP_COSTUME_GARMENT) == -1 ) {
+ if( sd->status.inventory[n].equip&EQP_GARMENT && pc->checkequip(sd,EQP_COSTUME_GARMENT) == -1 ) {
sd->status.robe = 0;
clif->changelook(&sd->bl, LOOK_ROBE, 0);
}
if(sd->status.inventory[n].equip & EQP_COSTUME_GARMENT) {
- sd->status.robe = ( iPc->checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[iPc->checkequip(sd,EQP_GARMENT)]->look : 0;
+ sd->status.robe = ( pc->checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_GARMENT)]->look : 0;
clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
}
@@ -8818,7 +8818,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
}
if(flag&1 || status_cacl) {
- iPc->checkallowskill(sd);
+ pc->checkallowskill(sd);
status_calc_pc(sd,0);
}
@@ -8869,7 +8869,7 @@ int pc_checkitem(struct map_session_data *sd)
if( id && !itemdb_available(id) ) {
ShowWarning("Removed invalid/disabled item id %d from inventory (amount=%d, char_id=%d).\n", id, sd->status.inventory[i].amount, sd->status.char_id);
- iPc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
+ pc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
}
}
@@ -8878,7 +8878,7 @@ int pc_checkitem(struct map_session_data *sd)
if( id && !itemdb_available(id) ) {
ShowWarning("Removed invalid/disabled item id %d from cart (amount=%d, char_id=%d).\n", id, sd->status.cart[i].amount, sd->status.char_id);
- iPc->cart_delitem(sd, i, sd->status.cart[i].amount, 0, LOG_TYPE_OTHER);
+ pc->cart_delitem(sd, i, sd->status.cart[i].amount, 0, LOG_TYPE_OTHER);
}
}
}
@@ -8891,8 +8891,8 @@ int pc_checkitem(struct map_session_data *sd)
if( !sd->status.inventory[i].equip )
continue;
- if( sd->status.inventory[i].equip&~iPc->equippoint(sd,i) ) {
- iPc->unequipitem(sd, i, 2);
+ if( sd->status.inventory[i].equip&~pc->equippoint(sd,i) ) {
+ pc->unequipitem(sd, i, 2);
calc_flag = 1;
continue;
}
@@ -8900,7 +8900,7 @@ int pc_checkitem(struct map_session_data *sd)
}
if( calc_flag && sd->state.active ) {
- iPc->checkallowskill(sd);
+ pc->checkallowskill(sd);
status_calc_pc(sd,0);
}
@@ -8959,8 +8959,8 @@ int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
- if( iPc->calc_pvprank(sd) > 0 )
- sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+PVP_CALCRANK_INTERVAL,iPc->calc_pvprank_timer,id,data);
+ if( pc->calc_pvprank(sd) > 0 )
+ sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+PVP_CALCRANK_INTERVAL,pc->calc_pvprank_timer,id,data);
return 0;
}
@@ -9007,7 +9007,7 @@ int pc_divorce(struct map_session_data *sd)
struct map_session_data *p_sd;
int i;
- if( sd == NULL || !iPc->ismarried(sd) )
+ if( sd == NULL || !pc->ismarried(sd) )
return -1;
if( !sd->status.partner_id )
@@ -9027,9 +9027,9 @@ int pc_divorce(struct map_session_data *sd)
for( i = 0; i < MAX_INVENTORY; i++ )
{
if( sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F )
- iPc->delitem(sd, i, 1, 0, 0, LOG_TYPE_OTHER);
+ pc->delitem(sd, i, 1, 0, 0, LOG_TYPE_OTHER);
if( p_sd->status.inventory[i].nameid == WEDDING_RING_M || p_sd->status.inventory[i].nameid == WEDDING_RING_F )
- iPc->delitem(p_sd, i, 1, 0, 0, LOG_TYPE_OTHER);
+ pc->delitem(p_sd, i, 1, 0, 0, LOG_TYPE_OTHER);
}
clif->divorced(sd, p_sd->status.name);
@@ -9043,7 +9043,7 @@ int pc_divorce(struct map_session_data *sd)
*------------------------------------------*/
struct map_session_data *pc_get_partner(struct map_session_data *sd)
{
- if (sd && iPc->ismarried(sd))
+ if (sd && pc->ismarried(sd))
// charid2sd returns NULL if not found
return iMap->charid2sd(sd->status.partner_id);
@@ -9079,7 +9079,7 @@ struct map_session_data *pc_get_mother (struct map_session_data *sd)
*------------------------------------------*/
struct map_session_data *pc_get_child (struct map_session_data *sd)
{
- if (sd && iPc->ismarried(sd) && sd->status.child > 0)
+ if (sd && pc->ismarried(sd) && sd->status.child > 0)
// charid2sd returns NULL if not found
return iMap->charid2sd(sd->status.child);
@@ -9277,7 +9277,7 @@ void pc_overheat(struct map_session_data *sd, int val) {
if( !pc_ismadogear(sd) || sd->sc.data[SC_OVERHEAT] )
return; // already burning
- skill = cap_value(iPc->checkskill(sd,NC_MAINFRAME),0,4);
+ skill = cap_value(pc->checkskill(sd,NC_MAINFRAME),0,4);
if( sd->sc.data[SC_OVERHEAT_LIMITPOINT] ) {
heat += sd->sc.data[SC_OVERHEAT_LIMITPOINT]->val1;
status_change_end(&sd->bl,SC_OVERHEAT_LIMITPOINT,INVALID_TIMER);
@@ -9531,7 +9531,7 @@ static bool pc_readdb_skilltree(char* fields[], int columns, int current)
ShowWarning("pc_readdb_skilltree: Invalid job class %d specified.\n", class_);
return false;
}
- idx = iPc->class2idx(class_);
+ idx = pc->class2idx(class_);
//This is to avoid adding two lines for the same skill. [Skotlex]
ARR_FIND( 0, MAX_SKILL_TREE, skill_idx, skill_tree[idx][skill_idx].id == 0 || skill_tree[idx][skill_idx].id == skill_id );
@@ -9638,7 +9638,7 @@ int pc_readdb(void)
maxlv = MAX_LEVEL;
}
count++;
- job = jobs[0] = iPc->class2idx(job_id);
+ job = jobs[0] = pc->class2idx(job_id);
//We send one less and then one more because the last entry in the exp array should hold 0.
max_level[job][type] = pc_split_atoui(split[3], exp_table[job][type],',',maxlv-1)+1;
//Reverse check in case the array has a bunch of trailing zeros... [Skotlex]
@@ -9663,7 +9663,7 @@ int pc_readdb(void)
ShowError("pc_readdb: Invalid job ID %d.\n", job_id);
continue;
}
- job = iPc->class2idx(job_id);
+ job = pc->class2idx(job_id);
memcpy(exp_table[job][type], exp_table[jobs[0]][type], sizeof(exp_table[0][0]));
max_level[job][type] = maxlv;
// ShowDebug("%s - Class %d: %u\n", type?"Job":"Base", job_id, max_level[job][type]);
@@ -9674,11 +9674,11 @@ int pc_readdb(void)
if (!pcdb_checkid(i)) continue;
if (i == JOB_WEDDING || i == JOB_XMAS || i == JOB_SUMMER)
continue; //Classes that do not need exp tables.
- j = iPc->class2idx(i);
+ j = pc->class2idx(i);
if (!max_level[j][0])
- ShowWarning("Class %s (%d) does not has a base exp table.\n", iPc->job_name(i), i);
+ ShowWarning("Class %s (%d) does not has a base exp table.\n", pc->job_name(i), i);
if (!max_level[j][1])
- ShowWarning("Class %s (%d) does not has a job exp table.\n", iPc->job_name(i), i);
+ ShowWarning("Class %s (%d) does not has a job exp table.\n", pc->job_name(i), i);
}
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,iMap->db_path,"exp.txt");
count = 0;
@@ -9784,10 +9784,10 @@ int pc_readdb(void)
}
// generate the remaining parts of the db if necessary
k = battle_config.use_statpoint_table; //save setting
- battle_config.use_statpoint_table = 0; //temporarily disable to force iPc->gets_status_point use default values
+ battle_config.use_statpoint_table = 0; //temporarily disable to force pc->gets_status_point use default values
statp[0] = 45; // seed value
for (; i <= MAX_LEVEL; i++)
- statp[i] = statp[i-1] + iPc->gets_status_point(i-1);
+ statp[i] = statp[i-1] + pc->gets_status_point(i-1);
battle_config.use_statpoint_table = k; //restore setting
return 0;
@@ -9844,16 +9844,16 @@ int do_init_pc(void) {
itemcd_db = idb_alloc(DB_OPT_RELEASE_DATA);
- iPc->readdb();
+ pc->readdb();
iTimer->add_timer_func_list(pc_invincible_timer, "pc_invincible_timer");
iTimer->add_timer_func_list(pc_eventtimer, "pc_eventtimer");
iTimer->add_timer_func_list(pc_inventory_rental_end, "pc_inventory_rental_end");
- iTimer->add_timer_func_list(iPc->calc_pvprank_timer, "iPc->calc_pvprank_timer");
+ iTimer->add_timer_func_list(pc->calc_pvprank_timer, "pc->calc_pvprank_timer");
iTimer->add_timer_func_list(pc_autosave, "pc_autosave");
iTimer->add_timer_func_list(pc_spiritball_timer, "pc_spiritball_timer");
iTimer->add_timer_func_list(pc_follow_timer, "pc_follow_timer");
- iTimer->add_timer_func_list(iPc->endautobonus, "iPc->endautobonus");
+ iTimer->add_timer_func_list(pc->endautobonus, "pc->endautobonus");
iTimer->add_timer_func_list(pc_talisman_timer, "pc_talisman_timer");
iTimer->add_timer(iTimer->gettick() + iMap->autosave_interval, pc_autosave, 0, 0);
@@ -9865,11 +9865,11 @@ int do_init_pc(void) {
int day_duration = battle_config.day_duration;
int night_duration = battle_config.night_duration;
// add night/day timer [Yor]
- iTimer->add_timer_func_list(iPc->map_day_timer, "iPc->map_day_timer");
- iTimer->add_timer_func_list(iPc->map_night_timer, "iPc->map_night_timer");
+ iTimer->add_timer_func_list(pc->map_day_timer, "pc->map_day_timer");
+ iTimer->add_timer_func_list(pc->map_night_timer, "pc->map_night_timer");
- iPc->day_timer_tid = iTimer->add_timer_interval(iTimer->gettick() + (iMap->night_flag ? 0 : day_duration) + night_duration, iPc->map_day_timer, 0, 0, day_duration + night_duration);
- iPc->night_timer_tid = iTimer->add_timer_interval(iTimer->gettick() + day_duration + (iMap->night_flag ? night_duration : 0), iPc->map_night_timer, 0, 0, day_duration + night_duration);
+ pc->day_timer_tid = iTimer->add_timer_interval(iTimer->gettick() + (iMap->night_flag ? 0 : day_duration) + night_duration, pc->map_day_timer, 0, 0, day_duration + night_duration);
+ pc->night_timer_tid = iTimer->add_timer_interval(iTimer->gettick() + day_duration + (iMap->night_flag ? night_duration : 0), pc->map_night_timer, 0, 0, day_duration + night_duration);
}
do_init_pc_groups();
@@ -9885,211 +9885,211 @@ int do_init_pc(void) {
* created by Susu
*-------------------------------------*/
void pc_defaults(void) {
- iPc = &iPc_s;
+ pc = &pc_s;
/* vars */
// timer for night.day
- iPc->day_timer_tid = day_timer_tid;
- iPc->night_timer_tid = night_timer_tid;
+ pc->day_timer_tid = day_timer_tid;
+ pc->night_timer_tid = night_timer_tid;
/* funcs */
- iPc->class2idx = pc_class2idx;
- iPc->get_group_level = pc_get_group_level;
- iPc->can_give_items = pc_can_give_items;
+ pc->class2idx = pc_class2idx;
+ pc->get_group_level = pc_get_group_level;
+ pc->can_give_items = pc_can_give_items;
- iPc->can_use_command = pc_can_use_command;
+ pc->can_use_command = pc_can_use_command;
- iPc->setrestartvalue = pc_setrestartvalue;
- iPc->makesavestatus = pc_makesavestatus;
- iPc->respawn = pc_respawn;
- iPc->setnewpc = pc_setnewpc;
- iPc->authok = pc_authok;
- iPc->authfail = pc_authfail;
- iPc->reg_received = pc_reg_received;
+ pc->setrestartvalue = pc_setrestartvalue;
+ pc->makesavestatus = pc_makesavestatus;
+ pc->respawn = pc_respawn;
+ pc->setnewpc = pc_setnewpc;
+ pc->authok = pc_authok;
+ pc->authfail = pc_authfail;
+ pc->reg_received = pc_reg_received;
- iPc->isequip = pc_isequip;
- iPc->equippoint = pc_equippoint;
- iPc->setinventorydata = pc_setinventorydata;
+ pc->isequip = pc_isequip;
+ pc->equippoint = pc_equippoint;
+ pc->setinventorydata = pc_setinventorydata;
- iPc->checkskill = pc_checkskill;
- iPc->checkskill2 = pc_checkskill2;
- iPc->checkallowskill = pc_checkallowskill;
- iPc->checkequip = pc_checkequip;
+ pc->checkskill = pc_checkskill;
+ pc->checkskill2 = pc_checkskill2;
+ pc->checkallowskill = pc_checkallowskill;
+ pc->checkequip = pc_checkequip;
- iPc->calc_skilltree = pc_calc_skilltree;
- iPc->calc_skilltree_normalize_job = pc_calc_skilltree_normalize_job;
- iPc->clean_skilltree = pc_clean_skilltree;
+ pc->calc_skilltree = pc_calc_skilltree;
+ pc->calc_skilltree_normalize_job = pc_calc_skilltree_normalize_job;
+ pc->clean_skilltree = pc_clean_skilltree;
- iPc->setpos = pc_setpos;
- iPc->setsavepoint = pc_setsavepoint;
- iPc->randomwarp = pc_randomwarp;
- iPc->memo = pc_memo;
+ pc->setpos = pc_setpos;
+ pc->setsavepoint = pc_setsavepoint;
+ pc->randomwarp = pc_randomwarp;
+ pc->memo = pc_memo;
- iPc->checkadditem = pc_checkadditem;
- iPc->inventoryblank = pc_inventoryblank;
- iPc->search_inventory = pc_search_inventory;
- iPc->payzeny = pc_payzeny;
- iPc->additem = pc_additem;
- iPc->getzeny = pc_getzeny;
- iPc->delitem = pc_delitem;
+ pc->checkadditem = pc_checkadditem;
+ pc->inventoryblank = pc_inventoryblank;
+ pc->search_inventory = pc_search_inventory;
+ pc->payzeny = pc_payzeny;
+ pc->additem = pc_additem;
+ pc->getzeny = pc_getzeny;
+ pc->delitem = pc_delitem;
// Special Shop System
- iPc->paycash = pc_paycash;
- iPc->getcash = pc_getcash;
+ pc->paycash = pc_paycash;
+ pc->getcash = pc_getcash;
- iPc->cart_additem = pc_cart_additem;
- iPc->cart_delitem = pc_cart_delitem;
- iPc->putitemtocart = pc_putitemtocart;
- iPc->getitemfromcart = pc_getitemfromcart;
- iPc->cartitem_amount = pc_cartitem_amount;
+ pc->cart_additem = pc_cart_additem;
+ pc->cart_delitem = pc_cart_delitem;
+ pc->putitemtocart = pc_putitemtocart;
+ pc->getitemfromcart = pc_getitemfromcart;
+ pc->cartitem_amount = pc_cartitem_amount;
- iPc->takeitem = pc_takeitem;
- iPc->dropitem = pc_dropitem;
+ pc->takeitem = pc_takeitem;
+ pc->dropitem = pc_dropitem;
- iPc->isequipped = pc_isequipped;
- iPc->can_Adopt = pc_can_Adopt;
- iPc->adoption = pc_adoption;
+ pc->isequipped = pc_isequipped;
+ pc->can_Adopt = pc_can_Adopt;
+ pc->adoption = pc_adoption;
- iPc->updateweightstatus = pc_updateweightstatus;
+ pc->updateweightstatus = pc_updateweightstatus;
- iPc->addautobonus = pc_addautobonus;
- iPc->exeautobonus = pc_exeautobonus;
- iPc->endautobonus = pc_endautobonus;
- iPc->delautobonus = pc_delautobonus;
+ pc->addautobonus = pc_addautobonus;
+ pc->exeautobonus = pc_exeautobonus;
+ pc->endautobonus = pc_endautobonus;
+ pc->delautobonus = pc_delautobonus;
- iPc->bonus = pc_bonus;
- iPc->bonus2 = pc_bonus2;
- iPc->bonus3 = pc_bonus3;
- iPc->bonus4 = pc_bonus4;
- iPc->bonus5 = pc_bonus5;
- iPc->skill = pc_skill;
+ pc->bonus = pc_bonus;
+ pc->bonus2 = pc_bonus2;
+ pc->bonus3 = pc_bonus3;
+ pc->bonus4 = pc_bonus4;
+ pc->bonus5 = pc_bonus5;
+ pc->skill = pc_skill;
- iPc->insert_card = pc_insert_card;
+ pc->insert_card = pc_insert_card;
- iPc->steal_item = pc_steal_item;
- iPc->steal_coin = pc_steal_coin;
+ pc->steal_item = pc_steal_item;
+ pc->steal_coin = pc_steal_coin;
- iPc->modifybuyvalue = pc_modifybuyvalue;
- iPc->modifysellvalue = pc_modifysellvalue;
+ pc->modifybuyvalue = pc_modifybuyvalue;
+ pc->modifysellvalue = pc_modifysellvalue;
- iPc->follow = pc_follow; // [MouseJstr]
- iPc->stop_following = pc_stop_following;
+ pc->follow = pc_follow; // [MouseJstr]
+ pc->stop_following = pc_stop_following;
- iPc->maxbaselv = pc_maxbaselv;
- iPc->maxjoblv = pc_maxjoblv;
- iPc->checkbaselevelup = pc_checkbaselevelup;
- iPc->checkjoblevelup = pc_checkjoblevelup;
- iPc->gainexp = pc_gainexp;
- iPc->nextbaseexp = pc_nextbaseexp;
- iPc->thisbaseexp = pc_thisbaseexp;
- iPc->nextjobexp = pc_nextjobexp;
- iPc->thisjobexp = pc_thisjobexp;
- iPc->gets_status_point = pc_gets_status_point;
- iPc->need_status_point = pc_need_status_point;
- iPc->statusup = pc_statusup;
- iPc->statusup2 = pc_statusup2;
- iPc->skillup = pc_skillup;
- iPc->allskillup = pc_allskillup;
- iPc->resetlvl = pc_resetlvl;
- iPc->resetstate = pc_resetstate;
- iPc->resetskill = pc_resetskill;
- iPc->resetfeel = pc_resetfeel;
- iPc->resethate = pc_resethate;
- iPc->equipitem = pc_equipitem;
- iPc->unequipitem = pc_unequipitem;
- iPc->checkitem = pc_checkitem;
- iPc->useitem = pc_useitem;
+ pc->maxbaselv = pc_maxbaselv;
+ pc->maxjoblv = pc_maxjoblv;
+ pc->checkbaselevelup = pc_checkbaselevelup;
+ pc->checkjoblevelup = pc_checkjoblevelup;
+ pc->gainexp = pc_gainexp;
+ pc->nextbaseexp = pc_nextbaseexp;
+ pc->thisbaseexp = pc_thisbaseexp;
+ pc->nextjobexp = pc_nextjobexp;
+ pc->thisjobexp = pc_thisjobexp;
+ pc->gets_status_point = pc_gets_status_point;
+ pc->need_status_point = pc_need_status_point;
+ pc->statusup = pc_statusup;
+ pc->statusup2 = pc_statusup2;
+ pc->skillup = pc_skillup;
+ pc->allskillup = pc_allskillup;
+ pc->resetlvl = pc_resetlvl;
+ pc->resetstate = pc_resetstate;
+ pc->resetskill = pc_resetskill;
+ pc->resetfeel = pc_resetfeel;
+ pc->resethate = pc_resethate;
+ pc->equipitem = pc_equipitem;
+ pc->unequipitem = pc_unequipitem;
+ pc->checkitem = pc_checkitem;
+ pc->useitem = pc_useitem;
- iPc->skillatk_bonus = pc_skillatk_bonus;
- iPc->skillheal_bonus = pc_skillheal_bonus;
- iPc->skillheal2_bonus = pc_skillheal2_bonus;
+ pc->skillatk_bonus = pc_skillatk_bonus;
+ pc->skillheal_bonus = pc_skillheal_bonus;
+ pc->skillheal2_bonus = pc_skillheal2_bonus;
- iPc->damage = pc_damage;
- iPc->dead = pc_dead;
- iPc->revive = pc_revive;
- iPc->heal = pc_heal;
- iPc->itemheal = pc_itemheal;
- iPc->percentheal = pc_percentheal;
- iPc->jobchange = pc_jobchange;
- iPc->setoption = pc_setoption;
- iPc->setcart = pc_setcart;
- iPc->setfalcon = pc_setfalcon;
- iPc->setriding = pc_setriding;
- iPc->setmadogear = pc_setmadogear;
- iPc->changelook = pc_changelook;
- iPc->equiplookall = pc_equiplookall;
+ pc->damage = pc_damage;
+ pc->dead = pc_dead;
+ pc->revive = pc_revive;
+ pc->heal = pc_heal;
+ pc->itemheal = pc_itemheal;
+ pc->percentheal = pc_percentheal;
+ pc->jobchange = pc_jobchange;
+ pc->setoption = pc_setoption;
+ pc->setcart = pc_setcart;
+ pc->setfalcon = pc_setfalcon;
+ pc->setriding = pc_setriding;
+ pc->setmadogear = pc_setmadogear;
+ pc->changelook = pc_changelook;
+ pc->equiplookall = pc_equiplookall;
- iPc->readparam = pc_readparam;
- iPc->setparam = pc_setparam;
- iPc->readreg = pc_readreg;
- iPc->setreg = pc_setreg;
- iPc->readregstr = pc_readregstr;
- iPc->setregstr = pc_setregstr;
- iPc->readregistry = pc_readregistry;
- iPc->setregistry = pc_setregistry;
- iPc->readregistry_str = pc_readregistry_str;
- iPc->setregistry_str = pc_setregistry_str;
+ pc->readparam = pc_readparam;
+ pc->setparam = pc_setparam;
+ pc->readreg = pc_readreg;
+ pc->setreg = pc_setreg;
+ pc->readregstr = pc_readregstr;
+ pc->setregstr = pc_setregstr;
+ pc->readregistry = pc_readregistry;
+ pc->setregistry = pc_setregistry;
+ pc->readregistry_str = pc_readregistry_str;
+ pc->setregistry_str = pc_setregistry_str;
- iPc->addeventtimer = pc_addeventtimer;
- iPc->deleventtimer = pc_deleventtimer;
- iPc->cleareventtimer = pc_cleareventtimer;
- iPc->addeventtimercount = pc_addeventtimercount;
+ pc->addeventtimer = pc_addeventtimer;
+ pc->deleventtimer = pc_deleventtimer;
+ pc->cleareventtimer = pc_cleareventtimer;
+ pc->addeventtimercount = pc_addeventtimercount;
- iPc->calc_pvprank = pc_calc_pvprank;
- iPc->calc_pvprank_timer = pc_calc_pvprank_timer;
+ pc->calc_pvprank = pc_calc_pvprank;
+ pc->calc_pvprank_timer = pc_calc_pvprank_timer;
- iPc->ismarried = pc_ismarried;
- iPc->marriage = pc_marriage;
- iPc->divorce = pc_divorce;
- iPc->get_partner = pc_get_partner;
- iPc->get_father = pc_get_father;
- iPc->get_mother = pc_get_mother;
- iPc->get_child = pc_get_child;
+ pc->ismarried = pc_ismarried;
+ pc->marriage = pc_marriage;
+ pc->divorce = pc_divorce;
+ pc->get_partner = pc_get_partner;
+ pc->get_father = pc_get_father;
+ pc->get_mother = pc_get_mother;
+ pc->get_child = pc_get_child;
- iPc->bleeding = pc_bleeding;
- iPc->regen = pc_regen;
+ pc->bleeding = pc_bleeding;
+ pc->regen = pc_regen;
- iPc->setstand = pc_setstand;
- iPc->candrop = pc_candrop;
+ pc->setstand = pc_setstand;
+ pc->candrop = pc_candrop;
- iPc->jobid2mapid = pc_jobid2mapid; // Skotlex
- iPc->mapid2jobid = pc_mapid2jobid; // Skotlex
+ pc->jobid2mapid = pc_jobid2mapid; // Skotlex
+ pc->mapid2jobid = pc_mapid2jobid; // Skotlex
- iPc->job_name = job_name;
+ pc->job_name = job_name;
- iPc->setinvincibletimer = pc_setinvincibletimer;
- iPc->delinvincibletimer = pc_delinvincibletimer;
+ pc->setinvincibletimer = pc_setinvincibletimer;
+ pc->delinvincibletimer = pc_delinvincibletimer;
- iPc->addspiritball = pc_addspiritball;
- iPc->delspiritball = pc_delspiritball;
- iPc->addfame = pc_addfame;
- iPc->famerank = pc_famerank;
- iPc->set_hate_mob = pc_set_hate_mob;
+ pc->addspiritball = pc_addspiritball;
+ pc->delspiritball = pc_delspiritball;
+ pc->addfame = pc_addfame;
+ pc->famerank = pc_famerank;
+ pc->set_hate_mob = pc_set_hate_mob;
- iPc->readdb = pc_readdb;
- iPc->do_init_pc = do_init_pc;
- iPc->do_final_pc = do_final_pc;
- iPc->map_day_timer = map_day_timer; // by [yor]
- iPc->map_night_timer = map_night_timer; // by [yor]
+ pc->readdb = pc_readdb;
+ pc->do_init_pc = do_init_pc;
+ pc->do_final_pc = do_final_pc;
+ pc->map_day_timer = map_day_timer; // by [yor]
+ pc->map_night_timer = map_night_timer; // by [yor]
// Rental System
- iPc->inventory_rentals = pc_inventory_rentals;
- iPc->inventory_rental_clear = pc_inventory_rental_clear;
- iPc->inventory_rental_add = pc_inventory_rental_add;
+ pc->inventory_rentals = pc_inventory_rentals;
+ pc->inventory_rental_clear = pc_inventory_rental_clear;
+ pc->inventory_rental_add = pc_inventory_rental_add;
- iPc->disguise = pc_disguise;
- iPc->isautolooting = pc_isautolooting;
+ pc->disguise = pc_disguise;
+ pc->isautolooting = pc_isautolooting;
- iPc->overheat = pc_overheat;
+ pc->overheat = pc_overheat;
- iPc->banding = pc_banding;
+ pc->banding = pc_banding;
- iPc->itemcd_do = pc_itemcd_do;
+ pc->itemcd_do = pc_itemcd_do;
- iPc->load_combo = pc_load_combo;
+ pc->load_combo = pc_load_combo;
- iPc->add_talisman = pc_add_talisman;
- iPc->del_talisman = pc_del_talisman;
+ pc->add_talisman = pc_add_talisman;
+ pc->del_talisman = pc_del_talisman;
- iPc->baselevelchanged = pc_baselevelchanged;
- iPc->level_penalty_mod = pc_level_penalty_mod;
+ pc->baselevelchanged = pc_baselevelchanged;
+ pc->level_penalty_mod = pc_level_penalty_mod;
}