#ifndef _D2STRUCTS_H
#define _D2STRUCTS_H
#pragma once
#include <string>
using namespace std;
struct LevelNameInfo;
struct UnitAny;
struct Room1;
struct Room2;
struct Level;
struct Act;
struct ActMisc;
struct RosterUnit;
struct OverheadMsg;
struct D2Struct;
struct ControlText {
wchar_t* wText; //0x00
wchar_t* wText2;//0x04
DWORD _1[3]; //0x08
DWORD dwColor; //0x14
DWORD _2; //0x18
ControlText* pNext;//0x1C
};
struct ControlPreferences
{
DWORD dwType;//0x00
// ..
};
struct GameListEntry
{
WORD wRequestId;
DWORD dwIndex;
BYTE bPlayers;
DWORD dwStatus;
string sGameName;
string sGameDesc;
};
struct D2Struct {
DWORD PID;
HANDLE D2Handle;
DWORD D2ClientBase;
DWORD PlayerUnit;
};
struct LevelNameInfo
{
int nX;
int nY;
int nLevelId;
int nAct;
};
struct InventoryInfo
{
int nLocation;
int nMaxXCells;
int nMaxYCells;
};
struct GameStructInfo
{
BYTE _1[0x1B];
char szGameName[0x18]; // 0x1B
char szGameServerIp[0x56]; // 0x33
char szAccountName[0x30]; // 0x89
char szCharName[0x18]; // 0xB9
char szRealmName[0x18]; // 0xD1
BYTE _2[0x158];
char szGamePassword[0x18]; // 0x241
};
struct AutomapCell {
DWORD fSaved; //0x00
WORD nCellNo; //0x04
WORD xPixel; //0x06
WORD yPixel; //0x08
WORD wWeight; //0x0A
AutomapCell *pLess; //0x0C
AutomapCell *pMore; //0x10
};
struct GfxCell {
DWORD flags; //0x00
DWORD width; //0x04
DWORD height; //0x08
DWORD xoffs; //0x0C
DWORD yoffs; //0x10
DWORD _2; //0x14
DWORD lpParent; //0x18
DWORD length; //0x1C
BYTE cols; //0x20
};
struct InteractStruct
{
DWORD dwMoveType; //0x00
UnitAny* lpPlayerUnit; //0x04
UnitAny* lpTargetUnit; //0x08
DWORD dwTargetX; //0x0C
DWORD dwTargetY; //0x10
DWORD _1; //0x14
DWORD _2; //0x18
};
struct CellFile {
DWORD dwVersion; //0x00
struct {
WORD dwFlags;
BYTE mylastcol;
BYTE mytabno:1;
}; //0x04
DWORD eFormat; //0x08
DWORD termination; //0x0C
DWORD numdirs; //0x10
DWORD numcells; //0x14
GfxCell *cells[1]; //0x18
};
struct CellContext {
DWORD direction; //0x00
GfxCell *hCell; //0x04
DWORD _1[0xD]; //0x08
CellFile* pCellFile; //0x3C
DWORD _2; //0x40
DWORD nCellNo; //0x44
};
struct AutomapLayer {
DWORD nLayerNo; //0x00
DWORD fSaved; //0x04
AutomapCell *pFloors; //0x08
AutomapCell *pWalls; //0x0C
AutomapCell *pObjects; //0x10
AutomapCell *pExtras; //0x14
AutomapLayer *pNextLayer; //0x18
};
struct AutomapLayer2 {
DWORD _1[2]; //0x00
DWORD nLayerNo; //0x08
};
struct LevelTxt {
DWORD dwLevelNo; //0x00
DWORD _1[60]; //0x04
BYTE _2; //0xF4
wchar_t szName[40]; //+16e
char szEntranceText[40]; //0x11D
char szLevelDesc[41]; //0x145
wchar_t wName[40]; //0x16E
wchar_t wEntranceText[40]; //0x1BE
BYTE nObjGroup[8]; //0x196
BYTE nObjPrb[8]; //0x19E
};
struct Control {
DWORD dwType; //0x00
CellFile *pCellFile; //0x04
DWORD dwDisabled; //0x08
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
DWORD dwSizeX; //0x14
DWORD dwSizeY; //0x18
VOID (__fastcall *Initialize)(Control* pControl);//0x1c
DWORD _3; //0x20
DWORD *_4; //0x24
DWORD *_5; //0x28
DWORD _6; //0x2C
DWORD *_7; //0x30
DWORD *_8; //0x34
DWORD _9; //0x38
Control* pNext; //0x3C
DWORD _10; //0x40
DWORD dwMaxLength; //0x44
union {
ControlText* pFirstText; //0x48
DWORD dwScrollEntries; //0x48
};
union {
ControlText* pLastText; //0x4C
DWORD dwScrollPosition; //0x4C
};
ControlText* pSelectedText; //0x50
DWORD dwSelectEnd; //0x54
DWORD dwSelectStart; //0x58
wchar_t wText[0x1A]; //0x5C
Control* pChildControl; //0x90
};
#pragma pack(push)
#pragma pack(1)
struct RoomTile //Updated
{
DWORD _1[2];
Room2* pRoom2; // 0x08
DWORD *nNum; // 0x0C
DWORD _2;
RoomTile* pNext; // 0x14
};
struct RosterUnit {
char szName[16]; //0x00
DWORD dwUnitId; //0x10
DWORD dwPartyLife; //0x14
DWORD _1; //0x18
DWORD dwClassId; //0x1C
WORD wLevel; //0x20
WORD wPartyId; //0x22
DWORD dwLevelId; //0x24
DWORD Xpos; //0x28
DWORD Ypos; //0x2C
DWORD dwPartyFlags; //0x30
BYTE * _5; //0x34
DWORD _6[11]; //0x38
WORD _7; //0x64
char szName2[16]; //0x66
WORD _8; //0x76
DWORD _9[2]; //0x78
RosterUnit * pNext; //0x80
};
struct PartyPlayer {
char name2[0x10]; //+00
DWORD nUnitId; //+10
DWORD life; //+14
DWORD _2[1];
DWORD chrtype; //+1c
WORD chrlvl; //+20
WORD partyno; //+22
DWORD _3[4];
DWORD flags; //+34
DWORD mems; //+38
BYTE _4[0x2a];
char name[1]; //+66
BYTE _5[0x1d];
};
struct QuestInfo {
void *pBuffer; //0x00
DWORD _1; //0x04
};
struct Waypoint {
BYTE flags; //0x00
};
struct PlayerData {
char szName[0x10]; //0x00
QuestInfo *pNormalQuest; //0x10
QuestInfo *pNightmareQuest; //0x14
QuestInfo *pHellQuest; //0x18
Waypoint *pNormalWaypoint; //0x1c
Waypoint *pNightmareWaypoint; //0x20
Waypoint *pHellWaypoint; //0x24
};
struct CollMap {
DWORD dwPosGameX; //0x00
DWORD dwPosGameY; //0x04
DWORD dwSizeGameX; //0x08
DWORD dwSizeGameY; //0x0C
DWORD dwPosRoomX; //0x10
DWORD dwPosRoomY; //0x14
DWORD dwSizeRoomX; //0x18
DWORD dwSizeRoomY; //0x1C
WORD *pMapStart; //0x20
WORD *pMapEnd; //0x22
};
struct PresetUnit // Updated
{
DWORD dwPosY; // 0x00
PresetUnit* pPresetNext; // 0x04
DWORD dwPosX; // 0x08
DWORD dwTxtFileNo; // 0x0C
DWORD dwType; // 0x10
};
struct Level // Updated
{
BYTE _1[0x18C];
DWORD dwPosX; // 0x18C
DWORD dwPosY; // 0x190
DWORD dwSizeY; // 0x194
DWORD dwSizeX; // 0x198
DWORD dwLevelNo; // 0x19C
DWORD _2[3];
DWORD dwSeed[2]; // 0x1AC
DWORD _3;
Room2 *pRoom2First; // 0x1B8
DWORD _4;
ActMisc *pMisc; // 0x1C0
Level *pNextLevel; // 0x1C4
};
struct Room2 //Updated
{
DWORD dwPosX; // 0x00
DWORD dwPosY; // 0x04
DWORD dwSizeX; // 0x08
DWORD dwSizeY; // 0x0C
Room2 **pRoom2Near; // 0x10
BYTE _1[0x84];
DWORD dwSeed[2]; // 0x98
DWORD _2[2];
Room2 *pRoom2Next; // 0xA8
DWORD _3;
DWORD dwRoomsNear; // 0xB0
DWORD _4[2];
Level *pLevel; // 0xBC
Room1 *pRoom1; // 0xC0
Room2 *pRoom2Prev; // 0xC4
DWORD _5[5];
PresetUnit *pPreset; // 0xDC
Room2 *pRoom2Other; // 0xE0
RoomTile *pRoomTiles; // 0xE4
};
#pragma pack(pop)
struct Room1 //Updated
{
DWORD _1;
DWORD dwRoomsNear; // 0x04
DWORD _2;
Room2* pRoom2; // 0x0C
BYTE _3[0x24];
Room1 **pRoomsNear; // 0x34
DWORD _4[3];
CollMap* Coll; // 0x44
DWORD dwSeed[2]; // 0x48
Room1* pRoomNext; // 0x50
DWORD dwXStart; // 0x54
DWORD dwYStart; // 0x58
DWORD dwXSize; // 0x5C
DWORD dwYSize; // 0x60
DWORD r_x; // 0x64
DWORD r_y; // 0x68
DWORD r_size_x; // 0x6C
DWORD r_size_y; // 0x70
DWORD _5;
UnitAny* pUnitFirst; // 0x78
Act *pAct; // 0x7C
};
struct ActMisc // Updated
{
DWORD _1[2];
DWORD dwStaffTombLevel; // 0x08
BYTE _2[0x3D4];
Act *pAct; // 0x3E0
DWORD _3[4];
Level *pLevelFirst; // 0x3F4
};
struct Act //updated
{
DWORD _1[3];
Room1* pRoom1; // 0x0C
BYTE _2[0x44];
DWORD dwAct; // 0x54
DWORD _3;
ActMisc* pMisc; // 0x5C
};
struct Path {
WORD xOffset; //0x00
WORD xPos; //0x02
WORD yOffset; //0x04
WORD yPos; //0x06
DWORD _1[2]; //0x08
WORD xTarget; //0x10
WORD yTarget; //0x12
DWORD _2[2]; //0x14
Room1 *pRoom1; //0x1C
Room1 *pRoomUnk; //0x20
DWORD _3[3]; //0x24
UnitAny *pUnit; //0x30
DWORD dwFlags; //0x34
DWORD _4; //0x38
DWORD dwPathType; //0x3C
DWORD dwPrevPathType; //0x40
DWORD dwUnitSize; //0x44
DWORD _5[4]; //0x48
UnitAny *pTargetUnit; //0x58
DWORD dwTargetType; //0x5C
DWORD dwTargetId; //0x60
BYTE bDirection; //0x64
};
struct ItemPath {
DWORD _1[3]; //0x00
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
//Use Path for the rest
};
struct Stat {
WORD wSubIndex; //0x00
WORD wStatIndex; //0x02
DWORD dwStatValue; //0x04
};
struct StatList {
DWORD _1[9]; //0x00
Stat *pStat; //0x24
WORD wStatCount1; //0x28
WORD wStatCount2; //0x2A
DWORD _2[2]; //0x2C
BYTE *_3; //0x34
DWORD _4; //0x38
StatList *pNext; //0x3C
};
struct Inventory {
DWORD dwSignature; //0x00
BYTE *bGame1C; //0x04
UnitAny *pOwner; //0x08
UnitAny *pFirstItem; //0x0C
UnitAny *pLastItem; //0x10
DWORD _1[2]; //0x14
DWORD dwLeftItemUid; //0x1C
UnitAny *pCursorItem; //0x20
DWORD dwOwnerId; //0x24
DWORD dwItemCount; //0x28
};
struct Light {
DWORD _1[3]; //0x00
DWORD dwType; //0x0C
DWORD _2[7]; //0x10
DWORD dwStaticValid; //0x2C
int *pnStaticMap; //0x30
};
struct SkillInfo {
WORD wSkillId; //0x00
};
struct Skill {
SkillInfo *pSkillInfo; //0x00
Skill *pNextSkill; //0x04
DWORD _1[8]; //0x08
DWORD dwSkillLevel; //0x28
DWORD _2[2]; //0x2C
DWORD dwFlags; //0x30
};
struct Info {
BYTE *pGame1C; //0x00
Skill *pFirstSkill; //0x04
Skill *pLeftSkill; //0x08
Skill *pRightSkill; //0x0C
};
struct ItemData
{
DWORD dwQuality;
DWORD _1[2];
DWORD dwItemFlags;
DWORD _2[2];
DWORD dwFlags;
DWORD _3[3];
DWORD dwQuality2;
DWORD dwItemLevel;
DWORD _4[2];
WORD wPrefix;
WORD _5[2];
WORD wSuffix;
DWORD _6;
BYTE BodyLocation;
BYTE ItemLocation;
BYTE _7;
WORD _8;
DWORD _9[4];
Inventory *pOwnerInventory;
DWORD _10;
UnitAny *pNextInvItem;
BYTE _11;
BYTE NodePage;
WORD _12;
DWORD _13[6];
UnitAny *pOwner;
};
struct ItemTxt {
wchar_t szName2[0x40]; //0x00
union {
DWORD dwCode;
char szCode[4];
}; //0x40
BYTE _2[0x70]; //0x84
WORD nLocaleTxtNo; //0xF4
BYTE _2a[0x19]; //0xF7
BYTE xSize; //0xFC
BYTE ySize; //0xFD
BYTE _2b[13]; //0xFE
BYTE nType; //0x11E
BYTE _3[0x0d]; //0x11F
BYTE fQuest; //0x12A
};
struct MonsterTxt {
BYTE _1[0x6]; //0x00
WORD nLocaleTxtNo; //0x06
WORD flag; //0x08
WORD _1a; //0x0A
union {
DWORD flag1; //0x0C
struct {
BYTE flag1a; //0x0C
BYTE flag1b; //0x0D
BYTE flag1c[2]; //0x0E
};
};
BYTE _2[0x22]; //0x10
WORD velocity; //0x32
BYTE _2a[0x52]; //0x34
WORD tcs[3][4]; //0x86
BYTE _2b[0x52]; //0x9E
wchar_t szDescriptor[0x3c]; //0xF0
BYTE _3[0x1a0]; //0x12C
};
struct MonsterData {
BYTE _1[22]; //0x00
struct
{
BYTE fUnk:1;
BYTE fNormal:1;
BYTE fChamp:1;
BYTE fBoss:1;
BYTE fMinion:1;
}; //0x16
WORD _2; //0x17
DWORD _3; //0x18
BYTE anEnchants[9]; //0x1C
BYTE _4; //0x25
WORD wUniqueNo; //0x26
DWORD _5; //0x28
struct {
wchar_t wName[28];
}; //0x2C
};
struct ObjectTxt {
char szName[0x40]; //0x00
wchar_t wszName[0x40]; //0x40
BYTE _1[4]; //0xC0
BYTE nSelectable0; //0xC4
BYTE _2[0x87]; //0xC5
BYTE nOrientation; //0x14C
BYTE _2b[0x19]; //0x14D
BYTE nSubClass; //0x166
BYTE _3[0x11]; //0x167
BYTE nParm0; //0x178
BYTE _4[0x39]; //0x179
BYTE nPopulateFn; //0x1B2
BYTE nOperateFn; //0x1B3
BYTE _5[8]; //0x1B4
DWORD nAutoMap; //0x1BB
};
struct ObjectData {
ObjectTxt *pTxt; //0x00
DWORD Type; //0x04 (0x0F would be a Exp Shrine)
DWORD _1[8]; //0x08
char szOwner[0x10]; //0x28
};
struct ObjectPath {
Room1 *pRoom1; //0x00
DWORD _1[2]; //0x04
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
//Leaving rest undefined, use Path
};
struct UnitAny {
DWORD dwType; //0x00
DWORD dwTxtFileNo; //0x04
DWORD _1; //0x08
DWORD dwUnitId; //0x0C
DWORD dwMode; //0x10
union
{
PlayerData *pPlayerData;
ItemData *pItemData;
MonsterData *pMonsterData;
ObjectData *pObjectData;
//TileData *pTileData doesn't appear to exist anymore
}; //0x14
DWORD dwAct; //0x18
Act *pAct; //0x1C
DWORD dwSeed[2]; //0x20
DWORD _2; //0x28
union
{
Path *pPath;
ItemPath *pItemPath;
ObjectPath *pObjectPath;
}; //0x2C
DWORD _3[5]; //0x30
DWORD dwGfxFrame; //0x44
DWORD dwFrameRemain; //0x48
WORD wFrameRate; //0x4C
WORD _4; //0x4E
BYTE *pGfxUnk; //0x50
DWORD *pGfxInfo; //0x54
DWORD _5; //0x58
StatList *pStats; //0x5C
Inventory *pInventory; //0x60
Light *ptLight; //0x64
DWORD _6[9]; //0x68
WORD wX; //0x8C
WORD wY; //0x8E
DWORD _7; //0x90
DWORD dwOwnerType; //0x94
DWORD dwOwnerId; //0x98
DWORD _8[2]; //0x9C
OverheadMsg* pOMsg; //0xA4
Info *pInfo; //0xA8
DWORD _9[6]; //0xAC
DWORD dwFlags; //0xC4
DWORD dwFlags2; //0xC8
DWORD _10[5]; //0xCC
UnitAny *pChangedNext; //0xE0
UnitAny *pRoomNext; //0xE4
UnitAny *pListNext; //0xE8 -> 0xD8
char szNameCopy[0x10]; //+0x66
};
struct BnetData
{
DWORD dwId; //0x00
DWORD dwId2; //0x04
DWORD _1[3]; //0x08
DWORD dwId3; //0x14
WORD Unk3; //0x18
char szGameName[22]; //0x1A
char szGameIP[16]; //0x30
DWORD _2[16]; //0x40
DWORD dwId4; //0x80
DWORD _3; //0x84
char szAccountName[48]; //0x88
char szPlayerName[24]; //0xB8
char szRealmName[8]; //0xD0
BYTE _4[273]; //0xD8
BYTE nCharClass; //0x1E9
BYTE nCharFlags; //0x1EA
BYTE nMaxDiff; //0x1EB
BYTE _5[31]; //0x1EC
BYTE nDifficulty; //0x20B
void *_6; //0x20C
DWORD _7[5]; //0x210
WORD _8; //0x224
BYTE _9; //0x226
char szRealmName2[24]; //0x227
char szGamePass[24]; //0x23F
char szGameDesc[256]; //0x257
WORD _10; //0x348
BYTE _11; //0x34B
};
struct WardenClientRegion_t
{
DWORD cbAllocSize; //+00
DWORD offsetFunc1; //+04
DWORD offsetRelocAddressTable; //+08
DWORD nRelocCount; //+0c
DWORD offsetWardenSetup; //+10
DWORD _2[2];
DWORD offsetImportAddressTable; //+1c
DWORD nImportDllCount; //+20
DWORD nSectionCount; //+24
};
struct SMemBlock_t {
DWORD _1[6];
DWORD cbSize; //+18
DWORD _2[31];
BYTE data[1]; //+98
};
struct WardenClient_t {
WardenClientRegion_t* pWardenRegion; //+00
DWORD cbSize; //+04
DWORD nModuleCount; //+08
DWORD param; //+0c
DWORD fnSetupWarden; //+10
};
struct WardenIATInfo_t
{
DWORD offsetModuleName;
DWORD offsetImportTable;
};
struct AttackStruct
{
DWORD dwAttackType; //0x00
UnitAny* lpPlayerUnit; //0x04
UnitAny* lpTargetUnit; //0x08
DWORD dwTargetX; //0x0C
DWORD dwTargetY; //0x10
DWORD _1; //0x14
DWORD _2; //0x18
};
struct Skill_t {
CHAR name[64];
WORD skillID;
};
#pragma pack(push)
#pragma pack(1)
typedef struct {
DWORD dwNPCClassId;
DWORD dwEntryAmount;
WORD wEntryId1;
WORD wEntryId2;
WORD wEntryId3;
WORD wEntryId4;
WORD _1;
DWORD dwEntryFunc1;
DWORD dwEntryFunc2;
DWORD dwEntryFunc3;
DWORD dwEntryFunc4;
BYTE _2[5];
} NPCMenu;
struct OverheadMsg {
DWORD _1;
DWORD dwTrigger;
DWORD _2[2];
CHAR Msg[232];
};
#pragma pack(pop)
struct D2MSG {
HWND myHWND;
char lpBuf[256];
};
struct InventoryLayout
{
BYTE SlotWidth;
BYTE SlotHeight;
BYTE unk1;
BYTE unk2;
DWORD Left;
DWORD Right;
DWORD Top;
DWORD Bottom;
BYTE SlotPixelWidth;
BYTE SlotPixelHeight;
};
struct MpqTable
{
};
struct sgptDataTable
{
MpqTable* pPlayerClass;
DWORD dwPlayerClassRecords;
MpqTable* pBodyLocs;
DWORD dwBodyLocsRecords;
MpqTable* pStorePage;
DWORD dwStorePageRecords;
MpqTable* pElemTypes;
};
//////////////////////////////////////////////////////////////////////
// Unit Affection ID Definition
//////////////////////////////////////////////////////////////////////
#define AFFECT_NONE 0
#define AFFECT_FREEZE 1
#define AFFECT_POISON 2
#define AFFECT_RESISTFIRE 3
#define AFFECT_RESISTCOLD 4
#define AFFECT_RESISTLIGHT 5
#define AFFECT_RESISTMAGIC 6
#define AFFECT_PLAYERBODY 7
#define AFFECT_RESISTALL 8
#define AFFECT_AMPLIFYDAMAGE 9
#define AFFECT_FROZENARMOR 10
#define AFFECT_COLD 11
#define AFFECT_INFERNO 12
#define AFFECT_BLAZE 13
#define AFFECT_BONEARMOR 14
#define AFFECT_CONCENTRATE 15
#define AFFECT_ENCHANT 16
#define AFFECT_INNERSIGHT 17
#define AFFECT_SKILL_MOVE 18
#define AFFECT_WEAKEN 19
#define AFFECT_CHILLINGARMOR 20
#define AFFECT_STUNNED 21
#define AFFECT_SPIDERLAY 22
#define AFFECT_DIMVISION 23
#define AFFECT_SLOWED 24
#define AFFECT_FETISHAURA 25
#define AFFECT_SHOUT 26
#define AFFECT_TAUNT 27
#define AFFECT_CONVICTION 28
#define AFFECT_CONVICTED 29
#define AFFECT_ENERGYSHIELD 30
#define AFFECT_VENOMCLAWS 31
#define AFFECT_BATTLEORDERS 32
#define AFFECT_MIGHT 33
#define AFFECT_PRAYER 34
#define AFFECT_HOLYFIRE 35
#define AFFECT_THORNS 36
#define AFFECT_DEFIANCE 37
#define AFFECT_THUNDERSTORM 38
#define AFFECT_LIGHTNINGBOLT 39
#define AFFECT_BLESSEDAIM 40
#define AFFECT_VIGOR 41
#define AFFECT_CONCENTRATION 42
#define AFFECT_HOLYFREEZE 43
#define AFFECT_HOLYFREEZECHILL 44
#define AFFECT_CLEANSING 45
#define AFFECT_HOLYSHOCK 46
#define AFFECT_SANCTUARY 47
#define AFFECT_MEDITATION 48
#define AFFECT_FANATICISM 49
#define AFFECT_REDEMPTION 50
#define AFFECT_BATTLECOMMAND 51
#define AFFECT_PREVENTHEAL 52
#define AFFECT_CONVERSION 53
#define AFFECT_UNINTERRUPTABLE 54
#define AFFECT_IRONMAIDEN 55
#define AFFECT_TERROR 56
#define AFFECT_ATTRACT 57
#define AFFECT_LIFETAP 58
#define AFFECT_CONFUSE 59
#define AFFECT_DECREPIFY 60
#define AFFECT_LOWERRESIST 61
#define AFFECT_OPENWOUNDS 62
#define AFFECT_DOPPLEZON 63
#define AFFECT_CRITICALSTRIKE 64
#define AFFECT_DODGE 65
#define AFFECT_AVOID 66
#define AFFECT_PENETRATE 67
#define AFFECT_EVADE 68
#define AFFECT_PIERCE 69
#define AFFECT_WARMTH 70
#define AFFECT_FIREMASTERY 71
#define AFFECT_LIGHTNINGMASTERY 72
#define AFFECT_COLDMASTERY 73
#define AFFECT_SWORDMASTERY 74
#define AFFECT_AXEMASTERY 75
#define AFFECT_MACEMASTERY 76
#define AFFECT_POLEARMMASTERY 77
#define AFFECT_THROWINGMASTERY 78
#define AFFECT_SPEARMASTERY 79
#define AFFECT_INCREASEDSTAMINA 80
#define AFFECT_IRONSKIN 81
#define AFFECT_INCREASEDSPEED 82
#define AFFECT_NATURALRESISTANCE 83
#define AFFECT_FINGERMAGECURSE 84
#define AFFECT_NOMANAREGEN 85
#define AFFECT_JUSTHIT 86
#define AFFECT_SLOWMISSILES 87
#define AFFECT_SHIVERARMOR 88
#define AFFECT_BATTLECRY 89
#define AFFECT_BLUE 90
#define AFFECT_RED 91
#define AFFECT_DEATH_DELAY 92
#define AFFECT_VALKYRIE 93
#define AFFECT_FRENZY 94
#define AFFECT_BERSERK 95
#define AFFECT_REVIVE 96
#define AFFECT_ITEMFULLSET 97
#define AFFECT_SOURCEUNIT 98
#define AFFECT_REDEEMED 99
#define AFFECT_HEALTHPOT 100
#define AFFECT_HOLYSHIELD 101
#define AFFECT_JUST_PORTALED 102
#define AFFECT_MONFRENZY 103
#define AFFECT_CORPSE_NODRAW 104
#define AFFECT_ALIGNMENT 105
#define AFFECT_MANAPOT 106
#define AFFECT_SHATTER 107
#define AFFECT_SYNC_WARPED 108
#define AFFECT_CONVERSION_SAVE 109
#define AFFECT_PREGNANT 110
#define AFFECT_111 111
#define AFFECT_RABIES 112
#define AFFECT_DEFENSE_CURSE 113
#define AFFECT_BLOOD_MANA 114
#define AFFECT_BURNING 115
#define AFFECT_DRAGONFLIGHT 116
#define AFFECT_MAUL 117
#define AFFECT_CORPSE_NOSELECT 118
#define AFFECT_SHADOWWARRIOR 119
#define AFFECT_FERALRAGE 120
#define AFFECT_SKILLDELAY 121
#define AFFECT_PROGRESSIVE_DAMAGE 122
#define AFFECT_PROGRESSIVE_STEAL 123
#define AFFECT_PROGRESSIVE_OTHER 124
#define AFFECT_PROGRESSIVE_FIRE 125
#define AFFECT_PROGRESSIVE_COLD 126
#define AFFECT_PROGRESSIVE_LIGHTNING 127
#define AFFECT_SHRINE_ARMOR 128
#define AFFECT_SHRINE_COMBAT 129
#define AFFECT_SHRINE_RESIST_LIGHTNING 130
#define AFFECT_SHRINE_RESIST_FIRE 131
#define AFFECT_SHRINE_RESIST_COLD 132
#define AFFECT_SHRINE_RESIST_POISON 133
#define AFFECT_SHRINE_SKILL 134
#define AFFECT_SHRINE_MANA_REGEN 135
#define AFFECT_SHRINE_STAMINA 136
#define AFFECT_SHRINE_EXPERIENCE 137
#define AFFECT_FENRIS_RAGE 138
#define AFFECT_WOLF 139
#define AFFECT_BEAR 140
#define AFFECT_BLOODLUST 141
#define AFFECT_CHANGECLASS 142
#define AFFECT_ATTACHED 143
#define AFFECT_HURRICANE 144
#define AFFECT_ARMAGEDDON 145
#define AFFECT_INVIS 146
#define AFFECT_BARBS 147
#define AFFECT_WOLVERINE 148
#define AFFECT_OAKSAGE 149
#define AFFECT_VINE_BEAST 150
#define AFFECT_CYCLONEARMOR 151
#define AFFECT_CLAWMASTERY 152
#define AFFECT_CLOAK_OF_SHADOWS 153
#define AFFECT_RECYCLED 154
#define AFFECT_WEAPONBLOCK 155
#define AFFECT_CLOAKED 156
#define AFFECT_BURSTOFSPEED 157
#define AFFECT_BLADESHIELD 158
#define AFFECT_FADE 159
typedef struct ItemStruct_t {
BYTE MessageID;
BYTE Action;
BYTE MessageSize;
BYTE ItemType;
DWORD ItemID;
// flags
BOOL isSocketsFull;
BOOL isIdentified;
BOOL isEthereal;
BOOL isSwitchin;
BOOL isSwitchout;
BOOL isBroken;
BOOL fromBelt;
BOOL hasSockets;
BOOL isJustGenerated;
BOOL isEar;
BOOL isStartitem;
BOOL isMiscItem; // unverified
BOOL isPersonalized;
BOOL isGamble;
BOOL isRuneWord; // unverified
BOOL isMagicExtra; // unverified
WORD MPQVersionField;
BYTE Location;
WORD PositionX;
WORD PositionY;
char ItemCode[5];
BYTE ItemLevel;
// gold specific
BOOL GoldSize;
DWORD GoldAmount;
//////////////////////////// CHECKS
BOOL DoNotTryWhenFull;
} ITEMSTRUCT;
enum UnitNo {
UNITNO_PLAYER = 0,
UNITNO_MONSTER = 1,
UNITNO_OBJECT = 2,
UNITNO_MISSILE = 3,
UNITNO_ITEM = 4,
UNITNO_ROOMTILE = 5
};
enum { UNIT_PLAYER, UNIT_MONSTER, UNIT_OBJECT, UNIT_MISSILE, UNIT_ITEM, UNIT_ROOMTILE, UNIT_ALL };
#endif