diff options
| author | ModoX <moardox@gmail.com> | 2024-12-28 23:25:10 +0100 |
|---|---|---|
| committer | Ovahlord <dreadkiller@gmx.de> | 2024-12-29 12:16:46 +0100 |
| commit | 1f81c961f24337abdc8de25bd23d9834d0c7392b (patch) | |
| tree | 46b4699d0b3ffbc4b197913064659abd978d1ed3 /src/server/scripts/World | |
| parent | 9b49b9009d010b56b0289e8122bedceb172e4948 (diff) | |
Core/AI: Implemented conversation ai (#30538)
(cherry picked from commit 309ba22a15e5e0b4321b99f7157ccb18e0adc8dd)
# Conflicts:
# src/server/scripts/BrokenIsles/zone_mardum.cpp
# src/server/scripts/DragonIsles/AberrusTheShadowedCrucible/aberrus_the_shadowed_crucible.cpp
# src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
# src/server/scripts/KulTiras/WaycrestManor/waycrest_manor.cpp
# src/server/scripts/KulTiras/zone_boralus.cpp
# src/server/scripts/Shadowlands/SanctumOfDomination/boss_sylvanas_windrunner.cpp
# src/server/scripts/Shadowlands/SepulcherOfTheFirstOnes/boss_anduin_wrynn.cpp
# src/server/scripts/Zandalar/KingsRest/kings_rest.cpp
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/conversation_scripts.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/scripts/World/conversation_scripts.cpp b/src/server/scripts/World/conversation_scripts.cpp index 507da020e79..f1a442c40b7 100644 --- a/src/server/scripts/World/conversation_scripts.cpp +++ b/src/server/scripts/World/conversation_scripts.cpp @@ -17,9 +17,10 @@ #include "ScriptMgr.h" #include "Conversation.h" +#include "ConversationAI.h" #include "Player.h" -class conversation_allied_race_dk_defender_of_azeroth : public ConversationScript +class conversation_allied_race_dk_defender_of_azeroth : public ConversationAI { public: enum DefenderOfAzerothIds : uint32 @@ -30,15 +31,15 @@ public: CONVERSATION_LINE_PLAYER = 32926 }; - conversation_allied_race_dk_defender_of_azeroth() : ConversationScript("conversation_allied_race_dk_defender_of_azeroth") { } + conversation_allied_race_dk_defender_of_azeroth(Conversation* conversation) : ConversationAI(conversation) { } - void OnConversationCreate(Conversation* /*conversation*/, Unit* creator) override + void OnCreate(Unit* creator) override { if (Player* player = creator->ToPlayer()) player->KilledMonsterCredit(NPC_TALK_TO_YOUR_COMMANDER_CREDIT); } - void OnConversationLineStarted(Conversation* /*conversation*/, uint32 lineId, Player* sender) override + void OnLineStarted(uint32 lineId, Player* sender) override { if (lineId != CONVERSATION_LINE_PLAYER) return; @@ -49,5 +50,5 @@ public: void AddSC_conversation_scripts() { - new conversation_allied_race_dk_defender_of_azeroth(); + RegisterConversationAI(conversation_allied_race_dk_defender_of_azeroth); } |
