mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Fixed bug in respawn command from recent commit
Command must now ignore implicit self-targeted player as target. And allow respawn all near creatures/go in this case. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4f228f71cd
commit
7b9e86e3f3
1 changed files with 4 additions and 4 deletions
|
|
@ -5315,9 +5315,11 @@ bool ChatHandler::HandleBanListIPCommand(const char* args)
|
|||
|
||||
bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
|
||||
{
|
||||
Unit* target = getSelectedUnit();
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
||||
if(target)
|
||||
// accept only explictly selected target (not implicitly self targeting case)
|
||||
Unit* target = getSelectedUnit();
|
||||
if(pl->GetSelection() && target)
|
||||
{
|
||||
if(target->GetTypeId()!=TYPEID_UNIT)
|
||||
{
|
||||
|
|
@ -5331,8 +5333,6 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue