Core/Scripts: unified scripted gossip/quest api
Port From (https://github.com/TrinityCore/TrinityCore/commit/6604849716bc73d82a4cdbf8c66bb188086ceae4)
This commit is contained in:
@@ -955,7 +955,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
}
|
||||
}
|
||||
|
||||
public override void GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
{
|
||||
me.RemoveNpcFlag(NPCFlags.Gossip);
|
||||
me.GetTransport().EnableMovement(true);
|
||||
@@ -965,6 +965,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
_events.ScheduleEvent(GunshipEvents.IntroSummonSkybreaker, 24600, 0, GunshipMiscData.PhaseIntro);
|
||||
_events.ScheduleEvent(GunshipEvents.IntroH3, 29600, 0, GunshipMiscData.PhaseIntro);
|
||||
_events.ScheduleEvent(GunshipEvents.IntroH4, 39200, 0, GunshipMiscData.PhaseIntro);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit u, ref uint damage)
|
||||
@@ -1200,7 +1201,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
}
|
||||
}
|
||||
|
||||
public override void GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
{
|
||||
me.RemoveNpcFlag(NPCFlags.Gossip);
|
||||
me.GetTransport().EnableMovement(true);
|
||||
@@ -1211,6 +1212,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
_events.ScheduleEvent(GunshipEvents.IntroA3, 33000, 0, GunshipMiscData.PhaseIntro);
|
||||
_events.ScheduleEvent(GunshipEvents.IntroA4, 39000, 0, GunshipMiscData.PhaseIntro);
|
||||
_events.ScheduleEvent(GunshipEvents.IntroA5, 45000, 0, GunshipMiscData.PhaseIntro);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void DamageTaken(Unit u, ref uint damage)
|
||||
@@ -1358,10 +1360,11 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
me.SetReactState(ReactStates.Passive);
|
||||
}
|
||||
|
||||
public override void GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
{
|
||||
player.AddItem(GunshipMiscData.ItemGoblinRocketPack, 1);
|
||||
player.PlayerTalkClass.SendCloseGossip();
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void UpdateAI(uint diff)
|
||||
|
||||
@@ -441,12 +441,22 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
{
|
||||
public npc_alchemist_adrianna() : base("npc_alchemist_adrianna") { }
|
||||
|
||||
public override bool OnGossipHello(Player player, Creature creature)
|
||||
class npc_alchemist_adriannaAI : ScriptedAI
|
||||
{
|
||||
if (!creature.FindCurrentSpellBySpellId(InstanceSpells.HarvestBlightSpecimen) && !creature.FindCurrentSpellBySpellId(InstanceSpells.HarvestBlightSpecimen25))
|
||||
if (player.HasAura(InstanceSpells.OrangeBlightResidue) && player.HasAura(InstanceSpells.GreenBlightResidue))
|
||||
creature.CastSpell(creature, InstanceSpells.HarvestBlightSpecimen, false);
|
||||
return false;
|
||||
public npc_alchemist_adriannaAI(Creature creature) : base(creature) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
if (!me.FindCurrentSpellBySpellId(InstanceSpells.HarvestBlightSpecimen) && !me.FindCurrentSpellBySpellId(InstanceSpells.HarvestBlightSpecimen25))
|
||||
if (player.HasAura(InstanceSpells.OrangeBlightResidue) && player.HasAura(InstanceSpells.GreenBlightResidue))
|
||||
DoCastSelf(InstanceSpells.HarvestBlightSpecimen, false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override CreatureAI GetAI(Creature creature)
|
||||
{
|
||||
return new npc_alchemist_adriannaAI(creature);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user