Kuroyama 6 Posted December 22, 2020 After decarding the shoes with eddga card, the endure status is still on. How to get rid of this? Quote Share this post Link to post Share on other sites
1 Daraen 7 Posted January 15, 2021 @Kuroyama @Dduwsmitthttps://github.com/HerculesWS/Hercules/issues/2922https://github.com/HerculesWS/Hercules/issues/2922 Thank's to @Samuel ! 1 Kuroyama reacted to this Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted December 22, 2020 (edited) check if you have other items equip with endure bonus. Edited December 22, 2020 by astralprojection Quote Share this post Link to post Share on other sites
0 Kuroyama 6 Posted December 22, 2020 I don't have any, only the tidal shoes. 21 minutes ago, astralprojection said: check if you have other items equip with endure bonus. Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted December 22, 2020 are there any modification on eddga card script? check if it has OnUnequipScript: <" sc_end SC_ENDURE; "> Quote Share this post Link to post Share on other sites
0 Kuroyama 6 Posted December 22, 2020 Just now, astralprojection said: are there any modification on eddga card script? check if it has OnUnequipScript: <" sc_end SC_ENDURE; "> Here, it has sc_end. What happening only is when you decard the certain shoes with eddga, after successfully decarding, the endure is still there Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted December 22, 2020 @4144 i can confirm this bug. 1 1 Kuroyama and Dduwsmitt reacted to this Quote Share this post Link to post Share on other sites
0 Dduwsmitt 4 Posted December 23, 2020 (edited) additional info. After successfully removing the card, the script command 'successremovecards' fails to re-equip the item. it seems pc->equipitem(sd, i, sd->status.inventory.equip); is not working properly. pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); does not recalculate stats so we rely on the pc->equipitem(sd, i, sd->status.inventory.equip); to recalculate the stats thus not triggering the OnUnequipScript. i dont know how to fix it tho. /// Removes all cards from the item found in the specified equipment slot of the invoking character, /// and give them to the character. If any cards were removed in this manner, it will also show a success effect. /// successremovecards(<slot>); static BUILDIN(successremovecards) { int i = -1, c, cardflag = 0; struct map_session_data *sd = script->rid2sd(st); int num = script_getnum(st, 2); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) i = pc->checkequip(sd,script->equip[num - 1]); if (i < 0 || sd->inventory_data[i] == NULL) return true; if (itemdb_isspecial(sd->status.inventory[i].card[0])) return true; for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) { if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { int flag; struct item item_tmp; memset(&item_tmp, 0, sizeof(item_tmp)); cardflag = 1; item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; sd->status.inventory[i].card[c] = 0; if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false); } } } if (cardflag == 1) { pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); clif->additem(sd, i, 1, 0); pc->equipitem(sd, i, sd->status.inventory[i].equip); //THIS LINE HERE FAILS TO WORK clif->misceffect(&sd->bl,3); } return true; } Edited December 23, 2020 by Dduwsmitt Quote Share this post Link to post Share on other sites
0 Dduwsmitt 4 Posted December 23, 2020 1 hour ago, Dduwsmitt said: additional info. After successfully removing the card, the script command 'successremovecards' fails to re-equip the item. it seems pc->equipitem(sd, i, sd->status.inventory.equip); is not working properly. pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); does not recalculate stats so we rely on the pc->equipitem(sd, i, sd->status.inventory.equip); to recalculate the stats thus not triggering the OnUnequipScript. i dont know how to fix it tho. /// Removes all cards from the item found in the specified equipment slot of the invoking character, /// and give them to the character. If any cards were removed in this manner, it will also show a success effect. /// successremovecards(<slot>); static BUILDIN(successremovecards) { int i = -1, c, cardflag = 0; struct map_session_data *sd = script->rid2sd(st); int num = script_getnum(st, 2); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) i = pc->checkequip(sd,script->equip[num - 1]); if (i < 0 || sd->inventory_data == NULL) return true; if (itemdb_isspecial(sd->status.inventory.card[0])) return true; for (c = sd->inventory_data->slot - 1; c >= 0; --c) { if (sd->status.inventory.card[c] > 0 && itemdb_type(sd->status.inventory.card[c]) == IT_CARD) { int flag; struct item item_tmp; memset(&item_tmp, 0, sizeof(item_tmp)); cardflag = 1; item_tmp.nameid = sd->status.inventory.card[c]; item_tmp.identify = 1; sd->status.inventory.card[c] = 0; if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false); } } } if (cardflag == 1) { pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); clif->additem(sd, i, 1, 0); pc->equipitem(sd, i, sd->status.inventory.equip); //THIS LINE HERE FAILS TO WORK clif->misceffect(&sd->bl,3); } return true; } /// Removes all cards from the item found in the specified equipment slot of the invoking character, /// and give them to the character. If any cards were removed in this manner, it will also show a success effect. /// successremovecards(<slot>); static BUILDIN(successremovecards) { int i = -1, c, cardflag = 0; struct map_session_data *sd = script->rid2sd(st); int num = script_getnum(st, 2); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) i = pc->checkequip(sd,script->equip[num - 1]); if (i < 0 || sd->inventory_data[i] == NULL) return true; if (itemdb_isspecial(sd->status.inventory[i].card[0])) return true; for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) { if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { int flag; struct item item_tmp; memset(&item_tmp, 0, sizeof(item_tmp)); cardflag = 1; item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; sd->status.inventory[i].card[c] = 0; if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false); } } } if (cardflag == 1) { pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); clif->additem(sd, i, 1, 0); pc->equipitem(sd, i, sd->status.inventory[i].equip); //THIS LINE HERE FAILS TO WORK clif->misceffect(&sd->bl,3); } return true; } Update: i changed pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); to pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC); still not triggering the OnUnequipScript. Quote Share this post Link to post Share on other sites
0 Dduwsmitt 4 Posted December 23, 2020 i opened this issue on github. you can follow the topic on https://github.com/HerculesWS/Hercules/issues/2922 Quote Share this post Link to post Share on other sites
0 Daraen 7 Posted January 12, 2021 I'm relaunching the subject because it doesn't seem to be very advanced here or on Github. Has anyone found the solution to this problem? On low rate servers where the eddga card is at 0.01% it is not yet too disturbing that the card will remain rare but on a high rate server, it will have a lot of problem and could even participate in what the whole server glitch this stuff Quote Share this post Link to post Share on other sites
After decarding the shoes with eddga card, the endure status is still on.
How to get rid of this?
Share this post
Link to post
Share on other sites