How i know how does it works class

Hello guys i am creating a new class but i need how i can change the code of AnyKindOfFile.cpp

that have the lines, that have defined if the class is a tank a healer or a DPS.

And how i put the spells and the talents correctly.

Can anyone help me pleasse?

Requires client modifying, which we don’t support. Sorry.

All those things you mentioned are handled by the client, the server has no interaction whatsoever there.

oh thx ^^

There are tons of things that are not “Client” changes that would need to be made.

/src/server/game/Entities/Creature/Creature.cpp

Look for

switch (GetCreatureTemplate()->trainer_class)

Add new case for trainer

Then… /src/server/game/Entities/Item/ItemPrototype.h

Look for

ITEM_SUBCLASS_GLYPH_WARLOCK = 9,

Add new ITEM_SUBCLASS_GLYPH_‘NewClassNameHere’ =10,

Then… /src/server/game/Entities/Player/Player.cpp

Look for

Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing)

Make a new value there → Just copy a similar stat value…

scroll down… there are similar sets just below that to edit in the same fashion…

Then search for …

return EQUIP_ERR_CANT_DO_RIGHT_NOW;

if (_class == CLASS_ROGUE || _class == CLASS_DRUID)

Replace with

if (_class == CLASS_ROGUE || _class == CLASS_DRUID || _class == CLASS_YOURCLASSNAME)

Where CLASS_YOURCLASSNAME = the name of the class.

Then …/src/server/game/Entities/Unit/StatSystem.cpp

Look for…

case CLASS_WARRIOR:
val2 = level + GetStat(STAT_AGILITY) - 10.0f;
break;

Add a new case for your class…

Scroll down to…

case CLASS_HUNTER:
val2 = level * 2.0f + GetStat(STAT_STRENGTH) + GetStat(STAT_AGILITY) - 20.0f;
break;

Add a new case for your class…

Search for : const float m_diminishing_k[MAX_CLASSES] =

agian copy a similar Value for your class…

Same under …

float Player::GetMissPercentageFromDefence() const

and

Player::UpdateParryPercentage()

and

Player::UpdateDodgePercentage()

then goto /src/server/game/Globals/ObjectMgr.cpp

Search for…

info->stats[STAT_INTELLECT] += (lvl > 33 ? 2: (lvl > 2 ? 1: 0));
info->stats[STAT_SPIRIT] += (lvl > 38 ? 2: (lvl > 3 ? 1: 0));
break;

Add new case for class… Look at the others there…

Somthing like…

  •     case CLASS_TEST:
    
  •            info->stats[STAT_STRENGTH]  += (lvl > 34 ? 1: (lvl > 6 && (lvl%2) ? 1: 0));
    
  •            info->stats[STAT_STAMINA]   += (lvl > 4 ? 1: 0);
    
  •            info->stats[STAT_AGILITY]   += (lvl > 7 && !(lvl%2) ? 1: 0);
    
  •            info->stats[STAT_INTELLECT] += (lvl > 5 ? 1: 0);
    
  •            info->stats[STAT_SPIRIT]    += (lvl > 4 ? 1: 0);
    
  •            break;
    

Of course replace CLASS_TEST with your class…

The rest is in Shared Defines.h

enum Classes

(Add new value or edit # 10)

Search for (1<<(CLASS_DEATH_KNIGHT-1)))

Edit to…

(1<<(CLASS_TEST-1)) |(1<<(CLASS_DEATH_KNIGHT-1)))

Agian editing TEST as your class name…

Search for…

QUEST_SORT_LOVE_IS_IN_THE_AIR = 376,

Add new QUEST_SORT_(CLASSNAME) below it.

Same under enum SpellFamilyNames

That should be it… All of it is Core Edits. I"m sure it’ll be erased anyways though

thx alot ^^