Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Player::addManaSpent(uint64_t spent)
- {
- if(spent == 0)
- return;
- if(this->maglevel+1 == 201 && this->vocation == VOCATION_SORCERER)
- return;
- if(this->maglevel+1 == 31 && this->vocation == VOCATION_KNIGHT)
- return;
- if(this->maglevel+1 == 81 && this->vocation == VOCATION_PALADIN)
- return;
- #ifdef YUR_MULTIPLIERS
- spent *= g_config.MANA_MUL[vocation];
- #endif //YUR_MULTIPLIERS
- this->manaspent += spent;
- //Magic Level Advance
- uint64_t reqMana = this->getReqMana(this->maglevel+1, this->vocation);
- if (this->access < g_config.ACCESS_PROTECT && this->manaspent >= reqMana)
- {
- this->manaspent -= reqMana;
- #ifdef __MIZIAK_CREATURESCRIPTS__
- int32_t tab[] = {7, this->maglevel, this->maglevel+1};
- actions.creatureEvent("advance", this, NULL, NULL, tab);
- #endif //__MIZIAK_CREATURESCRIPTS__
- this->maglevel++;
- std::stringstream MaglvMsg;
- MaglvMsg << "You advanced from magic level " << (this->maglevel - 1) << " to magic level " << this->maglevel << ".";
- this->sendTextMessage(MSG_ADVANCE, MaglvMsg.str().c_str());
- this->sendStats();
- }
- //End Magic Level Advance*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement