Guest User

Untitled

a guest
Jun 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1.  
  2. #region SA
  3. private class Gargoyle : Race
  4. {
  5. public Gargoyle( int raceID, int raceIndex )
  6. : base( raceID, raceIndex, "Gargoyle", "Gargoyles", 666, 667, 402, 403, Expansion.SA )
  7. {
  8. }
  9.  
  10. public override bool ValidateHair(bool female, int itemID )
  11. {
  12. if (female == false)
  13. {
  14. return itemID >= 0x4258 && itemID <= 0x425F;
  15. }
  16. else
  17. {
  18. return ((itemID == 0x4261 || itemID == 0x4262) || (itemID >= 0x4273 && itemID <= 0x4275) || (itemID == 0x42B0 || itemID == 0x42B1) || (itemID == 0x42AA || itemID == 0x42AB));
  19. }
  20. }
  21.  
  22. public override int RandomHair( bool female )
  23. {
  24. if ( Utility.Random( 9 ) == 0 )
  25. return 0;
  26. else
  27. if (!female)
  28. return 0x4258 + Utility.Random( 8 );
  29. else
  30. {
  31. switch (Utility.Random(9))
  32. {
  33. case 0: return 0x4261;
  34. case 1: return 0x4262;
  35. case 2: return 0x4273;
  36. case 3: return 0x4274;
  37. case 4: return 0x4275;
  38. case 5: return 0x42B0;
  39. case 6: return 0x42B1;
  40. case 7: return 0x42AA;
  41. case 8: return 0x42AB;
  42. }
  43. return 0;
  44. }
  45. }
  46.  
  47. public override bool ValidateFacialHair( bool female, int itemID )
  48. {
  49. if ( female )
  50. return false;
  51. else
  52. return itemID >= 0x42AD && itemID <= 0x42B0;
  53. }
  54.  
  55. public override int RandomFacialHair( bool female )
  56. {
  57. if ( female )
  58. return 0;
  59. else
  60. return Utility.RandomList( 0, 0x42AD, 0x42AE, 0x42AF, 0x42B0 );
  61. }
  62.  
  63. // Todo Finish body hues
  64. private static int[] m_BodyHues = new int[]
  65. {
  66. 0x86DB, 0x86DC, 0x86DD, 0x86DE,
  67. 0x86DF, 0x86E0, 0x86E1, 0x86E2,
  68. 0x86E3, 0x86E4, 0x86E5, 0x86E6
  69. // 0x, 0x, 0x, 0x, // 86E7/86E8/86E9/86EA?
  70. // 0x, 0x, 0x, 0x, // 86EB/86EC/86ED/86EE?
  71. // 0x86F3, 0x86DB, 0x86DC, 0x86DD
  72. };
  73.  
  74. public override int ClipSkinHue( int hue )
  75. {
  76. return hue; // for hue infomation gathering
  77. }
  78.  
  79. public override int RandomSkinHue()
  80. {
  81. return m_BodyHues[Utility.Random( m_BodyHues.Length )] | 0x8000;
  82. }
  83.  
  84. private static int[] m_HornHues = new int[]
  85. {
  86. 0x709, 0x70B, 0x70D, 0x70F, 0x711, 0x763,
  87. 0x765, 0x768, 0x76B, 0x6F3, 0x6F1, 0x6EF,
  88. 0x6E4, 0x6E2, 0x6E0, 0x709, 0x70B, 0x70D
  89. };
  90.  
  91. public override int ClipHairHue( int hue )
  92. {
  93. for( int i = 0; i < m_HornHues.Length; i++ )
  94. if ( m_HornHues[i] == hue )
  95. return hue;
  96.  
  97. return m_HornHues[0];
  98. }
  99.  
  100. public override int RandomHairHue()
  101. {
  102. return m_HornHues[ Utility.Random( m_HornHues.Length ) ];
  103. }
  104. }
  105. #endregion
Add Comment
Please, Sign In to add comment