fix(Scripts/Commands): solve crash in .npc move (#10825)
This commit is contained in:
committed by
GitHub
parent
bd4f0a871e
commit
5d51b0060c
@@ -703,11 +703,12 @@ public:
|
|||||||
static bool HandleNpcMoveCommand(ChatHandler* handler)
|
static bool HandleNpcMoveCommand(ChatHandler* handler)
|
||||||
{
|
{
|
||||||
Creature* creature = handler->getSelectedCreature();
|
Creature* creature = handler->getSelectedCreature();
|
||||||
ObjectGuid::LowType lowguid = creature->GetSpawnId();
|
|
||||||
|
|
||||||
if (!creature)
|
if (!creature)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
ObjectGuid::LowType lowguid = creature->GetSpawnId();
|
||||||
|
|
||||||
CreatureData const* data = sObjectMgr->GetCreatureData(lowguid);
|
CreatureData const* data = sObjectMgr->GetCreatureData(lowguid);
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user