Jump to content

Disable Classes from Being Created


Guest henhouse

Recommended Posts

Okay, so I'm wondering if it's possible, or could be added as an option to disable certain classes to be created. For example(once it's supported) death knights. Since they will most likely be bugged, etc and I don't want to deal with all that to start off. So is there anyway a player would have the expansion enabled, but certain classes disabled? Sort of like if you don't have a BC account the new races are disabled. Just wondering if it's possible.

Thanks.

Link to comment
Share on other sites

In player.cpp (line 487 in mangos/origin 6898)

    PlayerInfo const* info = objmgr.GetPlayerInfo(race, class_);
   if(!info)
   {
       sLog.outError("Player have incorrect race/class pair. Can't be loaded.");
       return false;
   }

If you could put some code in here to check for a class and then return false you can stop a character from being loaded.

In CharacterHandler.cpp (line 236 in mangos/origin 6898)

   // prevent character creating Expansion class without Expansion account
   // TODO: use possible addon field in ChrClassesEntry in next dbc version
   if (Expansion() < 2 && class_ == CLASS_DEATH_KNIGHT)
   {
       data << (uint8)CHAR_CREATE_EXPANSION;
       sLog.outError("Not Expansion 2 account:[%d] but tried to Create character with expansion 2 class (%u)",GetAccountId(),class_);
       SendPacket( &data );
       return;
   }

Make this ALWAYS return false to stop death knights from being made. Also modify

   if (Expansion() < 2 && class_ == CLASS_DEATH_KNIGHT)

to have <3 or <=2 so that wotlk is covered like this ithink:

   if (Expansion() < 3 && class_ == CLASS_DEATH_KNIGHT)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use