Scripts/Commands: Fix crashes with ".group revive" and ".group repair"
Close #26575 (cherry picked from commit 105c70802ded53b49621a92ee8fa136e57d0c717)
This commit is contained in:
@@ -120,8 +120,7 @@ public:
|
|||||||
static bool HandleGroupReviveCommand(ChatHandler* handler, char const* args)
|
static bool HandleGroupReviveCommand(ChatHandler* handler, char const* args)
|
||||||
{
|
{
|
||||||
Player* playerTarget;
|
Player* playerTarget;
|
||||||
ObjectGuid playerTargetGuid;
|
if (!handler->extractPlayerTarget((char*)args, &playerTarget))
|
||||||
if (!handler->extractPlayerTarget((char*)args, &playerTarget, &playerTargetGuid))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Group* groupTarget = playerTarget->GetGroup();
|
Group* groupTarget = playerTarget->GetGroup();
|
||||||
@@ -146,8 +145,7 @@ public:
|
|||||||
static bool HandleGroupRepairCommand(ChatHandler* handler, char const* args)
|
static bool HandleGroupRepairCommand(ChatHandler* handler, char const* args)
|
||||||
{
|
{
|
||||||
Player* playerTarget;
|
Player* playerTarget;
|
||||||
ObjectGuid playerTargetGuid;
|
if (!handler->extractPlayerTarget((char*)args, &playerTarget))
|
||||||
if (!handler->extractPlayerTarget((char*)args, &playerTarget, &playerTargetGuid))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Group* groupTarget = playerTarget->GetGroup();
|
Group* groupTarget = playerTarget->GetGroup();
|
||||||
|
|||||||
Reference in New Issue
Block a user