modify bot revive when summon behaviour

This commit is contained in:
Yunfan Li
2023-10-17 21:02:59 +08:00
parent c8d223e898
commit e5e05988b2
4 changed files with 6 additions and 5 deletions

View File

@@ -173,7 +173,8 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
if (summoner->IsWithinLOS(x, y, z))
{
if (sPlayerbotAIConfig->botReviveWhenSummon && bot->isDead())
bool allowed = sPlayerbotAIConfig->botReviveWhenSummon == 2 || (sPlayerbotAIConfig->botReviveWhenSummon == 1 && !master->IsInCombat() && master->IsAlive());
if (allowed && bot->isDead())
{
bot->ResurrectPlayer(1.0f, false);
bot->DurabilityRepairAll(false, 1.0f, false);