Jump to content

Custom XP Rates Command [MaNGOSZero]

Recommended Posts


I have used the code from http://getmangos.eu/community/topic/15446/request-double-xp-donner-player/ however I cannot get it to work in-game. I have created the command, it updates the database but that's about it. It has no effect on the XP gained in-game.

My aim is to have a player command so that I can choose my own level rate.

Can anyone help?


Link to comment
Share on other sites

  • 42 years later...

You instead create a new integral value in the player class with a default value of 1

uint32 xprate = 1;

Then inside the void Player::GiveXP(uint32 xp, Unit* victim) function you add this: xp = xp*xprate; (in the beginning would probably be fine)

Then you create a chat command to set the players xprate value.

That should be it, if you need more help, then reply here again! And remember, the goal is to learn!

Link to comment
Share on other sites

uint32 xprate = 1; should be in the player.cpp file inside here:

Player::Player (WorldSession *session): Unit(), m_mover(this), m_camera(this), m_reputationMgr(this)


And what we are doing atm, is writing our own xp rate system, do you want this to save to the database or just be modified by a command?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • 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