mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/Commands): Fix assertion error on mmaps path command (#13704)
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
return commandTable;
|
||||
}
|
||||
|
||||
static bool HandleMmapPathCommand(ChatHandler* handler, Optional<std::string> para)
|
||||
static bool HandleMmapPathCommand(ChatHandler* handler, Optional<std::string> param)
|
||||
{
|
||||
if (!MMAP::MMapFactory::createOrGetMMapMgr()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId()))
|
||||
{
|
||||
@@ -81,13 +81,19 @@ public:
|
||||
}
|
||||
|
||||
bool useStraightPath = false;
|
||||
if (StringStartsWith("true", *para))
|
||||
useStraightPath = true;
|
||||
|
||||
bool useRaycast = false;
|
||||
if (StringStartsWith("line", *para) || StringStartsWith("ray", *para) || StringStartsWith("raycast", *para))
|
||||
if (param)
|
||||
{
|
||||
useRaycast = true;
|
||||
auto paramValue = param.value();
|
||||
if (paramValue.starts_with("true"))
|
||||
{
|
||||
useStraightPath = true;
|
||||
}
|
||||
|
||||
if (paramValue.starts_with("line") || paramValue.starts_with("ray") || paramValue.starts_with("raycast"))
|
||||
{
|
||||
useRaycast = true;
|
||||
}
|
||||
}
|
||||
|
||||
// unit locations
|
||||
|
||||
Reference in New Issue
Block a user