parent
6510d414fa
commit
5a5621073f
@ -12645,6 +12645,12 @@ BUILDIN_FUNC(successremovecards) {
|
|||||||
|
|
||||||
for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
|
for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
|
||||||
item_tmp.card[j]=sd->status.inventory[i].card[j];
|
item_tmp.card[j]=sd->status.inventory[i].card[j];
|
||||||
|
|
||||||
|
for (j = 0; j < MAX_ITEM_RDM_OPT; j++){
|
||||||
|
item_tmp.option[j].id=sd->status.inventory[i].option[j].id;
|
||||||
|
item_tmp.option[j].value=sd->status.inventory[i].option[j].value;
|
||||||
|
item_tmp.option[j].param=sd->status.inventory[i].option[j].param;
|
||||||
|
}
|
||||||
|
|
||||||
pc_delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT);
|
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
|
if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor
|
||||||
@ -12703,8 +12709,7 @@ BUILDIN_FUNC(failedremovecards) {
|
|||||||
if(cardflag == 1) {
|
if(cardflag == 1) {
|
||||||
if(typefail == 0 || typefail == 2){ // destroy the item
|
if(typefail == 0 || typefail == 2){ // destroy the item
|
||||||
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
|
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
|
||||||
}
|
}else if(typefail == 1){ // destroy the card
|
||||||
if(typefail == 1){ // destroy the card
|
|
||||||
unsigned char flag = 0, j;
|
unsigned char flag = 0, j;
|
||||||
struct item item_tmp;
|
struct item item_tmp;
|
||||||
|
|
||||||
@ -12719,6 +12724,12 @@ BUILDIN_FUNC(failedremovecards) {
|
|||||||
|
|
||||||
for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
|
for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
|
||||||
item_tmp.card[j]=sd->status.inventory[i].card[j];
|
item_tmp.card[j]=sd->status.inventory[i].card[j];
|
||||||
|
|
||||||
|
for (j = 0; j < MAX_ITEM_RDM_OPT; j++){
|
||||||
|
item_tmp.option[j].id=sd->status.inventory[i].option[j].id;
|
||||||
|
item_tmp.option[j].value=sd->status.inventory[i].option[j].value;
|
||||||
|
item_tmp.option[j].param=sd->status.inventory[i].option[j].param;
|
||||||
|
}
|
||||||
|
|
||||||
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
|
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user