diff --git a/src/LuaEngine/LuaFunctions.cpp b/src/LuaEngine/LuaFunctions.cpp index c0acc013a4..5c22b2cf1d 100644 --- a/src/LuaEngine/LuaFunctions.cpp +++ b/src/LuaEngine/LuaFunctions.cpp @@ -744,6 +744,7 @@ ALERegister PlayerMethods[] = { "RemoveItem", &LuaPlayer::RemoveItem }, { "RemoveLifetimeKills", &LuaPlayer::RemoveLifetimeKills }, { "ResurrectPlayer", &LuaPlayer::ResurrectPlayer }, + { "RepopAtGraveyard", &LuaPlayer::RepopAtGraveyard }, { "EquipItem", &LuaPlayer::EquipItem }, { "ResetSpellCooldown", &LuaPlayer::ResetSpellCooldown }, { "ResetTypeCooldowns", &LuaPlayer::ResetTypeCooldowns }, diff --git a/src/LuaEngine/methods/PlayerMethods.h b/src/LuaEngine/methods/PlayerMethods.h index f8862615a7..b37ec3c931 100644 --- a/src/LuaEngine/methods/PlayerMethods.h +++ b/src/LuaEngine/methods/PlayerMethods.h @@ -3604,6 +3604,17 @@ namespace LuaPlayer return 0; } + /** + * Teleports the [Player] to the most appropriate graveyard. + * + * The graveyard is selected using the [Player]'s corpse location. + */ + int RepopAtGraveyard(lua_State* /*L*/, Player* player) + { + player->RepopAtGraveyard(); + return 0; + } + /** * Adds a new item to the gossip menu shown to the [Player] on next call to [Player:GossipSendMenu]. *