Jump to content

Recommended Posts

  • 8 months later...
Just now, tavi said:

I try, don't work . Help.

char_item.cpp search:

Spoiler

pkNewItem->SetForceAttribute(i, 0, 0);

under paste this:

switch(pkNewItem->GetVnum())
            {
                case 17209: <--- ID of next refine
                {
                    for (BYTE i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
                        pkNewItem->SetForceAttribute(i, 0, 0);
                }
                break;
            }

eccc48002a4c254ab24c88c3fbec7b29.png

Link to comment
Share on other sites

1 hour ago, BackPlayer said:

char_item.cpp search:

  Reveal hidden contents


pkNewItem->SetForceAttribute(i, 0, 0);

under paste this:

switch(pkNewItem->GetVnum())
            {
                case 17209: <--- ID of next refine
                {
                    for (BYTE i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
                        pkNewItem->SetForceAttribute(i, 0, 0);
                }
                break;
            }

eccc48002a4c254ab24c88c3fbec7b29.png

Thanks I will try your metod.

 

My code is:

 

    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);
        }

It work fine..

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.