aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/conversation_scripts.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/server/scripts/World/conversation_scripts.cpp b/src/server/scripts/World/conversation_scripts.cpp
index 9d237f0502f..6d5de609e63 100644
--- a/src/server/scripts/World/conversation_scripts.cpp
+++ b/src/server/scripts/World/conversation_scripts.cpp
@@ -15,6 +15,41 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "ScriptMgr.h"
+#include "Conversation.h"
+#include "ObjectAccessor.h"
+#include "Player.h"
+
+class conversation_allied_race_dk_defender_of_azeroth : public ConversationScript
+{
+public:
+ enum DefenderOfAzerothIds : uint32
+ {
+ NPC_TALK_TO_YOUR_COMMANDER_CREDIT = 161709,
+ NPC_LISTEN_TO_YOUR_COMMANDER_CREDIT = 163027,
+
+ CONVERSATION_LINE_PLAYER = 32926
+ };
+
+ conversation_allied_race_dk_defender_of_azeroth() : ConversationScript("conversation_allied_race_dk_defender_of_azeroth") { }
+
+ void OnConversationCreate(Conversation* conversation, Unit* creator) override
+ {
+ conversation->AddActor(ObjectGuid::Create<HighGuid::Player>(0xFFFFFFFFFFFFFFFF), 1);
+ if (Player* player = creator->ToPlayer())
+ player->KilledMonsterCredit(NPC_TALK_TO_YOUR_COMMANDER_CREDIT);
+ }
+
+ void OnConversationLineStarted(Conversation* /*conversation*/, uint32 lineId, Player* sender) override
+ {
+ if (lineId != CONVERSATION_LINE_PLAYER)
+ return;
+
+ sender->KilledMonsterCredit(NPC_LISTEN_TO_YOUR_COMMANDER_CREDIT);
+ }
+};
+
void AddSC_conversation_scripts()
{
+ new conversation_allied_race_dk_defender_of_azeroth();
}