#include "Mechanics.hpp" #include #include #include #include #include using namespace std; void MechanicsFunctions::Jail(unsigned short pid, int jailDays, bool ignoreJailTeleportation, bool ignoreJailSkillIncreases, const char* jailText) noexcept { Player *player; GET_PLAYER(pid, player, ); player->jailDays = jailDays; player->ignoreJailTeleportation = ignoreJailTeleportation; player->ignoreJailSkillIncreases = ignoreJailSkillIncreases; player->jailText = jailText; mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_JAIL)->setPlayer(player); mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_JAIL)->Send(false); } void MechanicsFunctions::Resurrect(unsigned short pid, unsigned int type) noexcept { Player *player; GET_PLAYER(pid, player, ); player->resurrectType = type; mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->setPlayer(player); mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->Send(false); mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->Send(true); }