mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 14:36:40 -04:00
Resurrect function
This commit is contained in:
parent
1a32385632
commit
299c4c904e
@ -212,7 +212,6 @@ void Networking::Update(RakNet::Packet *packet)
|
||||
//packetMainStats.Read(player);
|
||||
player->CreatureStats()->mDead = true;
|
||||
myPacket->Send(player, true);
|
||||
controller->GetPacket(ID_GAME_RESURRECT)->RequestData(player->guid);
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerDeath")>(player->GetID());
|
||||
|
||||
|
@ -406,3 +406,10 @@ void ScriptFunctions::SetCharGenStage(unsigned short pid, int start, int end) no
|
||||
|
||||
mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_CHARGEN)->Send(player, false);
|
||||
}
|
||||
|
||||
void ScriptFunctions::Resurrect(unsigned short pid)
|
||||
{
|
||||
Player *player;
|
||||
GET_PLAYER(pid, player,);
|
||||
mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_RESURRECT)->RequestData(player->guid);
|
||||
}
|
@ -90,6 +90,7 @@ public:
|
||||
static int GetIncreaseSkill(unsigned short pid, unsigned int pos) noexcept;
|
||||
static void SetIncreaseSkill(unsigned short pid, unsigned int pos, int value) noexcept;
|
||||
|
||||
static void Resurrect(unsigned short pid);
|
||||
|
||||
//static void AddItem(unsigned short pid, const char* itemName, unsigned short count) noexcept;
|
||||
//static void RemoveItem(unsigned short pid, const char* itemName, unsigned short count) noexcept;
|
||||
@ -205,6 +206,7 @@ public:
|
||||
{"HasItemEquipped", ScriptFunctions::HasItemEquipped},
|
||||
{"SendMessage", ScriptFunctions::SendMessage},
|
||||
{"SetCharGenStage", ScriptFunctions::SetCharGenStage},
|
||||
{"Resurrect", ScriptFunctions::Resurrect},
|
||||
|
||||
{"Kick", ScriptFunctions::Kick},
|
||||
};
|
||||
@ -224,4 +226,4 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
#endif //SOURCEPAWN_SCRIPTFUNCTIONS_HPP
|
||||
#endif //SOURCEPAWN_SCRIPTFUNCTIONS_HPP
|
Loading…
x
Reference in New Issue
Block a user