mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-02 14:36:44 +00:00
[Server] Remove redundant SetResurrectType
Rename SendResurrect to Resurrect
This commit is contained in:
parent
813a3c89c4
commit
9ab58b6708
2 changed files with 4 additions and 15 deletions
|
@ -7,19 +7,12 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void DeathFunctions::SetResurrectType(unsigned short pid, unsigned int type)
|
void DeathFunctions::Resurrect(unsigned short pid, unsigned int type) noexcept
|
||||||
{
|
|
||||||
Player *player;
|
|
||||||
GET_PLAYER(pid, player,);
|
|
||||||
|
|
||||||
player->resurrectType = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeathFunctions::SendResurrect(unsigned short pid) noexcept
|
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, 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)->setPlayer(player);
|
||||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->Send(false);
|
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->Send(false);
|
||||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->Send(true);
|
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_RESURRECT)->Send(true);
|
||||||
|
|
|
@ -4,16 +4,12 @@
|
||||||
#include "../Types.hpp"
|
#include "../Types.hpp"
|
||||||
|
|
||||||
#define DEATHAPI \
|
#define DEATHAPI \
|
||||||
{"SetResurrectType", DeathFunctions::SetResurrectType},\
|
{"Resurrect", DeathFunctions::Resurrect}
|
||||||
\
|
|
||||||
{"SendResurrect", DeathFunctions::SendResurrect}
|
|
||||||
|
|
||||||
class DeathFunctions
|
class DeathFunctions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void SetResurrectType(unsigned short pid, unsigned int type);
|
static void Resurrect(unsigned short pid) noexcept;
|
||||||
|
|
||||||
static void SendResurrect(unsigned short pid) noexcept;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OPENMW_DEATHAPI_HPP
|
#endif //OPENMW_DEATHAPI_HPP
|
||||||
|
|
Loading…
Reference in a new issue