EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Submission: Fix for quest:itemlink() (https://www.eqemulator.org/forums/showthread.php?t=26317)

Theeper 08-30-2008 12:25 PM

Discussion thread for this submission is here: http://www.eqemulator.net/forums/showthread.php?t=26018

Ya, the itemlink function for quests is broken. In fact it will crash the zone if a high itemID is used.

In the new method of linking, the first 6 bytes of that long number are the hex value of the itemID. I assume the last 8ish bytes are a hash or bitmask of something.

Here's a simple fix to link normal, unaugmented items.

Around line 887 in zone/questmgr.cpp change this ..
Code:

// MYRA - added itemlink(ID) command
        const Item_Struct* item = 0;
        int16 itemid = item_id;
        item = database.GetItem(itemid);
        initiator->Message(0, "%s tells you, '%c00%i %s%c",owner->GetName(),0x12, item->ID, item->Name, 0x12);

}

.. to this ..
Code:

// MYRA - added itemlink(ID) command
        const Item_Struct* item = 0;
        uint32 itemid = item_id;
        item = database.GetItem(itemid);
        initiator->Message(0, "%s tells you, %c%06X000000000000000000000000000000000000000%s%c",owner->GetCleanName(),0x12, item->ID, item->Name, 0x12);

}

Then you can use
Code:

quest::itemlink(1001);  // link Cloth Cap


All times are GMT -4. The time now is 07:58 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.