mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
crash fix 4
This commit is contained in:
@@ -16,6 +16,9 @@ bool AttackAction::Execute(Event event)
|
|||||||
if (!target)
|
if (!target)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!target->IsInWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return Attack(target);
|
return Attack(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class NearestEnemyPlayersValue : public PossibleTargetsValue
|
|||||||
class EnemyPlayerValue : public UnitCalculatedValue
|
class EnemyPlayerValue : public UnitCalculatedValue
|
||||||
{
|
{
|
||||||
public:
|
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;
|
Unit* Calculate() override;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user