mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-15 18:00:27 +00:00
razuvious strategy
This commit is contained in:
@@ -22,4 +22,16 @@ class ThreatValue : public Uint8CalculatedValue, public Qualified
|
||||
uint8 Calculate(Unit* target);
|
||||
};
|
||||
|
||||
class NeglectThreatResetValue : public ManualSetValue<bool>
|
||||
{
|
||||
public:
|
||||
NeglectThreatResetValue(PlayerbotAI* ai, bool defaultValue = false, std::string name = "neglect threat") :
|
||||
ManualSetValue<bool>(ai, defaultValue, name) {}
|
||||
virtual bool Get() {
|
||||
bool ret = value;
|
||||
Reset();
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -291,6 +291,7 @@ class ValueContext : public NamedObjectContext<UntypedValue>
|
||||
creators["find target"] = &ValueContext::find_target;
|
||||
creators["boss target"] = &ValueContext::boss_target;
|
||||
creators["nearest triggers"] = &ValueContext::nearest_triggers;
|
||||
creators["neglect threat"] = &ValueContext::neglect_threat;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -486,6 +487,7 @@ class ValueContext : public NamedObjectContext<UntypedValue>
|
||||
static UntypedValue* find_target(PlayerbotAI* ai) { return new FindTargetValue(ai); }
|
||||
static UntypedValue* boss_target(PlayerbotAI* ai) { return new BossTargetValue(ai); }
|
||||
static UntypedValue* nearest_triggers(PlayerbotAI* ai) { return new NearestTriggersValue(ai); }
|
||||
static UntypedValue* neglect_threat(PlayerbotAI* ai) { return new NeglectThreatResetValue(ai); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user