Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 14.50 KB | None | 0 0
  1. /*
  2. Copyright (C) 2007 <SWGEmu>
  3.  
  4. This File is part of Core3.
  5.  
  6. This program is free software; you can redistribute
  7. it and/or modify it under the terms of the GNU Lesser
  8. General Public License as published by the Free Software
  9. Foundation; either version 2 of the License,
  10. or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. See the GNU Lesser General Public License for
  16. more details.
  17.  
  18. You should have received a copy of the GNU Lesser General
  19. Public License along with this program; if not, write to
  20. the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  21.  
  22. Linking Engine3 statically or dynamically with other modules
  23. is making a combined work based on Engine3.
  24. Thus, the terms and conditions of the GNU Lesser General Public License
  25. cover the whole combination.
  26.  
  27. In addition, as a special exception, the copyright holders of Engine3
  28. give you permission to combine Engine3 program with free software
  29. programs or libraries that are released under the GNU LGPL and with
  30. code included in the standard release of Core3 under the GNU LGPL
  31. license (or modified versions of such code, with unchanged license).
  32. You may copy and distribute such a system following the terms of the
  33. GNU LGPL for Engine3 and the licenses of the other code concerned,
  34. provided that you include the source code of that other code when
  35. and as the GNU LGPL requires distribution of source code.
  36.  
  37. Note that people who make modified versions of Engine3 are not obligated
  38. to grant this special exception for their modified versions;
  39. it is their choice whether to do so. The GNU Lesser General Public License
  40. gives permission to release a modified version without this exception;
  41. this exception also makes it possible to release a modified version
  42. which carries forward this exception.
  43. */
  44.  
  45. #ifndef RACES_H_
  46. #define RACES_H_
  47.  
  48. #include "system/lang.h"
  49.  
  50. const static char* Species[] = {
  51.     "bith", // bith male
  52.     "trandoshan", // trandoshan male
  53.     "twilek", // twilek male
  54.     "bothan", // bothan male
  55.     "zabrak", // zabrak male
  56.     "rodian", // rodian male
  57.     "moncal", // moncal male
  58.     "wookiee", // wookiee male
  59.     "sullustan", // sullustan male
  60.     "ithorian", // ithorian male
  61.     "human", // human male
  62.     "bith", // bith female
  63.     "trandoshan", // trandoshan female
  64.     "twilek", // twilek female
  65.     "bothan", // bothan female
  66.     "zabrak", // zabrak female
  67.     "rodian", // rodian female
  68.     "moncal", // moncal female
  69.     "wookiee", // wookiee female
  70.     "sullustan", // sullustan female
  71.     "ithorian",  // DA E7   -   ithorian female
  72.     "human" // human female
  73. };
  74.  
  75. const static char* Gender[] = {
  76.     "male", // bith male
  77.     "male", // trandoshan male
  78.     "male", // twilek male
  79.     "male", // bothan male
  80.     "male", // zabrak male
  81.     "male", // rodian male
  82.     "male", // moncal male
  83.     "male", // wookiee male
  84.     "male", // sullustan male
  85.     "male", // ithorian male
  86.     "male", // human male
  87.     "female", // bith female
  88.     "female", // trandoshan female
  89.     "female", // twilek female
  90.     "female", // bothan female
  91.     "female", // zabrak female
  92.     "female", // rodian female
  93.     "female", // moncal female
  94.     "female", // wookiee female
  95.     "female", // sullustan female
  96.     "female", // DA E7   -   ithorian female
  97.     "female"  // human female
  98. };
  99.  
  100. const static char* RaceStrs[] = {
  101.     "object/mobile/shared_bith_male.iff" // bith male
  102.     "object/creature/player/shared_trandoshan_male.iff", // trandoshan male
  103.     "object/creature/player/shared_twilek_male.iff", // twilek male
  104.     "object/creature/player/shared_bothan_male.iff", // bothan male
  105.     "object/creature/player/shared_zabrak_male.iff", // zabrak male
  106.     "object/creature/player/shared_rodian_male.iff", // rodian male
  107.     "object/creature/player/shared_moncal_male.iff", // moncal male
  108.     "object/creature/player/shared_wookiee_male.iff", // wookiee male
  109.     "object/creature/player/shared_sullustan_male.iff", // sullustan male
  110.     "object/creature/player/shared_ithorian_male.iff", // ithorian male
  111.     "object/creature/player/shared_human_male.iff", // human male
  112.     "object/mobile/shared_bith_female.iff" // bith female
  113.     "object/creature/player/shared_trandoshan_female.iff", // trandoshan female
  114.     "object/creature/player/shared_twilek_female.iff", // twilek female
  115.     "object/creature/player/shared_bothan_female.iff", // bothan female
  116.     "object/creature/player/shared_zabrak_female.iff", // zabrak female
  117.     "object/creature/player/shared_rodian_female.iff", // rodian female
  118.     "object/creature/player/shared_moncal_female.iff", // moncal female
  119.     "object/creature/player/shared_wookiee_female.iff", // wookiee female
  120.     "object/creature/player/shared_sullustan_female.iff", // sullustan female
  121.     "object/creature/player/shared_ithorian_female.iff",  // DA E7   -   ithorian female
  122.     "object/creature/player/shared_human_female.iff", // human female
  123. };
  124.  
  125. const static char* CCRaceStrs[] = {
  126.     "object/mobile/shared_bith_male.iff" // bith male
  127.     "object/creature/player/trandoshan_male.iff", // trandoshan male
  128.     "object/creature/player/twilek_male.iff", // twilek male
  129.     "object/creature/player/bothan_male.iff", // bothan male
  130.     "object/creature/player/zabrak_male.iff", // zabrak male
  131.     "object/creature/player/rodian_male.iff", // rodian male
  132.     "object/creature/player/moncal_male.iff", // moncal male
  133.     "object/creature/player/wookiee_male.iff", // wookiee male
  134.     "object/creature/player/sullustan_male.iff", // sullustan male
  135.     "object/creature/player/ithorian_male.iff", // ithorian male
  136.     "object/creature/player/human_male.iff", // human male
  137.     "object/mobile/shared_bith_female.iff" // bith female
  138.     "object/creature/player/trandoshan_female.iff", // trandoshan female
  139.     "object/creature/player/twilek_female.iff", // twilek female
  140.     "object/creature/player/bothan_female.iff", // bothan female
  141.     "object/creature/player/zabrak_female.iff", // zabrak female
  142.     "object/creature/player/rodian_female.iff", // rodian female
  143.     "object/creature/player/moncal_female.iff", // moncal female
  144.     "object/creature/player/wookiee_female.iff", // wookiee female
  145.     "object/creature/player/sullustan_female.iff", // sullustan female
  146.     "object/creature/player/ithorian_female.iff"  // DA E7   -   ithorian female
  147.     "object/creature/player/human_female.iff", // human female
  148. };
  149.  
  150. static uint32 SharedRace[] = {
  151.     0x30BDA46C,
  152.     0x50C45B8F,
  153.     0xF280E27B,
  154.     0x5BF77F33,
  155.     0xE204A556,
  156.     0x0BF9CD9C,
  157.     0xB9C855A8,
  158.     0x0564791D,
  159.     0x0B9399A4,
  160.     0x38BAC7C4,
  161.     0xAF1DC1A1,
  162.     0x44479344,
  163.     0x183C24C6,
  164.     0x849752DC,
  165.     0x1D52730E,
  166.     0xA9E35FFD,
  167.     0xC264245B,
  168.     0x982FBFDE,
  169.     0x0DAB65E2,
  170.     0x1573341A,
  171.     0xB3E08013,
  172.     0xFFFFBBE9
  173. };
  174.  
  175. const static char* MoodStr[][2]= {
  176.     {"none", "neutral"},
  177.     {"absentminded", "neutral"},
  178.     {"amazed", "neutral"},
  179.     {"amused", "happy"},
  180.     {"angry", "angry"},
  181.     {"approving", "neutral"},
  182.     {"bitter", "neutral"},
  183.     {"bloodthirsty", "neutral"},
  184.     {"brave", "neutral"},
  185.     {"callous", "neutral"},
  186.     {"careful", "neutral"},
  187.     {"careless", "neutral"},
  188.     {"casual", "neutral"},
  189.     {"clinical", "neutral"},
  190.     {"cocky", "neutral"},
  191.     {"cold", "neutral"},
  192.     {"compassionate", "neutral"},
  193.     {"condescending", "neutral"},
  194.     {"confident", "neutral"},
  195.     {"confused", "neutral"},
  196.     {"content", "happy"},
  197.     {"courtly", "neutral"},
  198.     {"coy", "neutral"},
  199.     {"crude", "neutral"},
  200.     {"cruel", "neutral"},
  201.     {"curious", "neutral"},
  202.     {"cynical", "neutral"},
  203.     {"defensive", "neutral"},
  204.     {"depressed", "unhappy"},
  205.     {"devious", "neutral"},
  206.     {"dimwitted", "neutral"},
  207.     {"disappointed", "unhappy"},
  208.     {"discreet", "neutral"},
  209.     {"disgruntled", "disgruntled"},
  210.     {"disgusted", "neutral"},
  211.     {"dismayed", "unhappy"},
  212.     {"disoriented", "neutral"},
  213.     {"distracted", "neutral"},
  214.     {"doubtful", "neutral"},
  215.     {"dramatic", "neutral"},
  216.     {"dreamy", "neutral"},
  217.     {"drunk", "neutral"},
  218.     {"earnest", "neutral"},
  219.     {"ecstatic", "happy"},
  220.     {"embarrassed", "neutral"},
  221.     {"emphatic", "neutral"},
  222.     {"encouraging", "neutral"},
  223.     {"enthusiastic", "neutral"},
  224.     {"evil", "neutral"},
  225.     {"exasperated", "disgruntled"},
  226.     {"exuberant", "happy"},
  227.     {"fanatical", "neutral"},
  228.     { "forgive", "neutral"},
  229.     {"frustrated", "neutral"},
  230.     {"guilty", "neutral"},
  231.     {"happy", "happy"},
  232.     {"honest", "neutral"},
  233.     {"hopeful", "neutral"},
  234.     {"hopeless", "neutral"},
  235.     {"humble", "neutral"},
  236.     {"hysterical", "neutral"},
  237.     {"imploring", "neutral"},
  238.     {"indifferent", "neutral"},
  239.     {"indignant", "angry"},
  240.     {"interested", "neutral"},
  241.     {"jealous", "neutral"},
  242.     {"joyful", "happy"},
  243.     {"lofty", "neutral"},
  244.     {"loud", "neutral"},
  245.     {"loving", "neutral"},
  246.     {"lustful", "neutral"},
  247.     {"mean", "neutral"},
  248.     {"mischievous", "neutral"},
  249.     {"nervous", "neutral"},
  250.     {"neutral", "neutral"},
  251.     {"offended", "neutral"},
  252.     {"optimistic", "neutral"},
  253.     {"pedantic", "neutral"},
  254.     {"pessimistic", "neutral"},
  255.     {"petulant", "neutral"},
  256.     {"philosophical", "neutral"},
  257.     {"pitying", "neutral"},
  258.     {"playful", "happy"},
  259.     {"polite", "neutral"},
  260.     {"pompous", "neutral"},
  261.     {"proud", "neutral"},
  262.     {"provocative", "neutral"},
  263.     {"puzzled", "neutral"},
  264.     {"regretful", "unhappy"},
  265.     {"relieved", "neutral"},
  266.     {"reluctant", "neutral"},
  267.     {"resigned", "neutral"},
  268.     {"respectful", "neutral"},
  269.     {"romantic", "neutral"},
  270.     {"rude", "neutral"},
  271.     {"sad", "unhappy"},
  272.     {"sarcastic", "neutral"},
  273.     {"scared", "neutral"},
  274.     {"scolding", "neutral"},
  275.     {"scornful", "neutral"},
  276.     {"serious", "neutral"},
  277.     {"shameless", "neutral"},
  278.     {"shocked", "neutral"},
  279.     {"shy", "neutral"},
  280.     {"sincere", "neutral"},
  281.     {"sleepy", "neutral"},
  282.     {"sly", "neutral"},
  283.     {"smug", "neutral"},
  284.     {"snobby", "neutral"},
  285.     {"sorry", "neutral"},
  286.     {"spiteful", "neutral"},
  287.     {"stubborn", "neutral"},
  288.     {"sullen", "neutral"},
  289.     {"suspicious", "neutral"},
  290.     {"taunting", "neutral"},
  291.     {"terrified", "neutral"},
  292.     {"thankful", "neutral"},
  293.     {"thoughtful", "neutral"},
  294.     {"tolerant", "neutral"},
  295.     {"uncertain", "neutral"},
  296.     {"unhappy", "unhappy"},
  297.     {"unwilling", "neutral"},
  298.     {"warm", "neutral"},
  299.     {"whiny", "neutral"},
  300.     {"wicked", "neutral"},
  301.     {"wistful", "neutral"},
  302.     {"worried", "worried"},
  303.     {"tired", "neutral"},
  304.     {"exhausted", "neutral"},
  305.     {"friendly", "happy"},
  306.     {"timid", "neutral"},
  307.     {"lazy", "neutral"},
  308.     {"surprised", "worried"},
  309.     {"innocent", "happy"},
  310.     {"wise", "neutral"},
  311.     {"youthful", "neutral"},
  312.     {"adventurous", "neutral"},
  313.     {"annoyed", "angry"},
  314.     {"perturbed", "unhappy"},
  315.     {"sedate", "neutral"},
  316.     {"calm", "neutral"},
  317.     {"suffering", "unhappy"},
  318.     {"hungry", "neutral"},
  319.     {"thirsty", "neutral"},
  320.     {"alert", "neutral"},
  321.     {"shifty", "neutral"},
  322.     {"relaxed", "neutral"},
  323.     {"crotchety", "angry"},
  324.     {"surly", "angry"},
  325.     {"painful", "unhappy"},
  326.     {"wounded", "unhappy"},
  327.     {"bubbly", "happy"},
  328.     {"heroic", "neutral"},
  329.     {"quiet", "neutral"},
  330.     {"remorseful", "unhappy"},
  331.     {"grumpy", "angry"},
  332.     {"logical", "neutral"},
  333.     {"emotional", "neutral"},
  334.     {"troubled", "unhappy"},
  335.     {"panicked", "worried"},
  336.     {"nice", "happy"},
  337.     {"cheerful", "happy"},
  338.     {"emotionless", "neutral"},
  339.     {"gloomy", "unhappy"},
  340.     {"ambivalent", "neutral"},
  341.     {"envious", "neutral"},
  342.     {"vengeful", "angry"},
  343.     {"fearful", "worried"},
  344.     {"enraged", "angry"},
  345.     {"sheepish", "happy"},
  346.     {"belligerent", "angry"},
  347.     {"obnoxious", "neutral"},
  348.     {"fastidious", "neutral"},
  349.     {"squeamish", "unhappy"},
  350.     {"dainty", "neutral"},
  351.     {"dignified", "neutral"},
  352.     {"haughty", "neutral"},
  353.     {"obscure", "neutral"},
  354.     {"goofy", "happy"},
  355.     {"silly", "happy"},
  356.     {"disdainful", "neutral"},
  357.     {"contemptuous", "neutral"},
  358.     {"diplomatic", "neutral"},
  359.     {"wary", "neutral"},
  360.     {"malevolent", "angry"},
  361.     {"hurried", "neutral"},
  362.     {"patient", "neutral"},
  363.     {"firm", "neutral"},
  364.     {"meditating", "meditating"},
  365.     {"entertained", "entertained"}
  366.  
  367. };
  368.  
  369. static unsigned int attributeLimits[10][19] = {
  370.         {400, 1100, 400, 1100,  400, 1100, 400, 1100, 400, 1100, 400, 1100, 400, 1100, 400, 1100, 400, 1100, 5400},
  371.         {550, 1250, 600,  800700,  800, 300, 1000, 300,  450, 300,  400, 300, 1000, 300,  500, 300600, 5550},
  372.         {300, 1000, 300,  500550,  650, 550, 1250, 600750, 300,  400, 400, 1100, 300,  500, 300500, 5400},
  373.         {300, 1000, 300,  500300,  400, 600, 1300, 600750, 400,  500, 400, 1100, 400,  600, 300500, 5400},
  374.         {500, 1200, 300,  500300,  400, 600, 1300, 300450, 300,  400, 300, 1000, 300,  500, 700900, 5400},
  375.         {300, 1000, 300,  500300,  400, 300, 1200, 300650, 450,  850, 300, 1000, 300,  500, 350550, 5400},
  376.         {300, 1000, 300,  500300,  400, 300, 1000, 300450, 450,  550, 600, 1300, 600,  800, 450650, 5400},
  377.         {650, 1350, 650,  850450,  550, 500, 1200, 400550, 400,  500, 400, 1100, 450,  650, 400600, 6100},
  378.         {300, 1400, 300,  600300,  500, 600, 1100, 300750, 300,  500, 400, 1300, 400,  600, 300500, 5400},
  379.         {300, 1200, 300,  500300,  400, 600, 1400, 300750, 300,  500, 400, 1200, 400,  600, 300600, 5400},
  380. };
  381.  
  382. class Races {
  383. public:
  384.     inline const static char* getRace(int raceid) {
  385.         return RaceStrs[raceid];
  386.     }
  387.  
  388.     inline const static char* getMood(int moodid) {
  389.         return MoodStr[moodid][0];
  390.     }
  391.  
  392.     inline const static char* getSpecies(int raceid) {
  393.         return Species[raceid];
  394.     }
  395.  
  396.     inline const static char* getGender(int raceid) {
  397.         return Gender[raceid];
  398.     }
  399.  
  400.     inline static uint32 getRaceCRC(int raceid) {
  401.         return SharedRace[raceid];
  402.     }
  403.  
  404.     inline static int getRaceID(const String& name) {
  405.         for (int i = 0; i < 22; i++) {
  406.             if (strcmp(name.toCharArray(), CCRaceStrs[i]) == 0)
  407.                 return i;
  408.         }
  409.  
  410.         return 0;
  411.     }
  412.  
  413.     inline static int getMoodID(const String& name) {
  414.         for (int i = 0; i < 190; i++) {
  415.             if (strcmp(name.toCharArray(), MoodStr[i][0]) == 0)
  416.                 return i;
  417.         }
  418.  
  419.         return 0;
  420.     }
  421.  
  422.     inline const static char* getMoodStr(const String& name) {
  423.         for (int i = 0; i < 190; i++) {
  424.                     if (strcmp(name.toCharArray(), MoodStr[i][0]) == 0)
  425.                         return MoodStr[i][1];
  426.                 }
  427.  
  428.                 return MoodStr[0][1];
  429.     }
  430.  
  431.     inline static unsigned int * getAttribLimits(int raceid) {
  432.         return attributeLimits[raceid % 10];
  433.     }
  434.  
  435. };
  436.  
  437. #endif /*RACES_H_*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement