tavi 13 Posted September 14, 2016 Share Posted September 14, 2016 I want to remove extra bonus just 1-5, 6/7 still remain, from specific items when they are upgrade 1 Link to comment Share on other sites More sharing options...
Premium r00t 123 Posted September 15, 2016 Premium Share Posted September 15, 2016 All you can with source Link to comment Share on other sites More sharing options...
tavi 13 Posted September 15, 2016 Author Share Posted September 15, 2016 How ? I want a specified item when I evolve, the bonus 1-5 don't move on the new item. Help ! Link to comment Share on other sites More sharing options...
iRazer 9 Posted September 16, 2016 Share Posted September 16, 2016 Can you explain it better? Do you want this? If you do a refine with item that has 5 bonus it will be with 0 bonus? Link to comment Share on other sites More sharing options...
tavi 13 Posted September 17, 2016 Author Share Posted September 17, 2016 Yes iRazer. I want to remove extra bonus from specific items when they are upgrade.(just 1-5 bonus) Link to comment Share on other sites More sharing options...
tavi 13 Posted September 19, 2016 Author Share Posted September 19, 2016 I solve the problem with this code. In char_item.cpp if (pkNewItem->GetVnum() == 230 ) { ITEM_MANAGER::CopyAllAttrTo(item, pkNewItem); // copy the all the bonus on the new item LogManager::instance().ItemLog(this, pkNewItem, "REFINE SUCCESS", pkNewItem->GetName()); // rewrite the bonus 1-5 (0) for (BYTE i = 0; i < 5; ++i) pkNewItem->SetForceAttribute(i, 0, 0); BYTE bCell = item->GetCell(); // DETAIL_REFINE_LOG NotifyRefineSuccess(this, item, IsRefineThroughGuild() ? "GUILD" : "POWER"); DBManager::instance().SendMoneyLog(MONEY_LOG_REFINE, item->GetVnum(), -cost); ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (REFINE SUCCESS)"); // END_OF_DETAIL_REFINE_LOG pkNewItem->AddToCharacter(this, TItemPos(INVENTORY, bCell)); ITEM_MANAGER::instance().FlushDelayedSave(pkNewItem); sys_log(0, "Refine Success %d", cost); pkNewItem->AttrLog(); //PointChange(POINT_GOLD, -cost); sys_log(0, "PayPee %d", cost); PayRefineFee(cost); sys_log(0, "PayPee End %d", cost); } // on the item who is not in the above list, the bonus remain all. else if (pkNewItem) { ITEM_MANAGER::CopyAllAttrTo(item, pkNewItem); LogManager::instance().ItemLog(this, pkNewItem, "REFINE SUCCESS", pkNewItem->GetName()); BYTE bCell = item->GetCell(); // DETAIL_REFINE_LOG NotifyRefineSuccess(this, item, IsRefineThroughGuild() ? "GUILD" : "POWER"); DBManager::instance().SendMoneyLog(MONEY_LOG_REFINE, item->GetVnum(), -cost); ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (REFINE SUCCESS)"); // END_OF_DETAIL_REFINE_LOG pkNewItem->AddToCharacter(this, TItemPos(INVENTORY, bCell)); ITEM_MANAGER::instance().FlushDelayedSave(pkNewItem); sys_log(0, "Refine Success %d", cost); pkNewItem->AttrLog(); //PointChange(POINT_GOLD, -cost); sys_log(0, "PayPee %d", cost); PayRefineFee(cost); sys_log(0, "PayPee End %d", cost); } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now