mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix crash when RandomBotSayWithoutMaster set to 1
This commit is contained in:
parent
d8ac42439a
commit
7c872915ec
@ -1479,7 +1479,7 @@ bool PlayerbotAI::TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel
|
|||||||
|
|
||||||
bool PlayerbotAI::TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel)
|
bool PlayerbotAI::TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel)
|
||||||
{
|
{
|
||||||
if (!TellMasterNoFacing(text, securityLevel))
|
if (!master || !TellMasterNoFacing(text, securityLevel))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!bot->isMoving() && !bot->IsInCombat() && bot->GetMapId() == master->GetMapId() && !bot->HasUnitState(UNIT_STATE_IN_FLIGHT) && !bot->IsFlying())
|
if (!bot->isMoving() && !bot->IsInCombat() && bot->GetMapId() == master->GetMapId() && !bot->HasUnitState(UNIT_STATE_IN_FLIGHT) && !bot->IsFlying())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user