Item Sets (Part 2) unpacking
Posted: Sat Nov 11, 2017 4:50 am
So now that we have a way to create Item Sets, you need a way to unpack them, well that's easy just right click the item and select unpack, "right after this"
you will need to add the code from the post i attached first in order for this to work
http://www.eq2emulator.net/phpBB3/viewt ... =88&t=4339
Items.h
add this ( there seems to be another menu settings packet that works in conjunction with the first
Items.cpp
add
just before
Commands.cpp
add
right before
Edited: with Jab's suggestions
you will need to add the code from the post i attached first in order for this to work
http://www.eq2emulator.net/phpBB3/viewt ... =88&t=4339
Items.h
add this ( there seems to be another menu settings packet that works in conjunction with the first
Code: Select all
#define ITEM_MENU_TYPE2_TEST1 1 //0 auto consume on
#define ITEM_MENU_TYPE2_TEST2 2 //1
#define ITEM_MENU_TYPE2_UNPACK 4//2 unpack
#define ITEM_MENU_TYPE2_TEST4 8 //3
#define ITEM_MENU_TYPE2_TEST5 16 //4
#define ITEM_MENU_TYPE2_TEST6 32//5
#define ITEM_MENU_TYPE2_TEST7 64//6
#define ITEM_MENU_TYPE2_TEST8 128//7
#define ITEM_MENU_TYPE2_TEST9 256//8
#define ITEM_MENU_TYPE2_TEST10 512//9
#define ITEM_MENU_TYPE2_TEST11 1024//10
#define ITEM_MENU_TYPE2_TEST12 2048//11
#define ITEM_MENU_TYPE2_TEST13 4096//12
#define ITEM_MENU_TYPE2_TEST14 8192//13
#define ITEM_MENU_TYPE2_TEST15 16384//14
#define ITEM_MENU_TYPE2_TEST16 32768//15add
Code: Select all
if (item->generic_info.item_type == 18){
packet->setSubstructArrayDataByName("items", "unknown3", ITEM_MENU_TYPE2_UNPACK, 0, i);
}Code: Select all
if(item->generic_info.condition == 0)
menu_data += ITEM_MENU_TYPE_BROKEN;add
Code: Select all
else if (sep->arg[1][0] && strncasecmp("unpack", sep->arg[0], 6) == 0 && sep->IsNumber(1))
{
if (client->GetPlayer()->EngagedInCombat())
client->SimpleMessage(CHANNEL_COLOR_RED, "You may not unpack items while in combat.");
else {
int16 index = atoi(sep->arg[1]);
Item* item = client->GetPlayer()->item_list.GetItemFromIndex(index);
if (item){
// client->GetPlayer()->item_list.DestroyItem(index);
if (item->item_sets.size() > 0){
for (int32 i = 0; i < item->item_sets.size(); i++){
ItemSet* set = item->item_sets[i];
if (set->item_stack_size == 0)
set->item_stack_size += 1;
client->AddItem(set->item_id, set->item_stack_size);
}
}
}
client->RemoveItem(item, 1);
}
}Code: Select all
else if(sep->arg[1][0] && strncasecmp("unequip", sep->arg[0], 7) == 0 && sep->IsNumber(1))
{
if(client->GetPlayer()->EngagedInCombat())