From 67f083f1262e6422c8f01375458aa23910362a1b Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 29 May 2023 23:41:35 +0800 Subject: [PATCH] drink command --- src/strategy/generic/ChatCommandHandlerStrategy.cpp | 1 + src/strategy/triggers/ChatTriggerContext.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/strategy/generic/ChatCommandHandlerStrategy.cpp b/src/strategy/generic/ChatCommandHandlerStrategy.cpp index 444d898b..52face18 100644 --- a/src/strategy/generic/ChatCommandHandlerStrategy.cpp +++ b/src/strategy/generic/ChatCommandHandlerStrategy.cpp @@ -124,4 +124,5 @@ ChatCommandHandlerStrategy::ChatCommandHandlerStrategy(PlayerbotAI* botAI) : Pas supported.push_back("guild remove"); supported.push_back("guild leave"); supported.push_back("rtsc"); + supported.push_back("drink"); } diff --git a/src/strategy/triggers/ChatTriggerContext.h b/src/strategy/triggers/ChatTriggerContext.h index 12c192f1..ae993887 100644 --- a/src/strategy/triggers/ChatTriggerContext.h +++ b/src/strategy/triggers/ChatTriggerContext.h @@ -111,6 +111,7 @@ class ChatTriggerContext : public NamedObjectContext creators["guild remove"] = &ChatTriggerContext::guild_remove; creators["guild leave"] = &ChatTriggerContext::guild_leave; creators["rtsc"] = &ChatTriggerContext::rtsc; + creators["drink"] = &ChatTriggerContext::drink; } private: @@ -202,6 +203,7 @@ class ChatTriggerContext : public NamedObjectContext static Trigger* guild_remove(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "guild remove"); } static Trigger* guild_leave(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "guild leave"); } static Trigger* rtsc(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "rtsc"); } + static Trigger* drink(PlayerbotAI* ai) { return new ChatCommandTrigger(ai, "drink"); } }; #endif