Forum > Serverside Modding
[QUESTION] [C++] ArcEmu
<< < (3/3)
Serifaz:
O.k. I think I got the core mostly worked out, but when I try to make the character it tells me class 13 race 23 level info not found... is this dbc or a core problem? maybe both?
Steff:
Search the error message inside the source. Then you will find the place where it is generated and can take a look what the problem is direct inside the code.
Serifaz:
All I can find is the objectmgr.cpp and .h and I have no idea how they are assigning the levelinfo X)
Steff:
The manager provide this function to check if ther is the combination of race and class
--- Code: ---LevelInfo* ObjectMgr::GetLevelInfo(uint32 Race, uint32 Class, uint32 Level) --- End code ---
It will return NULL if the combination do not exist.
This Function search the Object mLevelInfo if ther is an entry for your race.
This gets filled in the function
--- Code: ---void ObjectMgr::GenerateLevelUpInfo() --- End code ---
And there you see that the races are hardcoded so if you want to use naga(13) you need to change all parts.
--- Code: ---for(uint32 Race = RACE_HUMAN; Race <= RACE_DRAENEI; ++Race ) --- End code ---
--- Quote ---RACE_HUMAN = 1 RACE_DRAENE =11 --- End quote ---
So 12 and 13 never get loaded even if they exist.
And at the bottom of the function you found:
--- Code: ---// Now that our level map is full, let's create the class/race pair pair<uint32, uint32> p; p.first = Race; p.second = Class;
// Insert back into the main map. mLevelInfo.insert( LevelInfoMap::value_type( p, lMap ) ); --- End code ---
This part will not fill in them into the object that hold the combinations.
Serifaz:
O.k, I got the core compiled and the races and classes are both working, but how would I go about making it so I can add more identifiers in the talent section of player.h?
I have set up the talent tabs in the dbc's but I just need to add two lines in the TalentTreesPerClass section
this is what mine looks like.
[spoiler:2p34a6cd]/** TalentTree table
mage - arcane - 81 mage - fire - 41 mage - frost - 61
rogue - assassination - 182 rogue - combat - 181 rogue - subelty - 183
warlock - affliction - 302 warlock - demonology - 303 warlock - destruction - 301
warrior - arms - 161 warrior - fury - 163 warrior - protection - 164
shaman - elemental - 261 shaman - enchantment - 263 shaman - restoration - 262
paladin - holy - 382 paladin - protection - 383 paladin - retribution - 381
death knight - blood - 398 death knight - frost - 399 death knight - unholy - 400
priest - discipline - 201 priest - holy - 202 priest - shadow - 203
hunter - beast - 361 hunter - marksmanship - 363 hunter - survival - 362
druid - balance - 283 druid - feral combat - 281 druid - restoration - 282 battleMage - illusion - 401 battlemage - defense - 402 battlemage - force - 403 brewmaster - stability - 404 brewmaster - recklessness -405 brewmaster - potency - 406 */
static const uint32 TalentTreesPerClass[DRUID + 1][3] = { { 0, 0, 0 }, // NONE { 161, 163, 164 }, // WARRIOR { 382, 383, 381 }, // PALADIN { 361, 363, 362 }, // HUNTER { 182, 181, 183 }, // ROGUE { 201, 202, 203 }, // PRIEST { 398, 399, 400 }, // DEATH KNIGHT { 261, 263, 262 }, // SHAMAN { 81, 41, 61 }, // MAGE { 302, 303, 301 }, // WARLOCK { 0, 0, 0 }, // NONE { 283, 281, 282 }, // DRUID { 401, 402, 403 }, // BATTLEMAGE { 404, 405, 406 }, // BREWMASTER[/spoiler:2p34a6cd]
I am trying to make a tutorial on how to make custom class talents but I can't get the talent trees to compile
Navigation
[0] Message Index
[*] Previous page
|