mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Add possible crash fix when summoning an invalid bot (#1125)
This commit is contained in:
parent
d2204d41e2
commit
495269bfa0
@ -217,6 +217,9 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
||||
|
||||
if (bot->isDead() && revive)
|
||||
{
|
||||
if (!botAI->IsSafe(player) || !botAI->IsSafe(summoner))
|
||||
return false;
|
||||
|
||||
bot->ResurrectPlayer(1.0f, false);
|
||||
botAI->TellMasterNoFacing("I live, again!");
|
||||
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user