mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Add possible crash fix when summoning an invalid bot (#1125)
This commit is contained in:
@@ -217,6 +217,9 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
|||||||
|
|
||||||
if (bot->isDead() && revive)
|
if (bot->isDead() && revive)
|
||||||
{
|
{
|
||||||
|
if (!botAI->IsSafe(player) || !botAI->IsSafe(summoner))
|
||||||
|
return false;
|
||||||
|
|
||||||
bot->ResurrectPlayer(1.0f, false);
|
bot->ResurrectPlayer(1.0f, false);
|
||||||
botAI->TellMasterNoFacing("I live, again!");
|
botAI->TellMasterNoFacing("I live, again!");
|
||||||
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
|
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user