Core/AI: Implemented conversation ai

Port From (https://github.com/TrinityCore/TrinityCore/commit/309ba22a15e5e0b4321b99f7157ccb18e0adc8dd)
This commit is contained in:
Hondacrx
2025-05-19 17:23:36 -04:00
parent 4f63e81373
commit e44861a629
10 changed files with 160 additions and 126 deletions
+5 -5
View File
@@ -1,28 +1,28 @@
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
using Game.AI;
using Game.Entities;
using Game.Scripting;
namespace Scripts.World.Conversations
{
class conversation_allied_race_dk_defender_of_azeroth : ConversationScript
class conversation_allied_race_dk_defender_of_azeroth : ConversationAI
{
const uint NpcTalkToYourCommanderCredit = 161709;
const uint NpcListenToYourCommanderCredit = 163027;
const uint ConversationLinePlayer = 32926;
public conversation_allied_race_dk_defender_of_azeroth() : base("conversation_allied_race_dk_defender_of_azeroth") { }
public conversation_allied_race_dk_defender_of_azeroth(Conversation conversation) : base(conversation) { }
public override void OnConversationCreate(Conversation conversation, Unit creator)
public override void OnCreate(Unit creator)
{
Player player = creator.ToPlayer();
if (player != null)
player.KilledMonsterCredit(NpcTalkToYourCommanderCredit);
}
public override void OnConversationLineStarted(Conversation conversation, uint lineId, Player sender)
public override void OnLineStarted(uint lineId, Player sender)
{
if (lineId != ConversationLinePlayer)
return;