Core/AI: Implemented conversation ai
Port From (https://github.com/TrinityCore/TrinityCore/commit/309ba22a15e5e0b4321b99f7157ccb18e0adc8dd)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user