Forum > Miscellaneous
[QUESTION] Enabling New Races in TrinityCore
(1/2) > >>
mferrill:
I'm trying to figure out how to enable a few new races in Trinity.
I've edited Player.cpp
--- Code: --- switch (race) { case RACE_HUMAN: SetTaximaskNode(2); break; // Human case RACE_ORC: SetTaximaskNode(23); break; // Orc case RACE_DWARF: SetTaximaskNode(6); break; // Dwarf case RACE_NIGHTELF: SetTaximaskNode(26); SetTaximaskNode(27); break; // Night Elf case RACE_UNDEAD_PLAYER: SetTaximaskNode(11); break;// Undead case RACE_TAUREN: SetTaximaskNode(22); break; // Tauren case RACE_GNOME: SetTaximaskNode(6); break; // Gnome case RACE_TROLL: SetTaximaskNode(23); break; // Troll case RACE_GOBLIN: SetTaximaskNode(23); break; // Naga case RACE_BLOODELF: SetTaximaskNode(82); break; // Blood Elf case RACE_DRAENEI: SetTaximaskNode(94); break; // Draenei case RACE_NAGA: SetTaximaskNode(2); break; // Troll case RACE_BROKEN: SetTaximaskNode(94); break; // Broken case RACE_VRYKUL: SetTaximaskNode(2); break; // vrykul }
--- End code ---
Edited SharedDefines.h
enum Races { RACE_NONE = 0, RACE_HUMAN = 1, RACE_ORC = 2, RACE_DWARF = 3, RACE_NIGHTELF = 4, RACE_UNDEAD_PLAYER = 5, RACE_TAUREN = 6, RACE_GNOME = 7, RACE_TROLL = 8, RACE_GOBLIN = 9, RACE_BLOODELF = 10, RACE_DRAENEI = 11, RACE_NAGA = 13, RACE_BROKEN = 14, RACE_VRYKUL = 16 };
// max+1 for player race #define MAX_RACES 17
#define RACEMASK_ALL_PLAYABLE ((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1)) | (1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| (1<<(RACE_DRAENEI-1)) |(1<<(RACE_NAGA-1)) |(1<<(RACE_BROKEN-1)) |(1<<(RACE_VRYKUL-1)) |(1<<(RACE_GOBLIN-1)))
#define RACEMASK_ALLIANCE ((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) | (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)) | (1<<(RACE_NAGA-1)) | (1<<(RACE_BROKEN-1)))
#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE
I added in stats for them in DB for them in...
Playercreateinfo Playercreateinfo_action Playercreateinfo_item Playercreateinfo_spell Playercreateinfo_spell_custom player_classlevelstats Player_levelstats player_xp_for_level
I'm not sure what else needs done. I thought that was it, but I"m still getting an error on character creation that the class/race is not valid...
DBC files are edited, patched, and placed in Server's DBC folder as well..
Error I"m getting is...
Player::Create: Possible hacking-attempt: Account 1 tried creating a character named 'Goblintest' with an invalid race/class pair (9/1) - refusing to do so.
Anyone know if there is any other core file in Trinity that needs changed?? Or what might be wrong. I've triple checked my dbc files for the patch, I"m pretty sure they're correct and not the issue.
Ascathos:
How do you have 17 races with one missing and having 16 named ? 14 is missing.
mferrill:
--- Quote from: "Ascathos" ---How do you have 17 races with one missing and having 16 named ? 14 is missing. --- End quote ---
Broken = 14 - it's actually FEL_ORC = 12 that isn't on the list, and changing from 17 Max to 15, did nothing. Although, your right it was a mistake on my part, and should be 15. (I think)
And I could have set it up like this.... but it seemed...messy and unorganized
// Race value is index in ChrRaces.dbc enum Races { RACE_NONE = 0, RACE_HUMAN = 1, RACE_ORC = 2, RACE_DWARF = 3, RACE_NIGHTELF = 4, RACE_UNDEAD_PLAYER = 5, RACE_TAUREN = 6, RACE_GNOME = 7, RACE_TROLL = 8, RACE_GOBLIN = 9, RACE_BLOODELF = 10, RACE_DRAENEI = 11 //RACE_FEL_ORC = 12, RACE_NAGA = 13, RACE_BROKEN = 14, //RACE_SKELETON = 15, RACE_VRYKUL = 16, //RACE_TUSKARR = 17, //RACE_FOREST_TROLL = 18, //RACE_TAUNKA = 19, //RACE_NORTHREND_SKELETON = 20, //RACE_ICE_TROLL = 21 };
Appreciate you taking the time to read, and respond. Unfortunately, I"m still stuck in the same spot.
XxXGenesisXxX:
RACE_DRAENEI = 11
Has no comma at the end, the list will, stop reading, surprised it even compiled. Also, that error you are getting has always come from a database mismatch for me. Check the playercreateinfo table again to make sure.
mferrill:
--- Quote from: "XxXGenesisXxX" ---RACE_DRAENEI = 11
Has no comma at the end, the list will, stop reading, surprised it even compiled. Also, that error you are getting has always come from a database mismatch for me. Check the playercreateinfo table again to make sure. --- End quote ---
Thanks for the reply!
I'm actually using ...
enum Races { RACE_NONE = 0, RACE_HUMAN = 1, RACE_ORC = 2, RACE_DWARF = 3, RACE_NIGHTELF = 4, RACE_UNDEAD_PLAYER = 5, RACE_TAUREN = 6, RACE_GNOME = 7, RACE_TROLL = 8, RACE_GOBLIN = 9, RACE_BLOODELF = 10, RACE_DRAENEI = 11, RACE_NAGA = 13, RACE_BROKEN = 14, RACE_VRYKUL = 16 };
// max+1 for player race #define MAX_RACES 17
I decided to keep the MAX_RACES 17 - Looking at Cata SharedDefines, that seems right.... I Think I"ll have to rebuild my entire PlayerCreateInfo table again. I had All race all class enabled before...I think that's where things went wrong! :D
Any other thoughts on the matter, or suggestion are always welcome. Thanks again for the help!
Navigation
[0] Message Index
[#] Next page
|