More Scripts done.

This commit is contained in:
hondacrx
2023-10-16 12:35:26 -04:00
parent 73fd633065
commit c56e1752f5
11 changed files with 959 additions and 2345 deletions
@@ -0,0 +1,47 @@
// 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 Framework.Constants;
using Game;
using Game.Entities;
using Game.Scripting;
namespace Scripts.Draenor.ZoneAssaultOnTheDarkPortal
{
struct SpellIds
{
public const uint DarkPortalRunAway = 158985;
}
[Script] // 621 - Dark Portal: Run away
class scene_dark_portal_run_away : SceneScript
{
public scene_dark_portal_run_away() : base("scene_dark_portal_run_away") { }
public override void OnSceneComplete(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
{
player.RemoveAurasDueToSpell(SpellIds.DarkPortalRunAway);
PhasingHandler.OnConditionChange(player);
}
}
[Script] // 34420 - The Cost of War
class quest_the_cost_of_war : QuestScript
{
public quest_the_cost_of_war() : base("quest_the_cost_of_war") { }
public override void OnQuestStatusChange(Player player, Quest quest, QuestStatus oldStatus, QuestStatus newStatus)
{
if (newStatus == QuestStatus.None)
{
player.RemoveAurasDueToSpell(SpellIds.DarkPortalRunAway);
PhasingHandler.OnConditionChange(player);
}
else if (newStatus == QuestStatus.Incomplete)
{
player.CastSpell(player, SpellIds.DarkPortalRunAway, TriggerCastFlags.FullMask);
PhasingHandler.OnConditionChange(player);
}
}
}
}
@@ -1,13 +1,12 @@
// 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 Framework.Constants;
using Game;
using Game.AI;
using Game.Entities;
using Game.Scripting;
namespace Scripts.Draenor
namespace Scripts.Draenor.ZoneDraenorShadowmoonValley
{
// 79243 - Baros Alexston
struct MiscConst
@@ -25,13 +24,14 @@ namespace Scripts.Draenor
public const uint SpellQuest34586Killcredit = 161033;
public const uint SpellCreateGarrisonShadowmoonValleyAlliance = 156020;
public const uint SpellDespawnAllSummonsGarrisonIntroOnly = 160938;
public static Position GarrisonLevelOneCreationPlayerPosition = new Position(1904.58f, 312.906f, 88.9542f, 4.303615f);
}
[Script]
class npc_baros_alexston : ScriptedAI
{
Position GarrisonLevelOneCreationPlayerPosition = new(1904.58f, 312.906f, 88.9542f, 4.303615f);
public npc_baros_alexston(Creature creature) : base(creature) { }
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
@@ -42,7 +42,7 @@ namespace Scripts.Draenor
player.CastSpell(player, MiscConst.SpellQuest34586Killcredit, true);
player.CastSpell(player, MiscConst.SpellCreateGarrisonShadowmoonValleyAlliance, true);
player.CastSpell(player, MiscConst.SpellDespawnAllSummonsGarrisonIntroOnly, true);
player.NearTeleportTo(MiscConst.GarrisonLevelOneCreationPlayerPosition);
player.NearTeleportTo(GarrisonLevelOneCreationPlayerPosition);
PhasingHandler.OnConditionChange(player);
}