Pastebin

New pastes are no longer accepted · Stats

Latest Pastes

Char_Mod.cpp


/* $Id$
 * EOSERV is released under the zlib license.
 * See LICENSE.txt for more info.
 */

#include "playercommands.hpp"

#include <functional>

#include "../arena.hpp"
#include "../character.hpp"
#include "../console.hpp"
#include "../config.hpp"
#include "../map.hpp"
#include "../packet.hpp"
#include "../player.hpp"
#include "../quest.hpp"
#include "../world.hpp"

namespace PlayerCommands
{
    void Race(const std::vector<std::string>& arguments, Command_Source* from)
    {
        Character* victim = from->SourceCharacter();

        victim->race = Skin(std::min(std::max(util::to_int(arguments[0]), 0), int(from->SourceWorld()->config["MaxSkin"])));
        victim->Warp(victim->map->id, victim->x, victim->y);
    }


PLAYER_COMMAND_HANDLER_REGISTER()
	using namespace std::placeholders;
    Register({"race", {"value"}, {}, 2}, Race);
PLAYER_COMMAND_HANDLER_REGISTER_END()

}