tell expected group dps

This commit is contained in:
Yunfan Li
2023-10-10 23:31:43 +08:00
parent 417c5bbc93
commit 687aba146a
5 changed files with 20 additions and 0 deletions

View File

@@ -166,6 +166,7 @@ class ChatActionContext : public NamedObjectContext<Action>
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;
}
@@ -258,6 +259,7 @@ class ChatActionContext : public NamedObjectContext<Action>
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); }
};
#endif

View File

@@ -125,4 +125,11 @@ bool TellAuraAction::Execute(Event event)
}
}
return true;
}
bool TellExpectedDpsAction::Execute(Event event)
{
float dps = AI_VALUE(float, "expected group dps");
botAI->TellMaster("Expected Group DPS: " + std::to_string(dps));
return true;
}

View File

@@ -28,4 +28,12 @@ class TellAuraAction : public Action
virtual bool Execute(Event event);
};
class TellExpectedDpsAction : public Action
{
public:
TellExpectedDpsAction(PlayerbotAI* ai) : Action(ai, "tell expected dps") {}
virtual bool Execute(Event event);
};
#endif