mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-25 06:26:24 +00:00
bwl strategy
This commit is contained in:
@@ -165,6 +165,8 @@ class ChatActionContext : public NamedObjectContext<Action>
|
||||
creators["guild leave"] = &ChatActionContext::guild_leave;
|
||||
creators["rtsc"] = &ChatActionContext::rtsc;
|
||||
creators["naxx chat shortcut"] = &ChatActionContext::naxx_chat_shortcut;
|
||||
creators["bwl chat shortcut"] = &ChatActionContext::bwl_chat_shortcut;
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -255,6 +257,7 @@ class ChatActionContext : public NamedObjectContext<Action>
|
||||
static Action* guild_leave(PlayerbotAI* botAI) { return new GuildLeaveAction(botAI); }
|
||||
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); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -200,4 +200,17 @@ bool NaxxChatShortcutAction::Execute(Event event)
|
||||
botAI->ChangeStrategy("+naxx", BOT_STATE_COMBAT);
|
||||
bot->Say("Add Naxx Strategies!", LANG_UNIVERSAL);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool BwlChatShortcutAction::Execute(Event event)
|
||||
{
|
||||
Player* master = GetMaster();
|
||||
if (!master)
|
||||
return false;
|
||||
|
||||
botAI->Reset();
|
||||
botAI->ChangeStrategy("+bwl", BOT_STATE_NON_COMBAT);
|
||||
botAI->ChangeStrategy("+bwl", BOT_STATE_COMBAT);
|
||||
bot->Say("Add Bwl Strategies!", LANG_UNIVERSAL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -80,4 +80,11 @@ class NaxxChatShortcutAction : public Action
|
||||
NaxxChatShortcutAction(PlayerbotAI* ai) : Action(ai, "naxx chat shortcut") {}
|
||||
virtual bool Execute(Event event);
|
||||
};
|
||||
|
||||
class BwlChatShortcutAction : public Action
|
||||
{
|
||||
public:
|
||||
BwlChatShortcutAction(PlayerbotAI* ai) : Action(ai, "bwl chat shortcut") {}
|
||||
virtual bool Execute(Event event);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user