ieatacid,
first, Thanks for your post and your link. I reviewed the post and without knowing much about how structs work, managed to find my EQUIstructs file in MQ2main.
I simply inserted your suggested code into the code and saved....like so
Code: Select all
} EQINVSLOT, *PEQINVSLOT;
// actual size 0x100C 2-18-2004 Lax
typedef struct _EQINVSLOTMGR {
/*0x0000*/ DWORD Unknown0x0000;
/*0x0004*/ struct _EQINVSLOT *SlotArray[0x400];
/*0x1004*/ DWORD TotalSlots;
/*0x1008*/ DWORD Unknown0x1008;
/*0x100C*/
} EQINVSLOTMGR, *PEQINVSLOTMGR;
//==============================================[ added code ]=========
typedef struct _CONTENTS {
/*0x00*/ struct _ITEMINFO *Item;
union {
/*0x04*/ struct _CONTENTS *Contents[0x0a]; //addresses to whats inside the bag if its a bag
/*0x04*/ struct _ITEMINFO *Augments[0x0a]; //Only 1-5 are actually used (for now)
};
/*0x2c*/ DWORD StackCount;
/*0x30*/ BYTE Unknown0x30[0xc];
/*0x3c*/ DWORD Charges;
/*0x40*/ DWORD ItemSlot;// slotid for Player Items
/*0x44*/ BYTE Unknown0x44[0x4];
/*0x48*/ DWORD ItemSlot2;// slotid for Merchant Items
/*0x4c*/ DWORD Unknown0x4c;
/*0x50*/ DWORD Price; //price a player vendor set the item at
/*0x54*/ DWORD Open;
/*0x58*/
} CONTENTS, *PCONTENTS:
//==============================================[ end added code ]=======
// onetimehero 09-17-03
// ContainerWindow
// Actual Size 0x17C old
typedef struct _EQCONTAINERWINDOW {
/*0x000*/ struct _CSIDLWND Wnd;
/*0x148*/ struct _CONTENTS* pContents; // Pointer to the contents of the container;
// Matches the pointer in CHARINFO.Inventory/Bank/World
/*0x14c*/ struct _CSIDLWND* pSlots[0x0a];
/*0x000*/ struct _CSIDLWND* pCombine;
/*0x168*/ struct _CSIDLWND* pDone;
/*0x16c*/ struct _CSIDLWND* pIcon;
/*0x170*/ struct _CSIDLWND* pUnknown;
/*0x174*/ struct _CSIDLWND* pLabel;
/*0x178*/ BYTE Unknown0x178[4];
/*0x17c*/
} EQCONTAINERWINDOW, *PEQCONTAINERWINDOW;
// Actual Size 0x78 old
typedef struct _EQ_CONTAINERWND_MANAGER {
/*0x000*/ DWORD pvfTable; // NOT based on CXWnd. Contains only destructor
/*0x004*/ PEQCONTAINERWINDOW pPCContainers[0x1a]; // All open containers, including World, in order of opening...
/*0x06c*/ PCONTENTS pWorldContents; // Pointer to the contents of the world If NULL, world container isn't open;
/*0x070*/ DWORD dwWorldContainerID; // ID of container in zone, starts at one (zero?) and goes up.
/*0x074*/ DWORD dwTimeSpentWithWorldContainerOpen; // Cumulative counter?
/*0x078*/
} EQ_CONTAINERWND_MANAGER, *PEQ_CONTAINERWND_MANAGER;
After readint this original post, I also managed to locate my MQ2DataTypes.cpp file and insert/'fix' the suggested code like so:
Code: Select all
case InvSlot:
Dest.Int=FindInvSlotForContents(pItem);
if (Dest.Int>=0)
{
Dest.Type=pInvSlotType;
return true;
}
return false;
//==============================================[ begin code change ]========
case BuyPrice:
if (pActiveMerchant)
{
Dest.DWord=(DWORD)((FLOAT)pItem->Price);
Dest.Type=pIntType;
return true;
}
return false;
//==============================================[ end code change ]=========
case SellPrice:
if (pActiveMerchant)
{
Dest.DWord=(DWORD)((FLOAT)pItem->Item->Cost*(1.0f/((PEQMERCHWINDOW)pMerchantWnd)->Markup));
Dest.Type=pIntType;
return true;
}
return false;
What am I doing wrong? I reloaded and reran EQ and MQ2, but somehow, I didn't think that was going to do anything. (It didn't)
A little more coaching would be awesome!
Thanks for your infinite patience.