mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
crash fix 4
This commit is contained in:
parent
5e6ddce6b2
commit
897ee35b4e
@ -16,6 +16,9 @@ bool AttackAction::Execute(Event event)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (!target->IsInWorld()) {
|
||||
return false;
|
||||
}
|
||||
return Attack(target);
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ class NearestEnemyPlayersValue : public PossibleTargetsValue
|
||||
class EnemyPlayerValue : public UnitCalculatedValue
|
||||
{
|
||||
public:
|
||||
EnemyPlayerValue(PlayerbotAI* botAI, std::string const name = "enemy player") : UnitCalculatedValue(botAI, name, 5 * 1000) { }
|
||||
EnemyPlayerValue(PlayerbotAI* botAI, std::string const name = "enemy player") : UnitCalculatedValue(botAI, name, 1 * 1000) { }
|
||||
|
||||
Unit* Calculate() override;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user