Clone of UAS2 @ https://github.com/drudgedance/uas2

Account.h 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*
  2. * This file is part of UAS2.
  3. *
  4. * UAS2 is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * UAS2 is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. * You should have received a copy of the GNU General Public License
  14. * along with UASv1; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. /**
  18. * @file Account.h
  19. * Processes the create and delete character messages.
  20. */
  21. #ifndef __ACCOUNT_H
  22. #define __ACCOUNT_H
  23. #include <winsock2.h>
  24. #define CHARDATA_RACE_ALUVIAN 0x0
  25. #define CHARDATA_RACE_GHARU 0x1
  26. #define CHARDATA_RACE_SHO 0x2
  27. #define CHARDATA_HAIRSTYLE_BUSINESS 0x0
  28. #define CHARDATA_HAIRSTYLE_PUNK 0x1
  29. #define CHARDATA_HAIRSTYLE_PONYTAIL 0x2
  30. #define CHARDATA_HAIRSTYLE_BALD 0x3
  31. #define CHARDATA_SEX_FEMALE 0x0
  32. #define CHARDATA_SEX_MALE 0x1
  33. #define CHARDATA_STARTINGTOWN_HOLTBURG_SOUTH 0x0
  34. #define CHARDATA_STARTINGTOWN_HOLTBURG_WEST 0x1
  35. #define CHARDATA_STARTINGTOWN_SHOUSHI_SOUTHEAST 0x2
  36. #define CHARDATA_STARTINGTOWN_SHOUSHI_WEST 0x3
  37. #define CHARDATA_STARTINGTOWN_YARAQ_NORTH 0x4
  38. #define CHARDATA_STARTINGTOWN_YARAQ_EAST 0x5
  39. #define CHARDATA_CLASS_CUSTOM 0x0
  40. #define CHARDATA_CLASS_BOW_HUNTER 0x1
  41. #define CHARDATA_CLASS_SWASHBUCKLER 0x2
  42. #define CHARDATA_CLASS_LIFE_CASTER 0x3
  43. #define CHARDATA_CLASS_WAR_MAGE 0x4
  44. #define CHARDATA_CLASS_WAYFARER 0x5
  45. #define CHARDATA_CLASS_SOLDIER 0x6
  46. #define SKILL_AXE 0x01
  47. #define SKILL_BOW 0x02
  48. #define SKILL_CROSSBOW 0x03
  49. #define SKILL_DAGGER 0x04
  50. #define SKILL_MACE 0x05
  51. #define SKILL_MELEE_DEFENSE 0x06
  52. #define SKILL_MISSLE_DEFENSE 0x07
  53. #define SKILL_SPEAR 0x09
  54. #define SKILL_STAFF 0x0A
  55. #define SKILL_SWORD 0x0B
  56. #define SKILL_THROWN_WEAPONS 0x0C
  57. #define SKILL_UNARMED_COMBAT 0x0D
  58. #define SKILL_ARCANE_LORE 0x0E
  59. #define SKILL_MAGIC_DEFENSE 0x0F
  60. #define SKILL_MANA_CONVERSION 0x10
  61. #define SKILL_ITEM_TINKERING 0x12
  62. #define SKILL_ASSESS_PERSON 0x13
  63. #define SKILL_DECEPTION 0x14
  64. #define SKILL_HEALING 0x15
  65. #define SKILL_JUMP 0x16
  66. #define SKILL_LOCKPICK 0x17
  67. #define SKILL_RUN 0x18
  68. #define SKILL_ASSESS_CREATURE 0x1B
  69. #define SKILL_WEAPON_TINKERING 0x1C
  70. #define SKILL_ARMOR_TINKERING 0x1D
  71. #define SKILL_MAGIC_ITEM_TINKERING 0x1E
  72. #define SKILL_CREATURE_ENCHANTMENT 0x1F
  73. #define SKILL_ITEM_ENCHANTMENT 0x20
  74. #define SKILL_LIFE_MAGIC 0x21
  75. #define SKILL_WAR_MAGIC 0x22
  76. #define SKILL_LEADERSHIP 0x23
  77. #define SKILL_LOYALTY 0x24
  78. #define SKILL_FLETCHING 0x25
  79. #define SKILL_ALCHEMY 0x26
  80. #define SKILL_COOKING 0x27
  81. #define SKILL_SALVAGE 0x28
  82. /**
  83. * The CreateCharacterMessage struct parallels the structure of the Create Character message.
  84. *
  85. * Values from this struct are used by cDatabase to create characters. @see cDatabase::CreateAvatar
  86. */
  87. #pragma pack( push, 1 )
  88. struct CreateCharacterMessage
  89. {
  90. DWORD dwF656;
  91. // DWORD dwBeefbeef; //0xBEEFBEEF always; probably used in place of GUID
  92. WORD wLengthOfAccountName; //Length of the account name
  93. char szAccountName[40]; //40 byte account name; zero-filled
  94. // DWORD dwUnk1;
  95. DWORD dwValOne; //Constant 1
  96. DWORD dwRace; //Use CHARDATA_RACE_
  97. DWORD dwSex; //Use CHARDATA_SEX_
  98. DWORD dwForeheadTexture; //Value from a race-wide index of texures
  99. DWORD dwNoseTexture; //Value from a race-wide index of texures
  100. DWORD dwChinTexture; //Value from a race-wide index of texures
  101. DWORD dwHairColor; //Value from a race-wide index of colors
  102. DWORD dwEyeColor; //Value from a race-wide index of colors
  103. DWORD dwHairStyle; //Use CHARDATA_HAIRSTYLE_
  104. DWORD dwHatType; //Value from a race-wide index of hat types; 0xFFFFFFFF (-1) means no hat
  105. DWORD dwHatColor; //Value from a race-wide index of colors
  106. DWORD dwShirtType; //Value from a race-wide index of shirt types
  107. DWORD dwShirtColor; //Value from a race-wide index of colors
  108. DWORD dwPantsType; //Value from a race-wide index of pants
  109. DWORD dwPantsColor; //Value from a race-wide index of colors
  110. DWORD dwShoeType; //Value from a race-wide index of shoe types
  111. DWORD dwShoeColor; //Value from a race-wide index of colors
  112. //Values range from 0x0000000000000000 to 3FF0000000000000000 (0-1)
  113. //Indicate degree of color shading
  114. double dblSkinShade;
  115. double dblHairShade;
  116. double dblHatShade;
  117. double dblShirtShade;
  118. double dblPantsShade;
  119. double dblShoeShade;
  120. DWORD dwProfession; //CHARDATA_PROFESSION_
  121. DWORD dwStrength;
  122. DWORD dwEndurance;
  123. DWORD dwCoordination;
  124. DWORD dwQuickness;
  125. DWORD dwFocus;
  126. DWORD dwSelf;
  127. DWORD dwUnk2;
  128. DWORD dwUnk3;
  129. DWORD dwNumSkills; //Portal.dat file dependent
  130. DWORD dwSkillStatus[0x30];
  131. // 0 - Skill ID not used
  132. // 1 - Skill Unusable / Untrained
  133. // 2 - Skill Trained
  134. // 3 - Skill Specialized
  135. WORD wNameLength;
  136. char szName[40];
  137. DWORD dwUnk4; //Always 0xFFFFFFFF?
  138. DWORD dwUnk5; //Random value that has ranged from 0x02-0x0C
  139. DWORD dwStartingPlace; //CHARDATA_STARTINGTOWN_
  140. DWORD dwUnk6; //Random value that has ranged from 0x53-0x157
  141. };
  142. #pragma pack( pop )
  143. /**
  144. * The AvatarDeleteMessage struct parallels the structure of the Delete Character message.
  145. */
  146. #pragma pack( push, 1 )
  147. struct AvatarDeleteMessage
  148. {
  149. DWORD dwF655;
  150. // DWORD dwBeef;
  151. WORD wNameLength;
  152. char szAccountName[40];
  153. // DWORD dw74;
  154. DWORD dwSlot;
  155. };
  156. #pragma pack( pop )
  157. #endif // #ifndef __ACCOUNT_H