Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 18th, 2010 | Syntax: C++ | Size: 28.59 KB | Hits: 58 | Expires: Never
Copy text to clipboard
  1. #ifndef _D2STRUCTS_H
  2. #define _D2STRUCTS_H
  3.  
  4. #pragma once
  5. #include <string>
  6.  
  7. using namespace std;
  8.  
  9. struct LevelNameInfo;
  10. struct UnitAny;
  11. struct Room1;
  12. struct Room2;
  13. struct Level;
  14. struct Act;
  15. struct ActMisc;
  16. struct RosterUnit;
  17. struct OverheadMsg;
  18. struct D2Struct;
  19.  
  20. struct ControlText {
  21.         wchar_t* wText; //0x00
  22.         wchar_t* wText2;//0x04
  23.         DWORD _1[3];    //0x08
  24.         DWORD dwColor;  //0x14
  25.         DWORD _2;               //0x18
  26.         ControlText* pNext;//0x1C
  27. };
  28.  
  29. struct ControlPreferences
  30. {
  31.         DWORD dwType;//0x00
  32.         // ..
  33. };
  34.  
  35. struct GameListEntry
  36. {
  37.         WORD wRequestId;
  38.         DWORD dwIndex;
  39.         BYTE bPlayers;
  40.         DWORD dwStatus;
  41.         string sGameName;
  42.         string sGameDesc;
  43. };
  44.  
  45.  
  46. struct D2Struct {
  47.         DWORD PID;
  48.         HANDLE D2Handle;
  49.         DWORD D2ClientBase;
  50.  
  51.         DWORD PlayerUnit;
  52. };
  53.  
  54. struct LevelNameInfo
  55. {
  56.         int nX;
  57.         int nY;
  58.         int nLevelId;
  59.         int nAct;
  60. };
  61.  
  62. struct InventoryInfo
  63. {
  64.         int nLocation;
  65.         int nMaxXCells;
  66.         int nMaxYCells;
  67. };
  68.  
  69. struct GameStructInfo
  70. {
  71.   BYTE _1[0x1B];
  72.   char szGameName[0x18]; // 0x1B
  73.   char szGameServerIp[0x56]; // 0x33
  74.   char szAccountName[0x30]; // 0x89
  75.   char szCharName[0x18]; // 0xB9
  76.   char szRealmName[0x18]; // 0xD1
  77.   BYTE _2[0x158];
  78.   char szGamePassword[0x18]; // 0x241
  79. };
  80. struct AutomapCell {
  81.         DWORD fSaved;                                   //0x00
  82.         WORD nCellNo;                                   //0x04
  83.         WORD xPixel;                                    //0x06
  84.         WORD yPixel;                                    //0x08
  85.         WORD wWeight;                                   //0x0A
  86.         AutomapCell *pLess;                             //0x0C
  87.         AutomapCell *pMore;                             //0x10
  88. };
  89.  
  90. struct GfxCell {
  91.         DWORD flags;                                    //0x00
  92.         DWORD width;                                    //0x04
  93.         DWORD height;                                   //0x08
  94.         DWORD xoffs;                                    //0x0C
  95.         DWORD yoffs;                                    //0x10
  96.         DWORD _2;                                               //0x14
  97.         DWORD lpParent;                                 //0x18
  98.         DWORD length;                                   //0x1C
  99.         BYTE cols;                                              //0x20
  100. };
  101.  
  102.  
  103. struct InteractStruct
  104. {
  105.         DWORD dwMoveType;                       //0x00
  106.         UnitAny* lpPlayerUnit;          //0x04
  107.         UnitAny* lpTargetUnit;          //0x08
  108.         DWORD dwTargetX;                        //0x0C
  109.         DWORD dwTargetY;                        //0x10
  110.         DWORD _1;                                       //0x14
  111.         DWORD _2;                                       //0x18
  112. };
  113.  
  114. struct CellFile {
  115.         DWORD dwVersion;                                //0x00
  116.         struct {
  117.                 WORD dwFlags;
  118.                 BYTE mylastcol;
  119.                 BYTE mytabno:1;
  120.         };                                                              //0x04
  121.         DWORD eFormat;                                  //0x08
  122.         DWORD termination;                              //0x0C
  123.         DWORD numdirs;                                  //0x10
  124.         DWORD numcells;                                 //0x14
  125.         GfxCell *cells[1];                              //0x18
  126. };
  127.  
  128. struct CellContext {
  129.         DWORD direction;                                //0x00
  130.         GfxCell *hCell;                                 //0x04
  131.         DWORD _1[0xD];                                  //0x08
  132.         CellFile* pCellFile;                    //0x3C
  133.         DWORD _2;                                               //0x40
  134.         DWORD nCellNo;                                  //0x44
  135. };
  136.  
  137. struct AutomapLayer {
  138.         DWORD nLayerNo;                                 //0x00
  139.         DWORD fSaved;                                   //0x04
  140.         AutomapCell *pFloors;                   //0x08
  141.         AutomapCell *pWalls;                    //0x0C
  142.         AutomapCell *pObjects;                  //0x10
  143.         AutomapCell *pExtras;                   //0x14
  144.         AutomapLayer *pNextLayer;               //0x18
  145. };
  146.  
  147. struct AutomapLayer2 {
  148.         DWORD _1[2];                                    //0x00
  149.         DWORD nLayerNo;                                 //0x08
  150. };
  151.  
  152. struct LevelTxt {
  153.         DWORD dwLevelNo;                                //0x00
  154.         DWORD _1[60];                                   //0x04
  155.         BYTE _2;                                                //0xF4
  156.         wchar_t szName[40]; //+16e
  157.         char szEntranceText[40];                //0x11D
  158.         char szLevelDesc[41];                   //0x145
  159.         wchar_t wName[40];                              //0x16E
  160.         wchar_t wEntranceText[40];              //0x1BE
  161.         BYTE nObjGroup[8];                              //0x196
  162.         BYTE nObjPrb[8];                                //0x19E
  163. };
  164.  
  165. struct Control {
  166.    DWORD dwType;                                        //0x00
  167.    CellFile *pCellFile;                         //0x04
  168.    DWORD dwDisabled;                            //0x08
  169.    DWORD dwPosX;                                        //0x0C
  170.    DWORD dwPosY;                                        //0x10
  171.    DWORD dwSizeX;                                       //0x14
  172.    DWORD dwSizeY;                                       //0x18
  173.    VOID (__fastcall *Initialize)(Control* pControl);//0x1c
  174.    DWORD _3;                                            //0x20
  175.    DWORD *_4;                                           //0x24
  176.    DWORD *_5;                                           //0x28
  177.    DWORD _6;                                            //0x2C
  178.    DWORD *_7;                                           //0x30
  179.    DWORD *_8;                                           //0x34
  180.    DWORD _9;                                            //0x38
  181.    Control* pNext;                                      //0x3C
  182.    DWORD _10;                                           //0x40
  183.    DWORD dwMaxLength;                           //0x44
  184.    union {
  185.            ControlText* pFirstText;             //0x48
  186.            DWORD dwScrollEntries;               //0x48
  187.    };
  188.    union {
  189.        ControlText* pLastText;          //0x4C
  190.            DWORD dwScrollPosition;              //0x4C
  191.    };
  192.    ControlText* pSelectedText;          //0x50
  193.    DWORD dwSelectEnd;                           //0x54
  194.    DWORD dwSelectStart;                         //0x58
  195.    wchar_t wText[0x1A];                         //0x5C
  196.    Control* pChildControl;                      //0x90
  197. };
  198.  
  199. #pragma pack(push)
  200. #pragma pack(1)
  201. struct RoomTile //Updated
  202. {
  203.   DWORD _1[2];
  204.   Room2* pRoom2; // 0x08
  205.   DWORD *nNum; // 0x0C
  206.   DWORD _2;
  207.   RoomTile* pNext; // 0x14
  208. };
  209. struct RosterUnit {
  210.         char szName[16];                                //0x00
  211.         DWORD dwUnitId;                                 //0x10
  212.         DWORD dwPartyLife;                              //0x14
  213.         DWORD _1;                                               //0x18
  214.         DWORD dwClassId;                //0x1C
  215.         WORD wLevel;                                    //0x20
  216.         WORD wPartyId;                                  //0x22
  217.         DWORD dwLevelId;                //0x24
  218.         DWORD Xpos;                                             //0x28
  219.         DWORD Ypos;                                             //0x2C
  220.         DWORD dwPartyFlags;                             //0x30
  221.         BYTE * _5;                                              //0x34
  222.         DWORD _6[11];                                   //0x38
  223.         WORD _7;                                                //0x64
  224.         char szName2[16];                               //0x66
  225.         WORD _8;                                                //0x76
  226.         DWORD _9[2];                                    //0x78
  227.         RosterUnit * pNext;                             //0x80
  228. };
  229.  
  230. struct PartyPlayer {
  231. char name2[0x10]; //+00
  232. DWORD nUnitId; //+10
  233. DWORD life; //+14
  234. DWORD _2[1];
  235. DWORD chrtype; //+1c
  236. WORD chrlvl; //+20
  237. WORD partyno; //+22
  238. DWORD _3[4];
  239. DWORD flags; //+34
  240. DWORD mems; //+38
  241. BYTE _4[0x2a];
  242. char name[1]; //+66
  243. BYTE _5[0x1d];
  244. };
  245.  
  246. struct QuestInfo {
  247.         void *pBuffer;                                  //0x00
  248.         DWORD _1;                                               //0x04
  249. };
  250.  
  251. struct Waypoint {
  252.         BYTE flags;                                             //0x00
  253. };
  254.  
  255. struct PlayerData {
  256.         char szName[0x10];                              //0x00
  257.         QuestInfo *pNormalQuest;                //0x10
  258.         QuestInfo *pNightmareQuest;             //0x14
  259.         QuestInfo *pHellQuest;                  //0x18
  260.         Waypoint *pNormalWaypoint;              //0x1c
  261.         Waypoint *pNightmareWaypoint;   //0x20
  262.         Waypoint *pHellWaypoint;                //0x24
  263. };
  264.  
  265. struct CollMap {
  266.         DWORD dwPosGameX;                               //0x00
  267.         DWORD dwPosGameY;                               //0x04
  268.         DWORD dwSizeGameX;                              //0x08
  269.         DWORD dwSizeGameY;                              //0x0C
  270.         DWORD dwPosRoomX;                               //0x10
  271.         DWORD dwPosRoomY;                               //0x14
  272.         DWORD dwSizeRoomX;                              //0x18
  273.         DWORD dwSizeRoomY;                              //0x1C
  274.         WORD *pMapStart;                                //0x20
  275.         WORD *pMapEnd;                                  //0x22
  276. };
  277. struct PresetUnit // Updated
  278. {
  279.   DWORD dwPosY; // 0x00
  280.   PresetUnit* pPresetNext; // 0x04
  281.   DWORD dwPosX; // 0x08
  282.   DWORD dwTxtFileNo; // 0x0C
  283.   DWORD dwType; // 0x10
  284. };
  285. struct Level  // Updated
  286. {
  287.   BYTE _1[0x18C];
  288.   DWORD dwPosX; // 0x18C
  289.   DWORD dwPosY; // 0x190
  290.   DWORD dwSizeY; // 0x194
  291.   DWORD dwSizeX; // 0x198
  292.   DWORD dwLevelNo; // 0x19C
  293.   DWORD _2[3];
  294.   DWORD dwSeed[2]; // 0x1AC
  295.   DWORD _3;
  296.   Room2 *pRoom2First; // 0x1B8
  297.   DWORD _4;
  298.   ActMisc *pMisc; // 0x1C0
  299.   Level *pNextLevel; // 0x1C4
  300. };
  301. struct Room2 //Updated
  302. {
  303.   DWORD dwPosX; // 0x00
  304.   DWORD dwPosY; // 0x04
  305.   DWORD dwSizeX; // 0x08
  306.   DWORD dwSizeY; // 0x0C
  307.   Room2 **pRoom2Near; // 0x10
  308.   BYTE _1[0x84];
  309.   DWORD dwSeed[2]; // 0x98
  310.   DWORD _2[2];
  311.   Room2 *pRoom2Next; // 0xA8
  312.   DWORD _3;
  313.   DWORD dwRoomsNear; // 0xB0
  314.   DWORD _4[2];
  315.   Level *pLevel; // 0xBC
  316.   Room1 *pRoom1; // 0xC0
  317.   Room2 *pRoom2Prev; // 0xC4
  318.   DWORD _5[5];
  319.   PresetUnit *pPreset; // 0xDC
  320.   Room2 *pRoom2Other; // 0xE0
  321.   RoomTile *pRoomTiles; // 0xE4
  322. };
  323.  
  324. #pragma pack(pop)
  325.  
  326. struct Room1 //Updated
  327. {
  328.   DWORD _1;
  329.   DWORD dwRoomsNear; // 0x04
  330.   DWORD _2;
  331.   Room2* pRoom2; // 0x0C
  332.   BYTE _3[0x24];
  333.   Room1 **pRoomsNear; // 0x34
  334.   DWORD _4[3];
  335.   CollMap* Coll; // 0x44
  336.   DWORD dwSeed[2]; // 0x48
  337.   Room1* pRoomNext; // 0x50
  338.   DWORD dwXStart; // 0x54
  339.   DWORD dwYStart; // 0x58
  340.   DWORD dwXSize; // 0x5C
  341.   DWORD dwYSize; // 0x60
  342.   DWORD r_x; // 0x64
  343.   DWORD r_y; // 0x68
  344.   DWORD r_size_x; // 0x6C
  345.   DWORD r_size_y; // 0x70
  346.   DWORD _5;
  347.   UnitAny* pUnitFirst; // 0x78
  348.   Act *pAct; // 0x7C  
  349. };
  350.  
  351. struct ActMisc // Updated
  352. {
  353.   DWORD _1[2];
  354.   DWORD dwStaffTombLevel; // 0x08
  355.   BYTE _2[0x3D4];
  356.   Act *pAct; // 0x3E0
  357.   DWORD _3[4];
  358.   Level *pLevelFirst; // 0x3F4
  359. };
  360.  
  361. struct Act //updated
  362. {
  363.   DWORD _1[3];
  364.   Room1* pRoom1; // 0x0C
  365.   BYTE _2[0x44];
  366.   DWORD dwAct; // 0x54
  367.   DWORD _3;
  368.   ActMisc* pMisc; // 0x5C
  369. };
  370.  
  371.  
  372. struct Path {
  373.         WORD xOffset;                                   //0x00
  374.         WORD xPos;                                              //0x02
  375.         WORD yOffset;                                   //0x04
  376.         WORD yPos;                                              //0x06
  377.         DWORD _1[2];                                    //0x08
  378.         WORD xTarget;                                   //0x10
  379.         WORD yTarget;                                   //0x12
  380.         DWORD _2[2];                                    //0x14
  381.         Room1 *pRoom1;                                  //0x1C
  382.         Room1 *pRoomUnk;                                //0x20
  383.         DWORD _3[3];                                    //0x24
  384.         UnitAny *pUnit;                                 //0x30
  385.         DWORD dwFlags;                                  //0x34
  386.         DWORD _4;                                               //0x38
  387.         DWORD dwPathType;                               //0x3C
  388.         DWORD dwPrevPathType;                   //0x40
  389.         DWORD dwUnitSize;                               //0x44
  390.         DWORD _5[4];                                    //0x48
  391.         UnitAny *pTargetUnit;                   //0x58
  392.         DWORD dwTargetType;                             //0x5C
  393.         DWORD dwTargetId;                               //0x60
  394.         BYTE bDirection;                                //0x64
  395. };
  396.  
  397. struct ItemPath {
  398.         DWORD _1[3];                                    //0x00
  399.         DWORD dwPosX;                                   //0x0C
  400.         DWORD dwPosY;                                   //0x10
  401.         //Use Path for the rest
  402. };
  403.  
  404. struct Stat {
  405.         WORD wSubIndex;                                 //0x00
  406.         WORD wStatIndex;                                //0x02
  407.         DWORD dwStatValue;                              //0x04
  408. };
  409.  
  410. struct StatList {
  411.         DWORD _1[9];                                    //0x00
  412.         Stat *pStat;                                    //0x24
  413.         WORD wStatCount1;                               //0x28
  414.         WORD wStatCount2;                               //0x2A
  415.         DWORD _2[2];                                    //0x2C
  416.         BYTE *_3;                                               //0x34
  417.         DWORD _4;                                               //0x38
  418.         StatList *pNext;                                //0x3C
  419. };
  420.  
  421. struct Inventory {
  422.         DWORD dwSignature;                              //0x00
  423.         BYTE *bGame1C;                                  //0x04
  424.         UnitAny *pOwner;                                //0x08
  425.         UnitAny *pFirstItem;                    //0x0C
  426.         UnitAny *pLastItem;                             //0x10
  427.         DWORD _1[2];                                    //0x14
  428.         DWORD dwLeftItemUid;                    //0x1C
  429.         UnitAny *pCursorItem;                   //0x20
  430.         DWORD dwOwnerId;                                //0x24
  431.         DWORD dwItemCount;                              //0x28
  432. };
  433.  
  434. struct Light {
  435.         DWORD _1[3];                                    //0x00
  436.         DWORD dwType;                                   //0x0C
  437.         DWORD _2[7];                                    //0x10
  438.         DWORD dwStaticValid;                    //0x2C
  439.         int *pnStaticMap;                               //0x30
  440. };
  441.  
  442. struct SkillInfo {
  443.         WORD wSkillId;                                  //0x00
  444. };
  445.  
  446. struct Skill {
  447.         SkillInfo *pSkillInfo;                  //0x00
  448.         Skill *pNextSkill;                              //0x04
  449.         DWORD _1[8];                                    //0x08
  450.         DWORD dwSkillLevel;                             //0x28
  451.         DWORD _2[2];                                    //0x2C
  452.         DWORD dwFlags;                                  //0x30
  453. };
  454.  
  455. struct Info {
  456.         BYTE *pGame1C;                                  //0x00
  457.         Skill *pFirstSkill;                             //0x04
  458.         Skill *pLeftSkill;                              //0x08
  459.         Skill *pRightSkill;                             //0x0C
  460. };
  461. struct ItemData
  462. {
  463.         DWORD dwQuality;
  464.         DWORD _1[2];
  465.         DWORD dwItemFlags;
  466.         DWORD _2[2];
  467.         DWORD dwFlags;
  468.         DWORD _3[3];
  469.         DWORD dwQuality2;
  470.         DWORD dwItemLevel;
  471.         DWORD _4[2];
  472.         WORD wPrefix;
  473.         WORD _5[2];
  474.         WORD wSuffix;
  475.         DWORD _6;
  476.         BYTE BodyLocation;
  477.         BYTE ItemLocation;
  478.         BYTE _7;
  479.         WORD _8;
  480.         DWORD _9[4];
  481.         Inventory *pOwnerInventory;
  482.         DWORD _10;
  483.         UnitAny *pNextInvItem;
  484.         BYTE _11;
  485.         BYTE NodePage;
  486.         WORD _12;
  487.         DWORD _13[6];
  488.         UnitAny *pOwner;
  489. };
  490.  
  491. struct ItemTxt {
  492.         wchar_t szName2[0x40];                  //0x00
  493.         union {
  494.                 DWORD dwCode;
  495.                 char szCode[4];
  496.         };                                                              //0x40
  497.         BYTE _2[0x70];                                  //0x84
  498.         WORD nLocaleTxtNo;                              //0xF4
  499.         BYTE _2a[0x19];                                 //0xF7
  500.         BYTE xSize;                                             //0xFC
  501.         BYTE ySize;                                             //0xFD
  502.         BYTE _2b[13];                                   //0xFE
  503.         BYTE nType;                                             //0x11E
  504.         BYTE _3[0x0d];                                  //0x11F
  505.         BYTE fQuest;                                    //0x12A
  506. };
  507.  
  508. struct MonsterTxt {
  509.         BYTE _1[0x6];                                   //0x00
  510.         WORD nLocaleTxtNo;                              //0x06
  511.         WORD flag;                                              //0x08
  512.         WORD _1a;                                               //0x0A
  513.         union {
  514.                 DWORD flag1;                            //0x0C
  515.                 struct {
  516.                         BYTE flag1a;                    //0x0C
  517.                         BYTE flag1b;                    //0x0D
  518.                         BYTE flag1c[2];                 //0x0E
  519.                 };
  520.         };
  521.         BYTE _2[0x22];                                  //0x10
  522.         WORD velocity;                                  //0x32
  523.         BYTE _2a[0x52];                                 //0x34
  524.         WORD tcs[3][4];                                 //0x86
  525.         BYTE _2b[0x52];                                 //0x9E
  526.         wchar_t szDescriptor[0x3c];             //0xF0
  527.         BYTE _3[0x1a0];                                 //0x12C
  528. };
  529.  
  530. struct MonsterData {
  531.         BYTE _1[22];                                    //0x00
  532.         struct
  533.         {
  534.                 BYTE fUnk:1;
  535.                 BYTE fNormal:1;
  536.                 BYTE fChamp:1;
  537.                 BYTE fBoss:1;
  538.                 BYTE fMinion:1;
  539.         };                                                              //0x16
  540.         WORD _2;                                                //0x17
  541.         DWORD _3;                                               //0x18
  542.         BYTE anEnchants[9];                             //0x1C
  543.         BYTE _4;                                                //0x25
  544.         WORD wUniqueNo;                                 //0x26
  545.         DWORD _5;                                               //0x28
  546.         struct {
  547.                 wchar_t wName[28];
  548.         };                                                              //0x2C
  549. };
  550.  
  551. struct ObjectTxt {
  552.         char szName[0x40];                              //0x00
  553.         wchar_t wszName[0x40];                  //0x40
  554.         BYTE _1[4];                                             //0xC0
  555.         BYTE nSelectable0;                              //0xC4
  556.         BYTE _2[0x87];                                  //0xC5
  557.         BYTE nOrientation;                              //0x14C
  558.         BYTE _2b[0x19];                                 //0x14D
  559.         BYTE nSubClass;                                 //0x166
  560.         BYTE _3[0x11];                                  //0x167
  561.         BYTE nParm0;                                    //0x178
  562.         BYTE _4[0x39];                                  //0x179
  563.         BYTE nPopulateFn;                               //0x1B2
  564.         BYTE nOperateFn;                                //0x1B3
  565.         BYTE _5[8];                                             //0x1B4
  566.         DWORD nAutoMap;                                 //0x1BB
  567. };
  568.  
  569. struct ObjectData {
  570.         ObjectTxt *pTxt;                                //0x00
  571.         DWORD Type;                                             //0x04 (0x0F would be a Exp Shrine)
  572.         DWORD _1[8];                                    //0x08
  573.         char szOwner[0x10];                             //0x28
  574. };
  575.  
  576. struct ObjectPath {
  577.         Room1 *pRoom1;                                  //0x00
  578.         DWORD _1[2];                                    //0x04
  579.         DWORD dwPosX;                                   //0x0C
  580.         DWORD dwPosY;                                   //0x10
  581.         //Leaving rest undefined, use Path
  582. };
  583.  
  584. struct UnitAny {
  585.         DWORD dwType;                                   //0x00
  586.         DWORD dwTxtFileNo;                              //0x04
  587.         DWORD _1;                                               //0x08
  588.         DWORD dwUnitId;                                 //0x0C
  589.         DWORD dwMode;                                   //0x10
  590.         union
  591.         {
  592.                 PlayerData *pPlayerData;
  593.                 ItemData *pItemData;
  594.                 MonsterData *pMonsterData;
  595.                 ObjectData *pObjectData;
  596.                 //TileData *pTileData doesn't appear to exist anymore
  597.         };                                                              //0x14
  598.         DWORD dwAct;                                    //0x18
  599.         Act *pAct;                                              //0x1C
  600.         DWORD dwSeed[2];                                //0x20
  601.         DWORD _2;                                               //0x28
  602.         union
  603.         {
  604.                 Path *pPath;
  605.                 ItemPath *pItemPath;
  606.                 ObjectPath *pObjectPath;
  607.         };                                                              //0x2C
  608.         DWORD _3[5];                                    //0x30
  609.         DWORD dwGfxFrame;                               //0x44
  610.         DWORD dwFrameRemain;                    //0x48
  611.         WORD wFrameRate;                                //0x4C
  612.         WORD _4;                                                //0x4E
  613.         BYTE *pGfxUnk;                                  //0x50
  614.         DWORD *pGfxInfo;                                //0x54
  615.         DWORD _5;                                               //0x58
  616.         StatList *pStats;                               //0x5C
  617.         Inventory *pInventory;                  //0x60
  618.         Light *ptLight;                                 //0x64
  619.         DWORD _6[9];                                    //0x68
  620.         WORD wX;                                                //0x8C
  621.         WORD wY;                                                //0x8E
  622.         DWORD _7;                                               //0x90
  623.         DWORD dwOwnerType;                              //0x94
  624.         DWORD dwOwnerId;                                //0x98
  625.         DWORD _8[2];                                    //0x9C
  626.         OverheadMsg* pOMsg;                             //0xA4
  627.         Info *pInfo;                                    //0xA8
  628.         DWORD _9[6];                                    //0xAC
  629.         DWORD dwFlags;                                  //0xC4
  630.         DWORD dwFlags2;                                 //0xC8
  631.         DWORD _10[5];                                   //0xCC
  632.         UnitAny *pChangedNext;                  //0xE0
  633.         UnitAny *pRoomNext;                             //0xE4
  634.         UnitAny *pListNext;                             //0xE8 -> 0xD8
  635.         char szNameCopy[0x10]; //+0x66
  636. };
  637.  
  638. struct BnetData
  639. {
  640.         DWORD dwId;                                     //0x00
  641.         DWORD dwId2;                            //0x04
  642.         DWORD _1[3];                            //0x08
  643.         DWORD dwId3;                            //0x14
  644.         WORD Unk3;                                      //0x18
  645.         char szGameName[22];            //0x1A
  646.         char szGameIP[16];                      //0x30
  647.         DWORD _2[16];                           //0x40
  648.         DWORD dwId4;                            //0x80
  649.         DWORD _3;                                       //0x84
  650.         char szAccountName[48];         //0x88
  651.         char szPlayerName[24];          //0xB8
  652.         char szRealmName[8];            //0xD0
  653.         BYTE _4[273];                           //0xD8
  654.         BYTE nCharClass;                        //0x1E9
  655.         BYTE nCharFlags;                        //0x1EA
  656.         BYTE nMaxDiff;                          //0x1EB
  657.         BYTE _5[31];                            //0x1EC
  658.         BYTE nDifficulty;                       //0x20B
  659.         void *_6;                                       //0x20C
  660.         DWORD _7[5];                            //0x210
  661.         WORD _8;                                        //0x224
  662.         BYTE _9;                                        //0x226
  663.         char szRealmName2[24];          //0x227
  664.         char szGamePass[24];            //0x23F
  665.         char szGameDesc[256];           //0x257
  666.         WORD _10;                                       //0x348
  667.         BYTE _11;                                       //0x34B
  668. };
  669.  
  670.  
  671. struct WardenClientRegion_t
  672. {
  673.         DWORD cbAllocSize; //+00
  674.         DWORD offsetFunc1; //+04
  675.         DWORD offsetRelocAddressTable; //+08
  676.         DWORD nRelocCount; //+0c
  677.         DWORD offsetWardenSetup; //+10
  678.         DWORD _2[2];
  679.         DWORD offsetImportAddressTable; //+1c
  680.         DWORD nImportDllCount; //+20
  681.         DWORD nSectionCount; //+24
  682. };
  683.  
  684. struct SMemBlock_t {
  685.         DWORD _1[6];
  686.         DWORD cbSize; //+18
  687.         DWORD _2[31];
  688.         BYTE data[1]; //+98
  689. };
  690.  
  691. struct WardenClient_t {
  692.         WardenClientRegion_t* pWardenRegion; //+00
  693.         DWORD cbSize; //+04
  694.         DWORD nModuleCount; //+08
  695.         DWORD param; //+0c
  696.         DWORD fnSetupWarden; //+10
  697. };
  698.  
  699. struct WardenIATInfo_t
  700. {
  701.         DWORD offsetModuleName;
  702.         DWORD offsetImportTable;
  703. };
  704.  
  705. struct AttackStruct
  706. {
  707.         DWORD dwAttackType;                     //0x00
  708.         UnitAny* lpPlayerUnit;          //0x04
  709.         UnitAny* lpTargetUnit;          //0x08
  710.         DWORD dwTargetX;                        //0x0C
  711.         DWORD dwTargetY;                        //0x10
  712.         DWORD _1;                                       //0x14
  713.         DWORD _2;                                       //0x18
  714. };
  715.  
  716.  
  717.  
  718. struct Skill_t {
  719.         CHAR                    name[64];
  720.         WORD                    skillID;
  721. };
  722. #pragma pack(push)
  723. #pragma pack(1)
  724.  
  725. typedef struct  {
  726.         DWORD dwNPCClassId;
  727.         DWORD dwEntryAmount;
  728.         WORD wEntryId1;
  729.         WORD wEntryId2;
  730.         WORD wEntryId3;
  731.         WORD wEntryId4;
  732.         WORD _1;
  733.         DWORD dwEntryFunc1;
  734.         DWORD dwEntryFunc2;
  735.         DWORD dwEntryFunc3;
  736.         DWORD dwEntryFunc4;
  737.         BYTE _2[5];
  738. } NPCMenu;
  739.  
  740. struct OverheadMsg {
  741.         DWORD _1;
  742.         DWORD dwTrigger;
  743.         DWORD _2[2];
  744.         CHAR Msg[232];
  745. };
  746.  
  747. #pragma pack(pop)
  748.  
  749. struct D2MSG {
  750.         HWND myHWND;
  751.         char lpBuf[256];
  752. };
  753.  
  754.  
  755. struct InventoryLayout
  756. {
  757.         BYTE SlotWidth;
  758.         BYTE SlotHeight;
  759.         BYTE unk1;
  760.         BYTE unk2;
  761.         DWORD Left;
  762.         DWORD Right;
  763.         DWORD Top;
  764.         DWORD Bottom;
  765.         BYTE SlotPixelWidth;
  766.         BYTE SlotPixelHeight;
  767. };
  768.  
  769. struct MpqTable
  770. {
  771.  
  772. };
  773.  
  774. struct sgptDataTable
  775. {
  776.         MpqTable*       pPlayerClass;
  777.         DWORD           dwPlayerClassRecords;
  778.         MpqTable*       pBodyLocs;
  779.         DWORD           dwBodyLocsRecords;
  780.         MpqTable*       pStorePage;
  781.         DWORD           dwStorePageRecords;
  782.         MpqTable*       pElemTypes;
  783. };
  784. //////////////////////////////////////////////////////////////////////
  785. // Unit Affection ID Definition
  786. //////////////////////////////////////////////////////////////////////
  787. #define AFFECT_NONE                                                  0
  788. #define AFFECT_FREEZE                                                1
  789. #define AFFECT_POISON                                                2
  790. #define AFFECT_RESISTFIRE                                            3
  791. #define AFFECT_RESISTCOLD                                            4
  792. #define AFFECT_RESISTLIGHT                                           5
  793. #define AFFECT_RESISTMAGIC                                           6
  794. #define AFFECT_PLAYERBODY                                            7
  795. #define AFFECT_RESISTALL                                             8
  796. #define AFFECT_AMPLIFYDAMAGE                                         9
  797. #define AFFECT_FROZENARMOR                                           10
  798. #define AFFECT_COLD                                                  11
  799. #define AFFECT_INFERNO                                               12
  800. #define AFFECT_BLAZE                                                 13
  801. #define AFFECT_BONEARMOR                                             14
  802. #define AFFECT_CONCENTRATE                                           15
  803. #define AFFECT_ENCHANT                                               16
  804. #define AFFECT_INNERSIGHT                                            17
  805. #define AFFECT_SKILL_MOVE                                            18
  806. #define AFFECT_WEAKEN                                                19
  807. #define AFFECT_CHILLINGARMOR                                         20
  808. #define AFFECT_STUNNED                                               21
  809. #define AFFECT_SPIDERLAY                                             22
  810. #define AFFECT_DIMVISION                                             23
  811. #define AFFECT_SLOWED                                                24
  812. #define AFFECT_FETISHAURA                                            25
  813. #define AFFECT_SHOUT                                                 26
  814. #define AFFECT_TAUNT                                                 27
  815. #define AFFECT_CONVICTION                                            28
  816. #define AFFECT_CONVICTED                                             29
  817. #define AFFECT_ENERGYSHIELD                                          30
  818. #define AFFECT_VENOMCLAWS                                            31
  819. #define AFFECT_BATTLEORDERS                                          32
  820. #define AFFECT_MIGHT                                                 33
  821. #define AFFECT_PRAYER                                                34
  822. #define AFFECT_HOLYFIRE                                              35
  823. #define AFFECT_THORNS                                                36
  824. #define AFFECT_DEFIANCE                                              37
  825. #define AFFECT_THUNDERSTORM                                          38
  826. #define AFFECT_LIGHTNINGBOLT                                         39
  827. #define AFFECT_BLESSEDAIM                                            40
  828. #define AFFECT_VIGOR                                                 41
  829. #define AFFECT_CONCENTRATION                                         42
  830. #define AFFECT_HOLYFREEZE                                            43
  831. #define AFFECT_HOLYFREEZECHILL                                       44
  832. #define AFFECT_CLEANSING                                             45
  833. #define AFFECT_HOLYSHOCK                                             46
  834. #define AFFECT_SANCTUARY                                             47
  835. #define AFFECT_MEDITATION                                            48
  836. #define AFFECT_FANATICISM                                            49
  837. #define AFFECT_REDEMPTION                                            50
  838. #define AFFECT_BATTLECOMMAND                                         51
  839. #define AFFECT_PREVENTHEAL                                           52
  840. #define AFFECT_CONVERSION                                            53
  841. #define AFFECT_UNINTERRUPTABLE                                       54
  842. #define AFFECT_IRONMAIDEN                                            55
  843. #define AFFECT_TERROR                                                56
  844. #define AFFECT_ATTRACT                                               57
  845. #define AFFECT_LIFETAP                                               58
  846. #define AFFECT_CONFUSE                                               59
  847. #define AFFECT_DECREPIFY                                             60
  848. #define AFFECT_LOWERRESIST                                           61
  849. #define AFFECT_OPENWOUNDS                                            62
  850. #define AFFECT_DOPPLEZON                                             63
  851. #define AFFECT_CRITICALSTRIKE                                        64
  852. #define AFFECT_DODGE                                                 65
  853. #define AFFECT_AVOID                                                 66
  854. #define AFFECT_PENETRATE                                             67
  855. #define AFFECT_EVADE                                                 68
  856. #define AFFECT_PIERCE                                                69
  857. #define AFFECT_WARMTH                                                70
  858. #define AFFECT_FIREMASTERY                                           71
  859. #define AFFECT_LIGHTNINGMASTERY                                      72
  860. #define AFFECT_COLDMASTERY                                           73
  861. #define AFFECT_SWORDMASTERY                                          74
  862. #define AFFECT_AXEMASTERY                                            75
  863. #define AFFECT_MACEMASTERY                                           76
  864. #define AFFECT_POLEARMMASTERY                                        77
  865. #define AFFECT_THROWINGMASTERY                                       78
  866. #define AFFECT_SPEARMASTERY                                          79
  867. #define AFFECT_INCREASEDSTAMINA                                      80
  868. #define AFFECT_IRONSKIN                                              81
  869. #define AFFECT_INCREASEDSPEED                                        82
  870. #define AFFECT_NATURALRESISTANCE                                     83
  871. #define AFFECT_FINGERMAGECURSE                                       84
  872. #define AFFECT_NOMANAREGEN                                           85
  873. #define AFFECT_JUSTHIT                                               86
  874. #define AFFECT_SLOWMISSILES                                          87
  875. #define AFFECT_SHIVERARMOR                                           88
  876. #define AFFECT_BATTLECRY                                             89
  877. #define AFFECT_BLUE                                                  90
  878. #define AFFECT_RED                                                   91
  879. #define AFFECT_DEATH_DELAY                                           92
  880. #define AFFECT_VALKYRIE                                              93
  881. #define AFFECT_FRENZY                                                94
  882. #define AFFECT_BERSERK                                               95
  883. #define AFFECT_REVIVE                                                96
  884. #define AFFECT_ITEMFULLSET                                           97
  885. #define AFFECT_SOURCEUNIT                                            98
  886. #define AFFECT_REDEEMED                                              99
  887. #define AFFECT_HEALTHPOT                                             100
  888. #define AFFECT_HOLYSHIELD                                            101
  889. #define AFFECT_JUST_PORTALED                                         102
  890. #define AFFECT_MONFRENZY                                             103
  891. #define AFFECT_CORPSE_NODRAW                                         104
  892. #define AFFECT_ALIGNMENT                                             105
  893. #define AFFECT_MANAPOT                                               106
  894. #define AFFECT_SHATTER                                               107
  895. #define AFFECT_SYNC_WARPED                                           108
  896. #define AFFECT_CONVERSION_SAVE                                       109
  897. #define AFFECT_PREGNANT                                              110
  898. #define AFFECT_111                                                   111
  899. #define AFFECT_RABIES                                                112
  900. #define AFFECT_DEFENSE_CURSE                                         113
  901. #define AFFECT_BLOOD_MANA                                            114
  902. #define AFFECT_BURNING                                               115
  903. #define AFFECT_DRAGONFLIGHT                                          116
  904. #define AFFECT_MAUL                                                  117
  905. #define AFFECT_CORPSE_NOSELECT                                       118
  906. #define AFFECT_SHADOWWARRIOR                                         119
  907. #define AFFECT_FERALRAGE                                             120
  908. #define AFFECT_SKILLDELAY                                            121
  909. #define AFFECT_PROGRESSIVE_DAMAGE                                    122
  910. #define AFFECT_PROGRESSIVE_STEAL                                     123
  911. #define AFFECT_PROGRESSIVE_OTHER                                     124
  912. #define AFFECT_PROGRESSIVE_FIRE                                      125
  913. #define AFFECT_PROGRESSIVE_COLD                                      126
  914. #define AFFECT_PROGRESSIVE_LIGHTNING                                 127
  915. #define AFFECT_SHRINE_ARMOR                                          128
  916. #define AFFECT_SHRINE_COMBAT                                         129
  917. #define AFFECT_SHRINE_RESIST_LIGHTNING                               130
  918. #define AFFECT_SHRINE_RESIST_FIRE                                    131
  919. #define AFFECT_SHRINE_RESIST_COLD                                    132
  920. #define AFFECT_SHRINE_RESIST_POISON                                  133
  921. #define AFFECT_SHRINE_SKILL                                          134
  922. #define AFFECT_SHRINE_MANA_REGEN                                     135
  923. #define AFFECT_SHRINE_STAMINA                                        136
  924. #define AFFECT_SHRINE_EXPERIENCE                                     137
  925. #define AFFECT_FENRIS_RAGE                                           138
  926. #define AFFECT_WOLF                                                  139
  927. #define AFFECT_BEAR                                                  140
  928. #define AFFECT_BLOODLUST                                             141
  929. #define AFFECT_CHANGECLASS                                           142
  930. #define AFFECT_ATTACHED                                              143
  931. #define AFFECT_HURRICANE                                             144
  932. #define AFFECT_ARMAGEDDON                                            145
  933. #define AFFECT_INVIS                                                 146
  934. #define AFFECT_BARBS                                                 147
  935. #define AFFECT_WOLVERINE                                             148
  936. #define AFFECT_OAKSAGE                                               149
  937. #define AFFECT_VINE_BEAST                                            150
  938. #define AFFECT_CYCLONEARMOR                                          151
  939. #define AFFECT_CLAWMASTERY                                           152
  940. #define AFFECT_CLOAK_OF_SHADOWS                                      153
  941. #define AFFECT_RECYCLED                                              154
  942. #define AFFECT_WEAPONBLOCK                                           155
  943. #define AFFECT_CLOAKED                                               156
  944. #define AFFECT_BURSTOFSPEED                                          157
  945. #define AFFECT_BLADESHIELD                                           158
  946. #define AFFECT_FADE                                                  159
  947.  
  948. typedef struct ItemStruct_t {
  949.  
  950.         BYTE    MessageID;
  951.         BYTE    Action;
  952.         BYTE    MessageSize;
  953.         BYTE    ItemType;
  954.         DWORD   ItemID;
  955.        
  956.         // flags
  957.         BOOL    isSocketsFull;
  958.         BOOL    isIdentified;
  959.         BOOL    isEthereal;
  960.         BOOL    isSwitchin;
  961.         BOOL    isSwitchout;
  962.         BOOL    isBroken;
  963.         BOOL    fromBelt;
  964.         BOOL    hasSockets;
  965.         BOOL    isJustGenerated;
  966.         BOOL    isEar;
  967.         BOOL    isStartitem;
  968.         BOOL    isMiscItem;                     // unverified
  969.         BOOL    isPersonalized;
  970.         BOOL    isGamble;
  971.         BOOL    isRuneWord;                     // unverified
  972.         BOOL    isMagicExtra;           // unverified
  973.  
  974.         WORD    MPQVersionField;
  975.         BYTE    Location;
  976.         WORD    PositionX;
  977.         WORD    PositionY;
  978.         char    ItemCode[5];
  979.         BYTE    ItemLevel;
  980.  
  981.         // gold specific
  982.         BOOL    GoldSize;
  983.         DWORD   GoldAmount;
  984.  
  985.         //////////////////////////// CHECKS
  986.         BOOL    DoNotTryWhenFull;
  987.        
  988. } ITEMSTRUCT;
  989. enum UnitNo {
  990.         UNITNO_PLAYER   = 0,
  991.         UNITNO_MONSTER  = 1,
  992.         UNITNO_OBJECT   = 2,
  993.         UNITNO_MISSILE  = 3,
  994.         UNITNO_ITEM             = 4,
  995.         UNITNO_ROOMTILE = 5
  996. };
  997. enum { UNIT_PLAYER, UNIT_MONSTER, UNIT_OBJECT, UNIT_MISSILE, UNIT_ITEM, UNIT_ROOMTILE, UNIT_ALL };
  998. #endif