mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 18:30:27 +00:00
[HOTFIX] Revert "Fix/Feat: Stop bots in party from PVP when master isn't, and … (#2003)
…PVP probablity system (#1914)"
This reverts commit 02e8465a3b.
[worldserver_gdb_20260111_000520.log](https://github.com/user-attachments/files/24547263/worldserver_gdb_20260111_000520.log)
Noticed the server kept crashing all the sudden, first thought it was
local issue but see dump.
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
|
||||
bool NearestEnemyPlayersValue::AcceptUnit(Unit* unit)
|
||||
{
|
||||
// Apply parent's filtering first (includes level difference checks)
|
||||
if (!PossibleTargetsValue::AcceptUnit(unit))
|
||||
return false;
|
||||
|
||||
bool inCannon = botAI->IsInVehicle(false, true);
|
||||
Player* enemy = dynamic_cast<Player*>(unit);
|
||||
if (enemy && botAI->IsOpposing(enemy) && enemy->IsPvP() &&
|
||||
@@ -23,14 +19,7 @@ bool NearestEnemyPlayersValue::AcceptUnit(Unit* unit)
|
||||
((inCannon || !enemy->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))) &&
|
||||
/*!enemy->HasStealthAura() && !enemy->HasInvisibilityAura()*/ enemy->CanSeeOrDetect(bot) &&
|
||||
!(enemy->HasSpiritOfRedemptionAura()))
|
||||
{
|
||||
// If with master, only attack if master is PvP flagged
|
||||
Player* master = botAI->GetMaster();
|
||||
if (master && !master->IsPvP() && !master->IsFFAPvP())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user