mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Estimated dps calculation
This commit is contained in:
@@ -172,7 +172,7 @@ public:
|
||||
creators["rtsc"] = &ChatActionContext::rtsc;
|
||||
creators["naxx chat shortcut"] = &ChatActionContext::naxx_chat_shortcut;
|
||||
creators["bwl chat shortcut"] = &ChatActionContext::bwl_chat_shortcut;
|
||||
creators["tell expected dps"] = &ChatActionContext::tell_expected_dps;
|
||||
creators["tell estimated dps"] = &ChatActionContext::tell_estimated_dps;
|
||||
creators["join"] = &ChatActionContext::join;
|
||||
creators["calc"] = &ChatActionContext::calc;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ private:
|
||||
static Action* rtsc(PlayerbotAI* botAI) { return new RTSCAction(botAI); }
|
||||
static Action* naxx_chat_shortcut(PlayerbotAI* ai) { return new NaxxChatShortcutAction(ai); }
|
||||
static Action* bwl_chat_shortcut(PlayerbotAI* ai) { return new BwlChatShortcutAction(ai); }
|
||||
static Action* tell_expected_dps(PlayerbotAI* ai) { return new TellExpectedDpsAction(ai); }
|
||||
static Action* tell_estimated_dps(PlayerbotAI* ai) { return new TellEstimatedDpsAction(ai); }
|
||||
static Action* join(PlayerbotAI* ai) { return new JoinGroupAction(ai); }
|
||||
static Action* calc(PlayerbotAI* ai) { return new TellCalculateItemAction(ai); }
|
||||
};
|
||||
|
||||
@@ -364,5 +364,5 @@ bool CastDebuffSpellAction::isUseful()
|
||||
return false;
|
||||
}
|
||||
return CastAuraSpellAction::isUseful() &&
|
||||
(target->GetHealth() / AI_VALUE(float, "expected group dps")) >= needLifeTime;
|
||||
(target->GetHealth() / AI_VALUE(float, "estimated group dps")) >= needLifeTime;
|
||||
}
|
||||
@@ -130,10 +130,10 @@ bool TellAuraAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TellExpectedDpsAction::Execute(Event event)
|
||||
bool TellEstimatedDpsAction::Execute(Event event)
|
||||
{
|
||||
float dps = AI_VALUE(float, "expected group dps");
|
||||
botAI->TellMaster("Expected Group DPS: " + std::to_string(dps));
|
||||
float dps = AI_VALUE(float, "estimated group dps");
|
||||
botAI->TellMaster("Estimated Group DPS: " + std::to_string(dps));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ public:
|
||||
virtual bool Execute(Event event);
|
||||
};
|
||||
|
||||
class TellExpectedDpsAction : public Action
|
||||
class TellEstimatedDpsAction : public Action
|
||||
{
|
||||
public:
|
||||
TellExpectedDpsAction(PlayerbotAI* ai) : Action(ai, "tell expected dps") {}
|
||||
TellEstimatedDpsAction(PlayerbotAI* ai) : Action(ai, "tell estimated dps") {}
|
||||
|
||||
virtual bool Execute(Event event);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user