diff options
author | shennetsind <ind@henn.et> | 2013-06-08 17:20:12 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-08 17:20:12 -0300 |
commit | 27147633d447400d4a095a4166c64d3a0df4e078 (patch) | |
tree | 6fe2c0b85b7e4f124799bebe4aae3b225ea6b772 /src/map/script.c | |
parent | 97b6ba1229f845dc8ae47c91586a195a5bf37e9c (diff) | |
download | hercules-27147633d447400d4a095a4166c64d3a0df4e078.tar.gz hercules-27147633d447400d4a095a4166c64d3a0df4e078.tar.bz2 hercules-27147633d447400d4a095a4166c64d3a0df4e078.tar.xz hercules-27147633d447400d4a095a4166c64d3a0df4e078.zip |
Follow up d73783f22b2bb881aab74524d153d89a5932a199
Adjusting pc.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i')
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 342 |
1 files changed, 171 insertions, 171 deletions
diff --git a/src/map/script.c b/src/map/script.c index 9569e526d..608a1fcff 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2335,7 +2335,7 @@ void get_val(struct script_state* st, struct script_data* data) switch( prefix ) { case '@': - data->u.str = iPc->readregstr(sd, data->u.num); + data->u.str = pc->readregstr(sd, data->u.num); break; case '$': data->u.str = mapreg_readregstr(data->u.num); @@ -2394,13 +2394,13 @@ void get_val(struct script_state* st, struct script_data* data) } else if( reference_toparam(data) ) { - data->u.num = iPc->readparam(sd, reference_getparamtype(data)); + data->u.num = pc->readparam(sd, reference_getparamtype(data)); } else switch( prefix ) { case '@': - data->u.num = iPc->readreg(sd, data->u.num); + data->u.num = pc->readreg(sd, data->u.num); break; case '$': data->u.num = mapreg_readreg(data->u.num); @@ -2467,7 +2467,7 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam const char* str = (const char*)value; switch (prefix) { case '@': - return iPc->setregstr(sd, num, str); + return pc->setregstr(sd, num, str); case '$': return mapreg_setregstr(num, str); case '#': @@ -2499,7 +2499,7 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam int val = (int)__64BPTRSIZE(value); if(str_data[num&0x00ffffff].type == C_PARAM) { - if( iPc->setparam(sd, str_data[num&0x00ffffff].val, val) == 0 ) + if( pc->setparam(sd, str_data[num&0x00ffffff].val, val) == 0 ) { if( st != NULL ) { @@ -2514,7 +2514,7 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam switch (prefix) { case '@': - return iPc->setreg(sd, num, val); + return pc->setreg(sd, num, val); case '$': return mapreg_setreg(num, val); case '#': @@ -3706,14 +3706,14 @@ void script_cleararray_pc(struct map_session_data* sd, const char* varname, void { for( idx = 0; idx < SCRIPT_MAX_ARRAYSIZE; idx++ ) { - iPc->setregstr(sd, reference_uid(key, idx), (const char*)value); + pc->setregstr(sd, reference_uid(key, idx), (const char*)value); } } else { for( idx = 0; idx < SCRIPT_MAX_ARRAYSIZE; idx++ ) { - iPc->setreg(sd, reference_uid(key, idx), (int)__64BPTRSIZE(value)); + pc->setreg(sd, reference_uid(key, idx), (int)__64BPTRSIZE(value)); } } } @@ -3741,11 +3741,11 @@ void script_setarray_pc(struct map_session_data* sd, const char* varname, uint8 if( is_string_variable(varname) ) { - iPc->setregstr(sd, reference_uid(key, idx), (const char*)value); + pc->setregstr(sd, reference_uid(key, idx), (const char*)value); } else { - iPc->setreg(sd, reference_uid(key, idx), (int)__64BPTRSIZE(value)); + pc->setreg(sd, reference_uid(key, idx), (int)__64BPTRSIZE(value)); } if( refcache ) @@ -4159,7 +4159,7 @@ BUILDIN(menu) st->state = END; return false; } - iPc->setreg(sd, add_str("@menu"), menu); + pc->setreg(sd, add_str("@menu"), menu); st->pos = script_getnum(st, i + 1); st->state = GOTO; } @@ -4236,7 +4236,7 @@ BUILDIN(select) if( sd->npc_menu <= 0 ) break;// entry found } - iPc->setreg(sd, add_str("@menu"), menu); + pc->setreg(sd, add_str("@menu"), menu); script_pushint(st, menu); st->state = RUN; } @@ -4307,7 +4307,7 @@ BUILDIN(prompt) else if( sd->npc_menu == 0xff ) {// Cancel was pressed sd->state.menu_or_input = 0; - iPc->setreg(sd, add_str("@menu"), 0xff); + pc->setreg(sd, add_str("@menu"), 0xff); script_pushint(st, 0xff); st->state = RUN; } @@ -4323,7 +4323,7 @@ BUILDIN(prompt) if( sd->npc_menu <= 0 ) break;// entry found } - iPc->setreg(sd, add_str("@menu"), menu); + pc->setreg(sd, add_str("@menu"), menu); script_pushint(st, menu); st->state = RUN; } @@ -4569,11 +4569,11 @@ BUILDIN(warp) y = script_getnum(st,4); if(strcmp(str,"Random")==0) - ret = iPc->randomwarp(sd,CLR_TELEPORT); + ret = pc->randomwarp(sd,CLR_TELEPORT); else if(strcmp(str,"SavePoint")==0 || strcmp(str,"Save")==0) - ret = iPc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); + ret = pc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); else - ret = iPc->setpos(sd,mapindex_name2id(str),x,y,CLR_OUTSIGHT); + ret = pc->setpos(sd,mapindex_name2id(str),x,y,CLR_OUTSIGHT); if( ret ) { ShowError("buildin_warp: moving player '%s' to \"%s\",%d,%d failed.\n", sd->status.name, str, x, y); @@ -4597,7 +4597,7 @@ static int buildin_areawarp_sub(struct block_list *bl,va_list ap) y3 = va_arg(ap,int); if(index == 0) - iPc->randomwarp((TBL_PC *)bl,CLR_TELEPORT); + pc->randomwarp((TBL_PC *)bl,CLR_TELEPORT); else if(x3 && y3) { int max, tx, ty, j = 0; @@ -4612,10 +4612,10 @@ static int buildin_areawarp_sub(struct block_list *bl,va_list ap) j++; } while( iMap->getcell(index,tx,ty,CELL_CHKNOPASS) && j < max ); - iPc->setpos((TBL_PC *)bl,index,tx,ty,CLR_OUTSIGHT); + pc->setpos((TBL_PC *)bl,index,tx,ty,CLR_OUTSIGHT); } else - iPc->setpos((TBL_PC *)bl,index,x2,y2,CLR_OUTSIGHT); + pc->setpos((TBL_PC *)bl,index,x2,y2,CLR_OUTSIGHT); return 0; } BUILDIN(areawarp) @@ -4665,7 +4665,7 @@ static int buildin_areapercentheal_sub(struct block_list *bl,va_list ap) int hp, sp; hp = va_arg(ap, int); sp = va_arg(ap, int); - iPc->percentheal((TBL_PC *)bl,hp,sp); + pc->percentheal((TBL_PC *)bl,hp,sp); return 0; } BUILDIN(areapercentheal) @@ -4711,12 +4711,12 @@ BUILDIN(warpchar) return true; if(strcmp(str, "Random") == 0) - iPc->randomwarp(sd, CLR_TELEPORT); + pc->randomwarp(sd, CLR_TELEPORT); else if(strcmp(str, "SavePoint") == 0) - iPc->setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); + pc->setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); else - iPc->setpos(sd, mapindex_name2id(str), x, y, CLR_TELEPORT); + pc->setpos(sd, mapindex_name2id(str), x, y, CLR_TELEPORT); return true; } @@ -4790,20 +4790,20 @@ BUILDIN(warpparty) { case 0: // Random if(!map[pl_sd->bl.m].flag.nowarp) - iPc->randomwarp(pl_sd,CLR_TELEPORT); + pc->randomwarp(pl_sd,CLR_TELEPORT); break; case 1: // SavePointAll if(!map[pl_sd->bl.m].flag.noreturn) - iPc->setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT); + pc->setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT); break; case 2: // SavePoint if(!map[pl_sd->bl.m].flag.noreturn) - iPc->setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); + pc->setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); break; case 3: // Leader case 4: // m,x,y if(!map[pl_sd->bl.m].flag.noreturn && !map[pl_sd->bl.m].flag.nowarp) - iPc->setpos(pl_sd,mapindex,x,y,CLR_TELEPORT); + pc->setpos(pl_sd,mapindex,x,y,CLR_TELEPORT); break; } } @@ -4851,19 +4851,19 @@ BUILDIN(warpguild) { case 0: // Random if(!map[pl_sd->bl.m].flag.nowarp) - iPc->randomwarp(pl_sd,CLR_TELEPORT); + pc->randomwarp(pl_sd,CLR_TELEPORT); break; case 1: // SavePointAll if(!map[pl_sd->bl.m].flag.noreturn) - iPc->setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT); + pc->setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT); break; case 2: // SavePoint if(!map[pl_sd->bl.m].flag.noreturn) - iPc->setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); + pc->setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); break; case 3: // m,x,y if(!map[pl_sd->bl.m].flag.noreturn && !map[pl_sd->bl.m].flag.nowarp) - iPc->setpos(pl_sd,mapindex_name2id(str),x,y,CLR_TELEPORT); + pc->setpos(pl_sd,mapindex_name2id(str),x,y,CLR_TELEPORT); break; } } @@ -4906,7 +4906,7 @@ BUILDIN(itemheal) sd = script_rid2sd(st); if (!sd) return true; - iPc->itemheal(sd,sd->itemid,hp,sp); + pc->itemheal(sd,sd->itemid,hp,sp); return true; } /*========================================== @@ -4933,7 +4933,7 @@ BUILDIN(percentheal) if( sd->sc.data[SC_EXTREMITYFIST2] ) sp = 0; #endif - iPc->percentheal(sd,hp,sp); + pc->percentheal(sd,hp,sp); return true; } @@ -4956,7 +4956,7 @@ BUILDIN(jobchange) if( sd == NULL ) return true; - iPc->jobchange(sd, job, upper); + pc->jobchange(sd, job, upper); } return true; @@ -4968,7 +4968,7 @@ BUILDIN(jobchange) BUILDIN(jobname) { int class_=script_getnum(st,2); - script_pushconststr(st, (char*)iPc->job_name(class_)); + script_pushconststr(st, (char*)pc->job_name(class_)); return true; } @@ -5530,7 +5530,7 @@ BUILDIN(setlook) if( sd == NULL ) return true; - iPc->changelook(sd,type,val); + pc->changelook(sd,type,val); return true; } @@ -5719,7 +5719,7 @@ BUILDIN(checkweight) script_pushint(st,0); return false; } - slots = iPc->inventoryblank(sd); //nb of empty slot + slots = pc->inventoryblank(sd); //nb of empty slot for(i=2; i<nbargs; i=i+2){ data = script_getdata(st,i); @@ -5750,7 +5750,7 @@ BUILDIN(checkweight) return true; } - switch( iPc->checkadditem(sd, nameid, amount) ) + switch( pc->checkadditem(sd, nameid, amount) ) { case ADDITEM_EXIST: // item is already in inventory, but there is still space for the requested amount @@ -5833,7 +5833,7 @@ BUILDIN(checkweight2) fail = 1; } - slots = iPc->inventoryblank(sd); + slots = pc->inventoryblank(sd); for(i=0; i<nb_it; i++){ nameid = (int32)__64BPTRSIZE(get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it))); script_removetop(st, -1, 0); @@ -5856,7 +5856,7 @@ BUILDIN(checkweight2) fail = 1; continue; } - switch( iPc->checkadditem(sd, nameid, amount) ) { + switch( pc->checkadditem(sd, nameid, amount) ) { case ADDITEM_EXIST: // item is already in inventory, but there is still space for the requested amount break; @@ -5950,10 +5950,10 @@ BUILDIN(getitem) // if not pet egg if (!pet_create_egg(sd, nameid)) { - if ((flag = iPc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) + if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); - if( iPc->candrop(sd,&it) ) + if( pc->candrop(sd,&it) ) iMap->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } @@ -6048,10 +6048,10 @@ BUILDIN(getitem2) // if not pet egg if (!pet_create_egg(sd, nameid)) { - if ((flag = iPc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) + if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); - if( iPc->candrop(sd,&item_tmp) ) + if( pc->candrop(sd,&item_tmp) ) iMap->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } @@ -6111,7 +6111,7 @@ BUILDIN(rentitem) it.identify = 1; it.expire_time = (unsigned int)(time(NULL) + seconds); - if( (flag = iPc->additem(sd, &it, 1, LOG_TYPE_SCRIPT)) ) + if( (flag = pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT)) ) { clif->additem(sd, 0, 0, flag); return false; @@ -6180,7 +6180,7 @@ BUILDIN(getnameditem) item_tmp.card[0]=CARD0_CREATE; //we don't use 255! because for example SIGNED WEAPON shouldn't get TOP10 BS Fame bonus [Lupus] item_tmp.card[2]=tsd->status.char_id; item_tmp.card[3]=tsd->status.char_id >> 16; - if(iPc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT)) { + if(pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT)) { script_pushint(st,0); return true; //Failed to add item, we will not drop if they don't fit } @@ -6272,7 +6272,7 @@ static void buildin_delitem_delete(struct map_session_data* sd, int idx, int* am {// delete associated pet intif_delete_petdata(MakeDWord(inv->card[1], inv->card[2])); } - iPc->delitem(sd, idx, delamount, 0, 0, LOG_TYPE_SCRIPT); + pc->delitem(sd, idx, delamount, 0, 0, LOG_TYPE_SCRIPT); } amount[0]-= delamount; @@ -6566,7 +6566,7 @@ BUILDIN(disableitemuse) /*========================================== * return the basic stats of sd - * chk iPc->readparam for available type + * chk pc->readparam for available type *------------------------------------------*/ BUILDIN(readparam) { @@ -6584,7 +6584,7 @@ BUILDIN(readparam) return true; } - script_pushint(st,iPc->readparam(sd,type)); + script_pushint(st,pc->readparam(sd,type)); return true; } @@ -6951,7 +6951,7 @@ BUILDIN(getequipid) } // get inventory position of item - i = iPc->checkequip(sd,equip[num]); + i = pc->checkequip(sd,equip[num]); if( i < 0 ) { script_pushint(st,-1); @@ -6989,7 +6989,7 @@ BUILDIN(getequipname) } // get inventory position of item - i = iPc->checkequip(sd,equip[num]); + i = pc->checkequip(sd,equip[num]); if( i < 0 ) { script_pushconststr(st,""); @@ -7108,7 +7108,7 @@ BUILDIN(getequipisequiped) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0) script_pushint(st,1); @@ -7135,7 +7135,7 @@ BUILDIN(getequipisenableref) return true; if( num > 0 && num <= ARRAYLENGTH(equip) ) - i = iPc->checkequip(sd,equip[num-1]); + i = pc->checkequip(sd,equip[num-1]); if( i >= 0 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine && !sd->status.inventory[i].expire_time ) script_pushint(st,1); else @@ -7161,7 +7161,7 @@ BUILDIN(getequipisidentify) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0) script_pushint(st,sd->status.inventory[i].identify); else @@ -7187,7 +7187,7 @@ BUILDIN(getequiprefinerycnt) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0) script_pushint(st,sd->status.inventory[i].refine); else @@ -7214,7 +7214,7 @@ BUILDIN(getequipweaponlv) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0 && sd->inventory_data[i]) script_pushint(st,sd->inventory_data[i]->wlv); else @@ -7240,7 +7240,7 @@ BUILDIN(getequippercentrefinery) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0 && sd->status.inventory[i].nameid && sd->status.inventory[i].refine < MAX_REFINE) script_pushint(st,status_get_refine_chance(itemdb_wlv(sd->status.inventory[i].nameid), (int)sd->status.inventory[i].refine)); else @@ -7263,7 +7263,7 @@ BUILDIN(successrefitem) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0) { ep=sd->status.inventory[i].equip; @@ -7271,7 +7271,7 @@ BUILDIN(successrefitem) logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]); sd->status.inventory[i].refine++; - iPc->unequipitem(sd,i,2); // status calc will happen in iPc->equipitem() below + pc->unequipitem(sd,i,2); // status calc will happen in pc->equipitem() below clif->refine(sd->fd,0,i,sd->status.inventory[i].refine); clif->delitem(sd,i,1,3); @@ -7280,7 +7280,7 @@ BUILDIN(successrefitem) logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]); clif->additem(sd,i,1,0); - iPc->equipitem(sd,i,ep); + pc->equipitem(sd,i,ep); clif->misceffect(&sd->bl,3); if(sd->status.inventory[i].refine == 10 && sd->status.inventory[i].card[0] == CARD0_FORGE && @@ -7288,13 +7288,13 @@ BUILDIN(successrefitem) ){ // Fame point system [DracoRPG] switch (sd->inventory_data[i]->wlv){ case 1: - iPc->addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point + pc->addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point break; case 2: - iPc->addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point + pc->addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point break; case 3: - iPc->addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point + pc->addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point break; } } @@ -7317,13 +7317,13 @@ BUILDIN(failedrefitem) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0) { sd->status.inventory[i].refine = 0; - iPc->unequipitem(sd,i,3); //recalculate bonus + pc->unequipitem(sd,i,3); //recalculate bonus clif->refine(sd->fd,1,i,sd->status.inventory[i].refine); //notify client of failure - iPc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); + pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); clif->misceffect(&sd->bl,2); // display failure effect } @@ -7345,7 +7345,7 @@ BUILDIN(downrefitem) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i = iPc->checkequip(sd,equip[num-1]); + i = pc->checkequip(sd,equip[num-1]); if(i >= 0) { ep = sd->status.inventory[i].equip; @@ -7353,7 +7353,7 @@ BUILDIN(downrefitem) logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]); sd->status.inventory[i].refine++; - iPc->unequipitem(sd,i,2); // status calc will happen in iPc->equipitem() below + pc->unequipitem(sd,i,2); // status calc will happen in pc->equipitem() below clif->refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2); clif->delitem(sd,i,1,3); @@ -7362,7 +7362,7 @@ BUILDIN(downrefitem) logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]); clif->additem(sd,i,1,0); - iPc->equipitem(sd,i,ep); + pc->equipitem(sd,i,ep); clif->misceffect(&sd->bl,2); } @@ -7383,10 +7383,10 @@ BUILDIN(delequip) return true; if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0) { - iPc->unequipitem(sd,i,3); //recalculate bonus - iPc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); + pc->unequipitem(sd,i,3); //recalculate bonus + pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); } return true; @@ -7405,7 +7405,7 @@ BUILDIN(statusup) if( sd == NULL ) return true; - iPc->statusup(sd,type); + pc->statusup(sd,type); return true; } @@ -7423,7 +7423,7 @@ BUILDIN(statusup2) if( sd == NULL ) return true; - iPc->statusup2(sd,type,val); + pc->statusup2(sd,type,val); return true; } @@ -7477,16 +7477,16 @@ BUILDIN(bonus) switch( script_lastdata(st)-2 ) { case 1: - iPc->bonus(sd, type, val1); + pc->bonus(sd, type, val1); break; case 2: val2 = script_getnum(st,4); - iPc->bonus2(sd, type, val1, val2); + pc->bonus2(sd, type, val1, val2); break; case 3: val2 = script_getnum(st,4); val3 = script_getnum(st,5); - iPc->bonus3(sd, type, val1, val2, val3); + pc->bonus3(sd, type, val1, val2, val3); break; case 4: if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) ) @@ -7496,7 +7496,7 @@ BUILDIN(bonus) val3 = script_getnum(st,5); val4 = script_getnum(st,6); - iPc->bonus4(sd, type, val1, val2, val3, val4); + pc->bonus4(sd, type, val1, val2, val3, val4); break; case 5: if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) ) @@ -7507,7 +7507,7 @@ BUILDIN(bonus) val3 = script_getnum(st,5); val4 = script_getnum(st,6); val5 = script_getnum(st,7); - iPc->bonus5(sd, type, val1, val2, val3, val4, val5); + pc->bonus5(sd, type, val1, val2, val3, val4, val5); break; default: ShowDebug("buildin_bonus: unexpected number of arguments (%d)\n", (script_lastdata(st) - 1)); @@ -7543,7 +7543,7 @@ BUILDIN(autobonus) if( script_hasdata(st,6) ) other_script = script_getstr(st,6); - if( iPc->addautobonus(sd->autobonus,ARRAYLENGTH(sd->autobonus), + if( pc->addautobonus(sd->autobonus,ARRAYLENGTH(sd->autobonus), bonus_script,rate,dur,atk_type,other_script,sd->status.inventory[current_equip_item_index].equip,false) ) { script_add_autobonus(bonus_script); @@ -7580,7 +7580,7 @@ BUILDIN(autobonus2) if( script_hasdata(st,6) ) other_script = script_getstr(st,6); - if( iPc->addautobonus(sd->autobonus2,ARRAYLENGTH(sd->autobonus2), + if( pc->addautobonus(sd->autobonus2,ARRAYLENGTH(sd->autobonus2), bonus_script,rate,dur,atk_type,other_script,sd->status.inventory[current_equip_item_index].equip,false) ) { script_add_autobonus(bonus_script); @@ -7615,7 +7615,7 @@ BUILDIN(autobonus3) if( script_hasdata(st,6) ) other_script = script_getstr(st,6); - if( iPc->addautobonus(sd->autobonus3,ARRAYLENGTH(sd->autobonus3), + if( pc->addautobonus(sd->autobonus3,ARRAYLENGTH(sd->autobonus3), bonus_script,rate,dur,atk_type,other_script,sd->status.inventory[current_equip_item_index].equip,true) ) { script_add_autobonus(bonus_script); @@ -7651,7 +7651,7 @@ BUILDIN(skill) level = script_getnum(st,3); if( script_hasdata(st,4) ) flag = script_getnum(st,4); - iPc->skill(sd, id, level, flag); + pc->skill(sd, id, level, flag); return true; } @@ -7680,7 +7680,7 @@ BUILDIN(addtoskill) level = script_getnum(st,3); if( script_hasdata(st,4) ) flag = script_getnum(st,4); - iPc->skill(sd, id, level, flag); + pc->skill(sd, id, level, flag); return true; } @@ -7722,7 +7722,7 @@ BUILDIN(getskilllv) return true;// no player attached, report source id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) ); - script_pushint(st, iPc->checkskill(sd,id)); + script_pushint(st, pc->checkskill(sd,id)); return true; } @@ -7770,7 +7770,7 @@ BUILDIN(getgmlevel) if( sd == NULL ) return true;// no player attached, report source - script_pushint(st, iPc->get_group_level(sd)); + script_pushint(st, pc->get_group_level(sd)); return true; } @@ -7891,9 +7891,9 @@ BUILDIN(setoption) if( flag ){// Add option if( option&OPTION_WEDDING && !battle_config.wedding_modifydisplay ) option &= ~OPTION_WEDDING;// Do not show the wedding sprites - iPc->setoption(sd, sd->sc.option|option); + pc->setoption(sd, sd->sc.option|option); } else// Remove option - iPc->setoption(sd, sd->sc.option&~option); + pc->setoption(sd, sd->sc.option&~option); return true; } @@ -7941,7 +7941,7 @@ BUILDIN(setcart) if( script_hasdata(st,2) ) type = script_getnum(st,2); - iPc->setcart(sd, type); + pc->setcart(sd, type); return true; } @@ -7984,7 +7984,7 @@ BUILDIN(setfalcon) if( script_hasdata(st,2) ) flag = script_getnum(st,2); - iPc->setfalcon(sd, flag); + pc->setfalcon(sd, flag); return true; } @@ -8026,7 +8026,7 @@ BUILDIN(setriding) if( script_hasdata(st,2) ) flag = script_getnum(st,2); - iPc->setriding(sd, flag); + pc->setriding(sd, flag); return true; } @@ -8087,7 +8087,7 @@ BUILDIN(setmadogear) if( script_hasdata(st,2) ) flag = script_getnum(st,2); - iPc->setmadogear(sd, flag); + pc->setmadogear(sd, flag); return true; } @@ -8113,7 +8113,7 @@ BUILDIN(savepoint) y = script_getnum(st,4); map = mapindex_name2id(str); if( map ) - iPc->setsavepoint(sd, map, x, y); + pc->setsavepoint(sd, map, x, y); return true; } @@ -8360,7 +8360,7 @@ BUILDIN(getexp) base = (int) cap_value(base * bonus, 0, INT_MAX); job = (int) cap_value(job * bonus, 0, INT_MAX); - iPc->gainexp(sd, NULL, base, job, true); + pc->gainexp(sd, NULL, base, job, true); return true; } @@ -8789,7 +8789,7 @@ BUILDIN(addtimer) if( sd == NULL ) return true; - iPc->addeventtimer(sd,tick,event); + pc->addeventtimer(sd,tick,event); return true; } /*========================================== @@ -8805,7 +8805,7 @@ BUILDIN(deltimer) return true; check_event(st, event); - iPc->deleventtimer(sd,event); + pc->deleventtimer(sd,event); return true; } /*========================================== @@ -8823,7 +8823,7 @@ BUILDIN(addtimercount) return true; check_event(st, event); - iPc->addeventtimercount(sd,event,tick); + pc->addeventtimercount(sd,event,tick); return true; } @@ -9292,11 +9292,11 @@ BUILDIN(getusersname) sd = script_rid2sd(st); if (!sd) return true; - group_level = iPc->get_group_level(sd); + group_level = pc->get_group_level(sd); iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { - if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && iPc->get_group_level(pl_sd) > group_level) + if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > group_level) continue; // skip hidden sessions /* Temporary fix for bugreport:1023. @@ -9833,7 +9833,7 @@ BUILDIN(eaclass) } class_ = sd->status.class_; } - script_pushint(st,iPc->jobid2mapid(class_)); + script_pushint(st,pc->jobid2mapid(class_)); return true; } @@ -9850,7 +9850,7 @@ BUILDIN(roclass) else sex = 1; //Just use male when not found. } - script_pushint(st,iPc->mapid2jobid(class_, sex)); + script_pushint(st,pc->mapid2jobid(class_, sex)); return true; } @@ -9891,7 +9891,7 @@ BUILDIN(resetlvl) if( sd == NULL ) return true; - iPc->resetlvl(sd,type); + pc->resetlvl(sd,type); return true; } /*========================================== @@ -9901,7 +9901,7 @@ BUILDIN(resetstatus) { TBL_PC *sd; sd=script_rid2sd(st); - iPc->resetstate(sd); + pc->resetstate(sd); return true; } @@ -9912,7 +9912,7 @@ BUILDIN(resetskill) { TBL_PC *sd; sd=script_rid2sd(st); - iPc->resetskill(sd,1); + pc->resetskill(sd,1); return true; } @@ -9923,7 +9923,7 @@ BUILDIN(skillpointcount) { TBL_PC *sd; sd=script_rid2sd(st); - script_pushint(st,sd->status.skill_point + iPc->resetskill(sd,2)); + script_pushint(st,sd->status.skill_point + pc->resetskill(sd,2)); return true; } @@ -9974,10 +9974,10 @@ BUILDIN(changesex) TBL_PC *sd = NULL; sd = script_rid2sd(st); - iPc->resetskill(sd,4); + pc->resetskill(sd,4); // to avoid any problem with equipment and invalid sex, equipment is unequiped. for( i=0; i<EQI_MAX; i++ ) - if( sd->equip_index[i] >= 0 ) iPc->unequipitem(sd, sd->equip_index[i], 3); + if( sd->equip_index[i] >= 0 ) pc->unequipitem(sd, sd->equip_index[i], 3); chrif_changesex(sd); return true; } @@ -10202,17 +10202,17 @@ BUILDIN(warpwaitingpc) {// no zeny to cover set fee break; } - iPc->payzeny(sd, cd->zeny, LOG_TYPE_NPC, NULL); + pc->payzeny(sd, cd->zeny, LOG_TYPE_NPC, NULL); } mapreg_setreg(reference_uid(add_str("$@warpwaitingpc"), i), sd->bl.id); if( strcmp(map_name,"Random") == 0 ) - iPc->randomwarp(sd,CLR_TELEPORT); + pc->randomwarp(sd,CLR_TELEPORT); else if( strcmp(map_name,"SavePoint") == 0 ) - iPc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); + pc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); else - iPc->setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT); + pc->setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT); } mapreg_setreg(add_str("$@warpwaitingpcnum"), i); return true; @@ -10368,7 +10368,7 @@ BUILDIN(getmapflag) static int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) { TBL_PC* sd = (TBL_PC*)bl; if (sd->pvp_timer == INVALID_TIMER) { - sd->pvp_timer = iTimer->add_timer(iTimer->gettick() + 200, iPc->calc_pvprank_timer, sd->bl.id, 0); + sd->pvp_timer = iTimer->add_timer(iTimer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; sd->pvp_point = 5; @@ -10599,7 +10599,7 @@ BUILDIN(pvpon) if( sd->bl.m != m || sd->pvp_timer != INVALID_TIMER ) continue; // not applicable - sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+200,iPc->calc_pvprank_timer,sd->bl.id,0); + sd->pvp_timer = iTimer->add_timer(iTimer->gettick()+200,pc->calc_pvprank_timer,sd->bl.id,0); sd->pvp_rank = 0; sd->pvp_lastusers = 0; sd->pvp_point = 5; @@ -10616,7 +10616,7 @@ static int buildin_pvpoff_sub(struct block_list *bl,va_list ap) TBL_PC* sd = (TBL_PC*)bl; clif->pvpset(sd, 0, 0, 2); if (sd->pvp_timer != INVALID_TIMER) { - 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; } return 0; @@ -10735,7 +10735,7 @@ static int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list (sd->status.guild_id != g_id && flag&2) || //Warp out outsiders (sd->status.guild_id == 0) // Warp out players not in guild [Valaris] ) - iPc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); + pc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT); return 1; } @@ -10936,8 +10936,8 @@ BUILDIN(requestguildinfo) } /// Returns the number of cards that have been compounded onto the specified equipped item. -/// getequipcardcnt(<equipment slot>); -BUILDIN(getequipcardcnt) +/// getequpcardcnt(<equipment slot>); +BUILDIN(getequpcardcnt) { int i=-1,j,num; TBL_PC *sd; @@ -10946,7 +10946,7 @@ BUILDIN(getequipcardcnt) num=script_getnum(st,2); sd=script_rid2sd(st); if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if (i < 0 || !sd->inventory_data[i]) { script_pushint(st,0); @@ -10978,7 +10978,7 @@ BUILDIN(successremovecards) { int num = script_getnum(st,2); if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if (i < 0 || !sd->inventory_data[i]) { return true; @@ -10996,7 +10996,7 @@ BUILDIN(successremovecards) { item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; - if((flag=iPc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // get back the cart in inventory + if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // get back the cart in inventory clif->additem(sd,0,0,flag); iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } @@ -11017,8 +11017,8 @@ BUILDIN(successremovecards) { for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) item_tmp.card[j]=sd->status.inventory[i].card[j]; - iPc->delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT); - if((flag=iPc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor + pc->delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT); + if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor clif->additem(sd,0,0,flag); iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } @@ -11042,7 +11042,7 @@ BUILDIN(failedremovecards) { int typefail = script_getnum(st,3); if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if (i < 0 || !sd->inventory_data[i]) return true; @@ -11063,7 +11063,7 @@ BUILDIN(failedremovecards) { item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; - if((flag=iPc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ + if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ clif->additem(sd,0,0,flag); iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } @@ -11073,7 +11073,7 @@ BUILDIN(failedremovecards) { if(cardflag == 1) { if(typefail == 0 || typefail == 2){ // destroy the item - iPc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); + pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); } if(typefail == 1){ // destroy the card int flag; @@ -11090,9 +11090,9 @@ BUILDIN(failedremovecards) { for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) item_tmp.card[j]=sd->status.inventory[i].card[j]; - iPc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); + pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); - if((flag=iPc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ + if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ clif->additem(sd,0,0,flag); iMap->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } @@ -11138,7 +11138,7 @@ BUILDIN(mapwarp) // Added by RoVeRT for( i=0; i < g->max_member; i++) { if(g->member[i].sd && g->member[i].sd->bl.m==m){ - iPc->setpos(g->member[i].sd,index,x,y,CLR_TELEPORT); + pc->setpos(g->member[i].sd,index,x,y,CLR_TELEPORT); } } } @@ -11148,7 +11148,7 @@ BUILDIN(mapwarp) // Added by RoVeRT if(p){ for(i=0;i<MAX_PARTY; i++){ if(p->data[i].sd && p->data[i].sd->bl.m == m){ - iPc->setpos(p->data[i].sd,index,x,y,CLR_TELEPORT); + pc->setpos(p->data[i].sd,index,x,y,CLR_TELEPORT); } } } @@ -11211,7 +11211,7 @@ BUILDIN(marriage) TBL_PC *sd=script_rid2sd(st); TBL_PC *p_sd=iMap->nick2sd(partner); - if(sd==NULL || p_sd==NULL || iPc->marriage(sd,p_sd) < 0){ + if(sd==NULL || p_sd==NULL || pc->marriage(sd,p_sd) < 0){ script_pushint(st,0); return true; } @@ -11233,7 +11233,7 @@ BUILDIN(wedding_effect) BUILDIN(divorce) { TBL_PC *sd=script_rid2sd(st); - if(sd==NULL || iPc->divorce(sd) < 0){ + if(sd==NULL || pc->divorce(sd) < 0){ script_pushint(st,0); return true; } @@ -11245,7 +11245,7 @@ BUILDIN(ispartneron) { TBL_PC *sd=script_rid2sd(st); - if(sd==NULL || !iPc->ismarried(sd) || + if(sd==NULL || !pc->ismarried(sd) || iMap->charid2sd(sd->status.partner_id) == NULL) { script_pushint(st,0); return true; @@ -11311,7 +11311,7 @@ BUILDIN(warppartner) TBL_PC *sd=script_rid2sd(st); TBL_PC *p_sd=NULL; - if(sd==NULL || !iPc->ismarried(sd) || + if(sd==NULL || !pc->ismarried(sd) || (p_sd=iMap->charid2sd(sd->status.partner_id)) == NULL) { script_pushint(st,0); return true; @@ -11323,7 +11323,7 @@ BUILDIN(warppartner) mapindex = mapindex_name2id(str); if (mapindex) { - iPc->setpos(p_sd,mapindex,x,y,CLR_OUTSIGHT); + pc->setpos(p_sd,mapindex,x,y,CLR_OUTSIGHT); script_pushint(st,1); } else script_pushint(st,0); @@ -11618,7 +11618,7 @@ BUILDIN(setiteminfo) /*========================================== * Returns value from equipped item slot n [Lupus] - getequipcardid(num,slot) + getequpcardid(num,slot) where num = eqip position slot slot = 0,1,2,3 (Card Slot N) @@ -11628,7 +11628,7 @@ BUILDIN(setiteminfo) Useful for such quests as "Sign this refined item with players name" etc Hat[0] +4 -> Player's Hat[0] +4 *------------------------------------------*/ -BUILDIN(getequipcardid) +BUILDIN(getequpcardid) { int i=-1,num,slot; TBL_PC *sd; @@ -11637,7 +11637,7 @@ BUILDIN(getequipcardid) slot=script_getnum(st,3); sd=script_rid2sd(st); if (num > 0 && num <= ARRAYLENGTH(equip)) - i=iPc->checkequip(sd,equip[num-1]); + i=pc->checkequip(sd,equip[num-1]); if(i >= 0 && slot>=0 && slot<4) script_pushint(st,sd->status.inventory[i].card[slot]); else @@ -11735,22 +11735,22 @@ BUILDIN(getinventorylist) if(!sd) return true; for(i=0;i<MAX_INVENTORY;i++){ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0){ - iPc->setreg(sd,reference_uid(add_str("@inventorylist_id"), j),sd->status.inventory[i].nameid); - iPc->setreg(sd,reference_uid(add_str("@inventorylist_amount"), j),sd->status.inventory[i].amount); - iPc->setreg(sd,reference_uid(add_str("@inventorylist_equip"), j),sd->status.inventory[i].equip); - iPc->setreg(sd,reference_uid(add_str("@inventorylist_refine"), j),sd->status.inventory[i].refine); - iPc->setreg(sd,reference_uid(add_str("@inventorylist_identify"), j),sd->status.inventory[i].identify); - iPc->setreg(sd,reference_uid(add_str("@inventorylist_attribute"), j),sd->status.inventory[i].attribute); + pc->setreg(sd,reference_uid(add_str("@inventorylist_id"), j),sd->status.inventory[i].nameid); + pc->setreg(sd,reference_uid(add_str("@inventorylist_amount"), j),sd->status.inventory[i].amount); + pc->setreg(sd,reference_uid(add_str("@inventorylist_equip"), j),sd->status.inventory[i].equip); + pc->setreg(sd,reference_uid(add_str("@inventorylist_refine"), j),sd->status.inventory[i].refine); + pc->setreg(sd,reference_uid(add_str("@inventorylist_identify"), j),sd->status.inventory[i].identify); + pc->setreg(sd,reference_uid(add_str("@inventorylist_attribute"), j),sd->status.inventory[i].attribute); for (k = 0; k < MAX_SLOTS; k++) { sprintf(card_var, "@inventorylist_card%d",k+1); - iPc->setreg(sd,reference_uid(add_str(card_var), j),sd->status.inventory[i].card[k]); + pc->setreg(sd,reference_uid(add_str(card_var), j),sd->status.inventory[i].card[k]); } - iPc->setreg(sd,reference_uid(add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time); + pc->setreg(sd,reference_uid(add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time); j++; } } - iPc->setreg(sd,add_str("@inventorylist_count"),j); + pc->setreg(sd,add_str("@inventorylist_count"),j); return true; } @@ -11761,13 +11761,13 @@ BUILDIN(getskilllist) if(!sd) return true; for(i=0;i<MAX_SKILL;i++){ if(sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0){ - iPc->setreg(sd,reference_uid(add_str("@skilllist_id"), j),sd->status.skill[i].id); - iPc->setreg(sd,reference_uid(add_str("@skilllist_lv"), j),sd->status.skill[i].lv); - iPc->setreg(sd,reference_uid(add_str("@skilllist_flag"), j),sd->status.skill[i].flag); + pc->setreg(sd,reference_uid(add_str("@skilllist_id"), j),sd->status.skill[i].id); + pc->setreg(sd,reference_uid(add_str("@skilllist_lv"), j),sd->status.skill[i].lv); + pc->setreg(sd,reference_uid(add_str("@skilllist_flag"), j),sd->status.skill[i].flag); j++; } } - iPc->setreg(sd,add_str("@skilllist_count"),j); + pc->setreg(sd,add_str("@skilllist_count"),j); return true; } @@ -11778,7 +11778,7 @@ BUILDIN(clearitem) if(sd==NULL) return true; for (i=0; i<MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount) { - iPc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_SCRIPT); + pc->delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_SCRIPT); } } return true; @@ -11796,7 +11796,7 @@ BUILDIN(disguise) id = script_getnum(st,2); if (mobdb_checkid(id) || npcdb_checkid(id)) { - iPc->disguise(sd, id); + pc->disguise(sd, id); script_pushint(st,id); } else script_pushint(st,0); @@ -11813,7 +11813,7 @@ BUILDIN(undisguise) if (sd == NULL) return true; if (sd->disguise != -1) { - iPc->disguise(sd, -1); + pc->disguise(sd, -1); script_pushint(st,0); } else { script_pushint(st,1); @@ -12257,7 +12257,7 @@ BUILDIN(nude) if( sd->equip_index[ i ] >= 0 ) { if( !calcflag ) calcflag = 1; - iPc->unequipitem( sd , sd->equip_index[ i ] , 2); + pc->unequipitem( sd , sd->equip_index[ i ] , 2); } } @@ -13116,12 +13116,12 @@ BUILDIN(getrefine) *-------------------------------------------------------*/ BUILDIN(night) { - if (iMap->night_flag != 1) iPc->map_night_timer(iPc->night_timer_tid, 0, 0, 1); + if (iMap->night_flag != 1) pc->map_night_timer(pc->night_timer_tid, 0, 0, 1); return true; } BUILDIN(day) { - if (iMap->night_flag != 0) iPc->map_day_timer(iPc->day_timer_tid, 0, 0, 1); + if (iMap->night_flag != 0) pc->map_day_timer(pc->day_timer_tid, 0, 0, 1); return true; } @@ -13138,9 +13138,9 @@ BUILDIN(unequip) sd = script_rid2sd(st); if( sd != NULL && num >= 1 && num <= ARRAYLENGTH(equip) ) { - i = iPc->checkequip(sd,equip[num-1]); + i = pc->checkequip(sd,equip[num-1]); if (i >= 0) - iPc->unequipitem(sd,i,1|2); + pc->unequipitem(sd,i,1|2); } return true; } @@ -13161,7 +13161,7 @@ BUILDIN(equip) } ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == nameid ); if( i < MAX_INVENTORY ) - iPc->equipitem(sd,i,item_data->equip); + pc->equipitem(sd,i,item_data->equip); return true; } @@ -14835,7 +14835,7 @@ BUILDIN(pcfollow) sd = script_rid2sd(st); if(sd) - iPc->follow(sd, targetid); + pc->follow(sd, targetid); return true; } @@ -14854,7 +14854,7 @@ BUILDIN(pcstopfollow) sd = script_rid2sd(st); if(sd) - iPc->stop_following(sd); + pc->stop_following(sd); return true; } @@ -15728,7 +15728,7 @@ BUILDIN(waitingroom2bg_single) if( bg_team_join(bg_id, sd) ) { - iPc->setpos(sd, mapindex, x, y, CLR_TELEPORT); + pc->setpos(sd, mapindex, x, y, CLR_TELEPORT); script_pushint(st,1); } else @@ -16167,7 +16167,7 @@ static int buildin_instance_warpall_sub(struct block_list *bl,va_list ap) { int x = va_arg(ap,int); int y = va_arg(ap,int); - iPc->setpos(sd,mapindex,x,y,CLR_TELEPORT); + pc->setpos(sd,mapindex,x,y,CLR_TELEPORT); return 0; } @@ -16524,10 +16524,10 @@ BUILDIN(setdragon) { if( (sd = script_rid2sd(st)) == NULL ) return true; - if( !iPc->checkskill(sd,RK_DRAGONTRAINING) || (sd->class_&MAPID_THIRDMASK) != MAPID_RUNE_KNIGHT ) + if( !pc->checkskill(sd,RK_DRAGONTRAINING) || (sd->class_&MAPID_THIRDMASK) != MAPID_RUNE_KNIGHT ) script_pushint(st,0);//Doesn't have the skill or it's not a Rune Knight else if ( pc_isridingdragon(sd) ) {//Is mounted; release - iPc->setoption(sd, sd->sc.option&~OPTION_DRAGON); + pc->setoption(sd, sd->sc.option&~OPTION_DRAGON); script_pushint(st,1); } else {//Not mounted; Mount now. unsigned int option = OPTION_DRAGON1; @@ -16542,7 +16542,7 @@ BUILDIN(setdragon) { option = OPTION_DRAGON1; } } - iPc->setoption(sd, sd->sc.option|option); + pc->setoption(sd, sd->sc.option|option); script_pushint(st,1); } return true; @@ -16921,9 +16921,9 @@ BUILDIN(getrandgroupitem) { for (i = 0; i < qty; i += get_count) { // if not pet egg if (!pet_create_egg(sd, nameid)) { - if ((flag = iPc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { + if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); - if( iPc->candrop(sd,&item_tmp) ) + if( pc->candrop(sd,&item_tmp) ) iMap->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } } @@ -17563,7 +17563,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(getcastledata,"si"), BUILDIN_DEF(setcastledata,"sii"), BUILDIN_DEF(requestguildinfo,"i?"), - BUILDIN_DEF(getequipcardcnt,"i"), + BUILDIN_DEF(getequpcardcnt,"i"), BUILDIN_DEF(successremovecards,"i"), BUILDIN_DEF(failedremovecards,"ii"), BUILDIN_DEF(marriage,"s"), @@ -17668,7 +17668,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(compare,"ss"), // Lordalfa - To bring strstr to scripting Engine. BUILDIN_DEF(getiteminfo,"ii"), //[Lupus] returns Items Buy / sell Price, etc info BUILDIN_DEF(setiteminfo,"iii"), //[Lupus] set Items Buy / sell Price, etc info - BUILDIN_DEF(getequipcardid,"ii"), //[Lupus] returns CARD ID or other info from CARD slot N of equipped item + BUILDIN_DEF(getequpcardid,"ii"), //[Lupus] returns CARD ID or other info from CARD slot N of equipped item // [zBuffer] List of mathematics commands ---> BUILDIN_DEF(sqrt,"i"), BUILDIN_DEF(pow,"ii"), |