Ported .Net Core commits:
hondacrx: - Initial commit: Switch to .Net Core 2.0 - Fix build and removed not needed files Fabi: - Updated solution platforms. - Changed folder structure. - Change library target framework to netstandard2.0. - Updated solution platforms again... - Removed windows specific kernel32 function usage (Ctrl-C handler).
This commit is contained in:
@@ -0,0 +1,313 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
using Game.PvP;
|
||||
|
||||
namespace Scripts.Outlands
|
||||
{
|
||||
struct Aeranas
|
||||
{
|
||||
public const uint SaySummon = 0;
|
||||
public const uint SayFree = 1;
|
||||
|
||||
public const uint FactionHostile = 16;
|
||||
public const uint FactionFriendly = 35;
|
||||
|
||||
public const uint SpellEncelopingWinds = 15535;
|
||||
public const uint SpellShock = 12553;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_aeranas : ScriptedAI
|
||||
{
|
||||
public npc_aeranas(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
faction_Timer = 8000;
|
||||
envelopingWinds_Timer = 9000;
|
||||
shock_Timer = 5000;
|
||||
|
||||
me.RemoveFlag64(UnitFields.NpcFlags, NPCFlags.QuestGiver);
|
||||
me.SetFaction(Aeranas.FactionFriendly);
|
||||
|
||||
Talk(Aeranas.SaySummon);
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (faction_Timer != 0)
|
||||
{
|
||||
if (faction_Timer <= diff)
|
||||
{
|
||||
me.SetFaction(Aeranas.FactionHostile);
|
||||
faction_Timer = 0;
|
||||
}
|
||||
else
|
||||
faction_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (HealthBelowPct(30))
|
||||
{
|
||||
me.SetFaction(Aeranas.FactionFriendly);
|
||||
me.SetFlag64(UnitFields.NpcFlags, NPCFlags.QuestGiver);
|
||||
me.RemoveAllAuras();
|
||||
me.DeleteThreatList();
|
||||
me.CombatStop(true);
|
||||
Talk(Aeranas.SayFree);
|
||||
return;
|
||||
}
|
||||
|
||||
if (shock_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(Aeranas.SpellShock);
|
||||
shock_Timer = 10000;
|
||||
}
|
||||
else
|
||||
shock_Timer -= diff;
|
||||
|
||||
if (envelopingWinds_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(Aeranas.SpellEncelopingWinds);
|
||||
envelopingWinds_Timer = 25000;
|
||||
}
|
||||
else
|
||||
envelopingWinds_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
uint faction_Timer;
|
||||
uint envelopingWinds_Timer;
|
||||
uint shock_Timer;
|
||||
}
|
||||
|
||||
struct AncestralWolf
|
||||
{
|
||||
public const uint EmoteWoldLiftHead = 0;
|
||||
public const uint EmoteWolfHowl = 1;
|
||||
public const uint SayWolfWelcome = 2;
|
||||
|
||||
public const uint SpellAncestralWoldBuff = 29981;
|
||||
|
||||
public const uint NpcRyga = 17123;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_ancestral_wolf : npc_escortAI
|
||||
{
|
||||
public npc_ancestral_wolf(Creature creature) : base(creature)
|
||||
{
|
||||
if (creature.GetOwner() && creature.GetOwner().IsTypeId(TypeId.Player))
|
||||
Start(false, false, creature.GetOwner().GetGUID());
|
||||
else
|
||||
Log.outError(LogFilter.Scripts, "Scripts: npc_ancestral_wolf can not obtain owner or owner is not a player.");
|
||||
|
||||
creature.SetSpeed(UnitMoveType.Walk, 1.5f);
|
||||
Reset();
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
ryga = null;
|
||||
DoCast(me, AncestralWolf.SpellAncestralWoldBuff, true);
|
||||
}
|
||||
|
||||
public override void MoveInLineOfSight(Unit who)
|
||||
{
|
||||
if (!ryga && who.GetEntry() == AncestralWolf.NpcRyga && me.IsWithinDistInMap(who, 15.0f))
|
||||
{
|
||||
Creature temp = who.ToCreature();
|
||||
if (temp)
|
||||
ryga = temp;
|
||||
}
|
||||
|
||||
base.MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
public override void WaypointReached(uint waypointId)
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
Talk(AncestralWolf.EmoteWoldLiftHead);
|
||||
break;
|
||||
case 2:
|
||||
Talk(AncestralWolf.EmoteWolfHowl);
|
||||
break;
|
||||
case 50:
|
||||
if (ryga && ryga.IsAlive() && !ryga.IsInCombat())
|
||||
ryga.GetAI().Talk(AncestralWolf.SayWolfWelcome);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Creature ryga;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_wounded_blood_elf : npc_escortAI
|
||||
{
|
||||
public npc_wounded_blood_elf(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset() { }
|
||||
|
||||
public override void EnterCombat(Unit who)
|
||||
{
|
||||
if (HasEscortState(eEscortState.Escorting))
|
||||
Talk(SAY_ELF_AGGRO);
|
||||
}
|
||||
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
summoned.GetAI().AttackStart(me);
|
||||
}
|
||||
|
||||
public override void sQuestAccept(Player player, Quest quest)
|
||||
{
|
||||
if (quest.Id == QUEST_ROAD_TO_FALCON_WATCH)
|
||||
{
|
||||
me.SetFaction(FACTION_FALCON_WATCH_QUEST);
|
||||
base.Start(true, false, player.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
public override void WaypointReached(uint waypointId)
|
||||
{
|
||||
Player player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_ELF_START, player);
|
||||
break;
|
||||
case 9:
|
||||
Talk(SAY_ELF_SUMMON1, player);
|
||||
// Spawn two Haal'eshi Talonguard
|
||||
DoSpawnCreature(NPC_HAALESHI_TALONGUARD, -15, -15, 0, 0, TempSummonType.TimedDespawnOOC, 5000);
|
||||
DoSpawnCreature(NPC_HAALESHI_TALONGUARD, -17, -17, 0, 0, TempSummonType.TimedDespawnOOC, 5000);
|
||||
break;
|
||||
case 13:
|
||||
Talk(SAY_ELF_RESTING, player);
|
||||
break;
|
||||
case 14:
|
||||
Talk(SAY_ELF_SUMMON2, player);
|
||||
// Spawn two Haal'eshi Windwalker
|
||||
DoSpawnCreature(NPC_HAALESHI_WINDWALKER, -15, -15, 0, 0, TempSummonType.TimedDespawnOOC, 5000);
|
||||
DoSpawnCreature(NPC_HAALESHI_WINDWALKER, -17, -17, 0, 0, TempSummonType.TimedDespawnOOC, 5000);
|
||||
break;
|
||||
case 27:
|
||||
Talk(SAY_ELF_COMPLETE, player);
|
||||
// Award quest credit
|
||||
player.GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const uint SAY_ELF_START = 0;
|
||||
const uint SAY_ELF_SUMMON1 = 1;
|
||||
const uint SAY_ELF_RESTING = 2;
|
||||
const uint SAY_ELF_SUMMON2 = 3;
|
||||
const uint SAY_ELF_COMPLETE = 4;
|
||||
const uint SAY_ELF_AGGRO = 5;
|
||||
const uint QUEST_ROAD_TO_FALCON_WATCH = 9375;
|
||||
const uint NPC_HAALESHI_WINDWALKER = 16966;
|
||||
const uint NPC_HAALESHI_TALONGUARD = 16967;
|
||||
const uint FACTION_FALCON_WATCH_QUEST = 775;
|
||||
}
|
||||
|
||||
|
||||
[Script]
|
||||
class npc_fel_guard_hound : ScriptedAI
|
||||
{
|
||||
public npc_fel_guard_hound(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
checkTimer = 5000; //check for creature every 5 sec
|
||||
helboarGUID.Clear();
|
||||
}
|
||||
|
||||
public override void MovementInform(MovementGeneratorType type, uint id)
|
||||
{
|
||||
if (type != MovementGeneratorType.Point || id != 1)
|
||||
return;
|
||||
|
||||
Creature helboar = me.GetMap().GetCreature(helboarGUID);
|
||||
if (helboar)
|
||||
{
|
||||
helboar.RemoveCorpse();
|
||||
DoCast(SPELL_SUMMON_POO);
|
||||
|
||||
Player owner = me.GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
if (owner)
|
||||
me.GetMotionMaster().MoveFollow(owner, 0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (checkTimer <= diff)
|
||||
{
|
||||
Creature helboar = me.FindNearestCreature(NPC_DERANGED_HELBOAR, 10.0f, false);
|
||||
if (helboar)
|
||||
{
|
||||
if (helboar.GetGUID() != helboarGUID && me.GetMotionMaster().GetCurrentMovementGeneratorType() != MovementGeneratorType.Point && !me.FindCurrentSpellBySpellId(SPELL_SUMMON_POO))
|
||||
{
|
||||
helboarGUID = helboar.GetGUID();
|
||||
me.GetMotionMaster().MovePoint(1, helboar.GetPositionX(), helboar.GetPositionY(), helboar.GetPositionZ());
|
||||
}
|
||||
}
|
||||
checkTimer = 5000;
|
||||
}
|
||||
else checkTimer -= diff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
uint checkTimer;
|
||||
ObjectGuid helboarGUID;
|
||||
|
||||
const uint SPELL_SUMMON_POO = 37688;
|
||||
const uint NPC_DERANGED_HELBOAR = 16863;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class HellfirePeninsulaPvPScript : OutdoorPvPScript
|
||||
{
|
||||
public HellfirePeninsulaPvPScript() : base("outdoorpvp_hp") { }
|
||||
|
||||
public override OutdoorPvP GetOutdoorPvP()
|
||||
{
|
||||
return new HellfirePeninsulaPvP();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2017 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game;
|
||||
using Game.AI;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Scripts.Outlands
|
||||
{
|
||||
[Script]
|
||||
class npcs_ashyen_and_keleth : CreatureScript
|
||||
{
|
||||
public npcs_ashyen_and_keleth() : base("npcs_ashyen_and_keleth") { }
|
||||
|
||||
public override bool OnGossipHello(Player player, Creature creature)
|
||||
{
|
||||
if (player.GetReputationRank(942) > ReputationRank.Neutral)
|
||||
{
|
||||
if (creature.GetEntry() == NPC_ASHYEN)
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, GOSSIP_ITEM_BLESS_ASH, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
|
||||
if (creature.GetEntry() == NPC_KELETH)
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, GOSSIP_ITEM_BLESS_KEL, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
}
|
||||
player.SEND_GOSSIP_MENU(player.GetGossipTextId(creature), creature.GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnGossipSelect(Player player, Creature creature, uint sender, uint action)
|
||||
{
|
||||
player.PlayerTalkClass.ClearMenus();
|
||||
if (action == eTradeskill.GossipActionInfoDef + 1)
|
||||
{
|
||||
creature.setPowerType(PowerType.Mana);
|
||||
creature.SetMaxPower(PowerType.Mana, 200); //set a "fake" mana value, we can't depend on database doing it in this case
|
||||
creature.SetPower(PowerType.Mana, 200);
|
||||
|
||||
if (creature.GetEntry() == NPC_ASHYEN) //check which Creature we are dealing with
|
||||
{
|
||||
uint spell = 0;
|
||||
switch (player.GetReputationRank(942))
|
||||
{ //mark of lore
|
||||
case ReputationRank.Friendly:
|
||||
spell = SPELL_BLESS_ASH_FRI;
|
||||
break;
|
||||
case ReputationRank.Honored:
|
||||
spell = SPELL_BLESS_ASH_HON;
|
||||
break;
|
||||
case ReputationRank.Revered:
|
||||
spell = SPELL_BLESS_ASH_REV;
|
||||
break;
|
||||
case ReputationRank.Exalted:
|
||||
spell = SPELL_BLESS_ASH_EXA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (spell != 0)
|
||||
{
|
||||
creature.CastSpell(player, spell, true);
|
||||
creature.GetAI().Talk(GOSSIP_REWARD_BLESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (creature.GetEntry() == NPC_KELETH)
|
||||
{
|
||||
uint spell = 0;
|
||||
switch (player.GetReputationRank(942)) //mark of war
|
||||
{
|
||||
case ReputationRank.Friendly:
|
||||
spell = SPELL_BLESS_KEL_FRI;
|
||||
break;
|
||||
case ReputationRank.Honored:
|
||||
spell = SPELL_BLESS_KEL_HON;
|
||||
break;
|
||||
case ReputationRank.Revered:
|
||||
spell = SPELL_BLESS_KEL_REV;
|
||||
break;
|
||||
case ReputationRank.Exalted:
|
||||
spell = SPELL_BLESS_KEL_EXA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (spell != 0)
|
||||
{
|
||||
creature.CastSpell(player, spell, true);
|
||||
creature.GetAI().Talk(GOSSIP_REWARD_BLESS);
|
||||
}
|
||||
}
|
||||
player.CLOSE_GOSSIP_MENU();
|
||||
player.TalkedToCreature(creature.GetEntry(), creature.GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const uint GOSSIP_REWARD_BLESS = 0;
|
||||
|
||||
const uint NPC_ASHYEN = 17900;
|
||||
const uint NPC_KELETH = 17901;
|
||||
|
||||
const uint SPELL_BLESS_ASH_EXA = 31815;
|
||||
const uint SPELL_BLESS_ASH_REV = 31811;
|
||||
const uint SPELL_BLESS_ASH_HON = 31810;
|
||||
const uint SPELL_BLESS_ASH_FRI = 31808;
|
||||
|
||||
const uint SPELL_BLESS_KEL_EXA = 31814;
|
||||
const uint SPELL_BLESS_KEL_REV = 31813;
|
||||
const uint SPELL_BLESS_KEL_HON = 31812;
|
||||
const uint SPELL_BLESS_KEL_FRI = 31807;
|
||||
|
||||
const string GOSSIP_ITEM_BLESS_ASH = "Grant me your mark, wise ancient.";
|
||||
const string GOSSIP_ITEM_BLESS_KEL = "Grant me your mark, mighty ancient.";
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_cooshcoosh : CreatureScript
|
||||
{
|
||||
public npc_cooshcoosh() : base("npc_cooshcoosh") { }
|
||||
|
||||
class npc_cooshcooshAI : ScriptedAI
|
||||
{
|
||||
public npc_cooshcooshAI(Creature creature) : base(creature)
|
||||
{
|
||||
m_uiNormFaction = creature.getFaction();
|
||||
}
|
||||
|
||||
uint m_uiNormFaction;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_events.ScheduleEvent(Event_LightningBolt, 2000);
|
||||
if (me.getFaction() != m_uiNormFaction)
|
||||
me.SetFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
public override void EnterCombat(Unit who) { }
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
_events.ExecuteEvents(id =>
|
||||
{
|
||||
DoCastVictim(SPELL_LIGHTNING_BOLT);
|
||||
_events.ScheduleEvent(Event_LightningBolt, 5000);
|
||||
});
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return new npc_cooshcooshAI(creature);
|
||||
}
|
||||
|
||||
public override bool OnGossipHello(Player player, Creature creature)
|
||||
{
|
||||
if (player.GetQuestStatus(QUEST_CRACK_SKULLS) == QuestStatus.Incomplete)
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, GOSSIP_COOSH, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef);
|
||||
|
||||
player.SEND_GOSSIP_MENU(9441, creature.GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnGossipSelect(Player player, Creature creature, uint sender, uint action)
|
||||
{
|
||||
player.PlayerTalkClass.ClearMenus();
|
||||
if (action == eTradeskill.GossipActionInfoDef)
|
||||
{
|
||||
player.CLOSE_GOSSIP_MENU();
|
||||
creature.SetFaction(FACTION_HOSTILE_CO);
|
||||
creature.GetAI().AttackStart(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const uint SPELL_LIGHTNING_BOLT = 9532;
|
||||
const uint QUEST_CRACK_SKULLS = 10009;
|
||||
const uint FACTION_HOSTILE_CO = 45;
|
||||
const int Event_LightningBolt = 1;
|
||||
|
||||
const string GOSSIP_COOSH = "You owe Sim'salabim money. Hand them over or die!";
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_elder_kuruti : CreatureScript
|
||||
{
|
||||
public npc_elder_kuruti() : base("npc_elder_kuruti") { }
|
||||
|
||||
public override bool OnGossipHello(Player player, Creature creature)
|
||||
{
|
||||
if (player.GetQuestStatus(9803) == QuestStatus.Incomplete)
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, GOSSIP_ITEM_KUR1, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef);
|
||||
|
||||
player.SEND_GOSSIP_MENU(9226, creature.GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnGossipSelect(Player player, Creature creature, uint sender, uint action)
|
||||
{
|
||||
player.PlayerTalkClass.ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case eTradeskill.GossipActionInfoDef:
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, GOSSIP_ITEM_KUR2, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
player.SEND_GOSSIP_MENU(9227, creature.GetGUID());
|
||||
break;
|
||||
case eTradeskill.GossipActionInfoDef + 1:
|
||||
player.ADD_GOSSIP_ITEM(GossipOptionIcon.Chat, GOSSIP_ITEM_KUR3, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 2);
|
||||
player.SEND_GOSSIP_MENU(9229, creature.GetGUID());
|
||||
break;
|
||||
case eTradeskill.GossipActionInfoDef + 2:
|
||||
{
|
||||
if (!player.HasItemCount(24573))
|
||||
{
|
||||
List<ItemPosCount> dest = new List<ItemPosCount>();
|
||||
uint itemId = 24573;
|
||||
uint temp;
|
||||
InventoryResult msg = player.CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, itemId, 1, out temp);
|
||||
if (msg == InventoryResult.Ok)
|
||||
{
|
||||
player.StoreNewItem(dest, itemId, true);
|
||||
}
|
||||
else
|
||||
player.SendEquipError(msg, null, null, itemId);
|
||||
}
|
||||
player.SEND_GOSSIP_MENU(9231, creature.GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const string GOSSIP_ITEM_KUR1 = "Greetings, elder. It is time for your people to end their hostility towards the draenei and their allies.";
|
||||
const string GOSSIP_ITEM_KUR2 = "I did not mean to deceive you, elder. The draenei of Telredor thought to approach you in a way that would seem familiar to you.";
|
||||
const string GOSSIP_ITEM_KUR3 = "I will tell them. Farewell, elder.";
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_kayra_longmane : CreatureScript
|
||||
{
|
||||
public npc_kayra_longmane() : base("npc_kayra_longmane") { }
|
||||
|
||||
class npc_kayra_longmaneAI : npc_escortAI
|
||||
{
|
||||
public npc_kayra_longmaneAI(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset() { }
|
||||
|
||||
public override void WaypointReached(uint waypointId)
|
||||
{
|
||||
Player player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
Talk(SAY_AMBUSH1, player);
|
||||
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TempSummonType.TimedDespawnOOC, 30000);
|
||||
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TempSummonType.TimedDespawnOOC, 30000);
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_PROGRESS, player);
|
||||
SetRun();
|
||||
break;
|
||||
case 16:
|
||||
Talk(SAY_AMBUSH2, player);
|
||||
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TempSummonType.TimedDespawnOOC, 30000);
|
||||
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TempSummonType.TimedDespawnOOC, 30000);
|
||||
break;
|
||||
case 17:
|
||||
SetRun(false);
|
||||
break;
|
||||
case 25:
|
||||
Talk(SAY_END, player);
|
||||
player.GroupEventHappens(QUEST_ESCAPE_FROM, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnQuestAccept(Player player, Creature creature, Quest quest)
|
||||
{
|
||||
if (quest.Id == QUEST_ESCAPE_FROM)
|
||||
{
|
||||
creature.GetAI().Talk(SAY_START, player);
|
||||
|
||||
npc_escortAI pEscortAI = (npc_kayra_longmaneAI)creature.GetAI();
|
||||
if (pEscortAI != null)
|
||||
pEscortAI.Start(false, false, player.GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return new npc_kayra_longmaneAI(creature);
|
||||
}
|
||||
|
||||
const uint SAY_START = 0;
|
||||
const uint SAY_AMBUSH1 = 1;
|
||||
const uint SAY_PROGRESS = 2;
|
||||
const uint SAY_AMBUSH2 = 3;
|
||||
const uint SAY_END = 4;
|
||||
|
||||
const uint QUEST_ESCAPE_FROM = 9752;
|
||||
const uint NPC_SLAVEBINDER = 18042;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user