Misc fixes
This commit is contained in:
@@ -44,53 +44,6 @@ namespace Scripts.Pets
|
||||
public const uint SaySoulTraderInto = 0;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_pet_gen_mojo : ScriptedAI
|
||||
{
|
||||
public npc_pet_gen_mojo(Creature creature) : base(creature) { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
_victimGUID.Clear();
|
||||
|
||||
Unit owner = me.GetOwner();
|
||||
if (owner)
|
||||
me.GetMotionMaster().MoveFollow(owner, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
public override void JustEngagedWith(Unit who) { }
|
||||
|
||||
public override void UpdateAI(uint diff) { }
|
||||
|
||||
public override void ReceiveEmote(Player player, TextEmotes emote)
|
||||
{
|
||||
me.HandleEmoteCommand((Emote)emote);
|
||||
Unit owner = me.GetOwner();
|
||||
if (emote != TextEmotes.Kiss || !owner || !owner.IsTypeId(TypeId.Player) ||
|
||||
owner.ToPlayer().GetTeam() != player.GetTeam())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Talk(TextIds.SayMojo, player);
|
||||
|
||||
if (!_victimGUID.IsEmpty())
|
||||
{
|
||||
Player victim = Global.ObjAccessor.GetPlayer(me, _victimGUID);
|
||||
if (victim)
|
||||
victim.RemoveAura(SpellIds.FeelingFroggy);
|
||||
}
|
||||
|
||||
_victimGUID = player.GetGUID();
|
||||
|
||||
DoCast(player, SpellIds.FeelingFroggy, new Game.Spells.CastSpellExtraArgs(true));
|
||||
DoCast(me, SpellIds.SeductionVisual, new Game.Spells.CastSpellExtraArgs(true));
|
||||
me.GetMotionMaster().MoveFollow(player, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
ObjectGuid _victimGUID;
|
||||
}
|
||||
|
||||
[Script]
|
||||
class npc_pet_gen_soul_trader : ScriptedAI
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Scripts.World.EmeraldDragons
|
||||
|
||||
_scheduler.Update(diff);
|
||||
|
||||
Unit target = SelectTarget(SelectAggroTarget.MaxThreat, 0, -50.0f, true);
|
||||
Unit target = SelectTarget(SelectTargetMethod.MaxThreat, 0, -50.0f, true);
|
||||
if (target)
|
||||
DoCast(target, SpellIds.SummonPlayer);
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace Scripts.World.EmeraldDragons
|
||||
if (_roamTimer == 0)
|
||||
{
|
||||
// Chase target, but don't attack - otherwise just roam around
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true);
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
{
|
||||
_roamTimer = RandomHelper.URand(15000, 30000);
|
||||
|
||||
@@ -65,9 +65,6 @@ namespace Scripts.World.GameObjects
|
||||
public const uint SummonBladeKnightOrc = 56212;
|
||||
public const uint SummonBladeKnightTroll = 56214;
|
||||
|
||||
//Inconspicuouslandmark
|
||||
public const uint SummonPiratesTreasureAndTriggerMob = 11462;
|
||||
|
||||
//Amberpineouthouse
|
||||
public const uint Indisposed = 53017;
|
||||
public const uint IndisposedIii = 48341;
|
||||
@@ -111,11 +108,6 @@ namespace Scripts.World.GameObjects
|
||||
//Sacredfireoflife
|
||||
public const uint Arikara = 10882;
|
||||
|
||||
//Shrineofthebirds
|
||||
public const uint HawkGuard = 22992;
|
||||
public const uint EagleGuard = 22993;
|
||||
public const uint FalconGuard = 22994;
|
||||
|
||||
//Southfury
|
||||
public const uint Rizzle = 23002;
|
||||
|
||||
@@ -131,13 +123,6 @@ namespace Scripts.World.GameObjects
|
||||
public const uint EbonBladePrisonerTroll = 30196;
|
||||
public const uint EbonBladePrisonerOrc = 30195;
|
||||
|
||||
//Prisonersofwyrmskull
|
||||
public const uint PrisonerPriest = 24086;
|
||||
public const uint PrisonerMage = 24088;
|
||||
public const uint PrisonerWarrior = 24089;
|
||||
public const uint PrisonerPaladin = 24090;
|
||||
public const uint CapturedValgardePrisonerProxy = 24124;
|
||||
|
||||
//Tadpoles
|
||||
public const uint WinterfinTadpole = 25201;
|
||||
|
||||
@@ -156,11 +141,6 @@ namespace Scripts.World.GameObjects
|
||||
|
||||
struct GameObjectIds
|
||||
{
|
||||
//Shrineofthebirds
|
||||
public const uint ShrineHawk = 185551;
|
||||
public const uint ShrineEagle = 185547;
|
||||
public const uint ShrineFalcon = 185553;
|
||||
|
||||
//Bellhourlyobjects
|
||||
public const uint HordeBell = 175885;
|
||||
public const uint AllianceBell = 176573;
|
||||
@@ -180,9 +160,6 @@ namespace Scripts.World.GameObjects
|
||||
public const uint MatrixPunchograph3005C = 142476;
|
||||
public const uint MatrixPunchograph3005D = 142696;
|
||||
|
||||
//Inconspicuouslandmark
|
||||
public const uint CuergosKey = 9275;
|
||||
|
||||
//Amberpineouthouse
|
||||
public const uint AnderholsSliderCider = 37247;
|
||||
}
|
||||
@@ -202,9 +179,6 @@ namespace Scripts.World.GameObjects
|
||||
//Tabletheka
|
||||
public const uint SpiderGold = 2936;
|
||||
|
||||
//Prisonersofwyrmskull
|
||||
public const uint PrisonersOfWyrmskull = 11255;
|
||||
|
||||
//Tadpoles
|
||||
public const uint OhNoesTheTadpoles = 11560;
|
||||
|
||||
@@ -348,20 +322,6 @@ namespace Scripts.World.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_tablet_of_madness : GameObjectAI
|
||||
{
|
||||
public go_tablet_of_madness(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
if (player.HasSkill(SkillType.Alchemy) && player.GetSkillValue(SkillType.Alchemy) >= 300 && !player.HasSpell(24266))
|
||||
player.CastSpell(player, 24267, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_tablet_of_the_seven : GameObjectAI
|
||||
{
|
||||
@@ -380,20 +340,6 @@ namespace Scripts.World.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_jump_a_tron : GameObjectAI
|
||||
{
|
||||
public go_jump_a_tron(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
if (player.GetQuestStatus(10111) == QuestStatus.Incomplete)
|
||||
player.CastSpell(player, 33382, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_ethereum_prison : GameObjectAI
|
||||
{
|
||||
@@ -478,37 +424,6 @@ namespace Scripts.World.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_shrine_of_the_birds : GameObjectAI
|
||||
{
|
||||
public go_shrine_of_the_birds(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
uint birdEntryId = 0;
|
||||
|
||||
me.GetClosePoint(out float fX, out float fY, out float fZ, me.GetCombatReach(), SharedConst.InteractionDistance);
|
||||
|
||||
switch (me.GetEntry())
|
||||
{
|
||||
case GameObjectIds.ShrineHawk:
|
||||
birdEntryId = CreatureIds.HawkGuard;
|
||||
break;
|
||||
case GameObjectIds.ShrineEagle:
|
||||
birdEntryId = CreatureIds.EagleGuard;
|
||||
break;
|
||||
case GameObjectIds.ShrineFalcon:
|
||||
birdEntryId = CreatureIds.FalconGuard;
|
||||
break;
|
||||
}
|
||||
|
||||
if (birdEntryId != 0)
|
||||
player.SummonCreature(birdEntryId, fX, fY, fZ, me.GetOrientation(), TempSummonType.TimedDespawnOutOfCombat, 60000);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_southfury_moonstone : GameObjectAI
|
||||
{
|
||||
@@ -556,94 +471,6 @@ namespace Scripts.World.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_fel_crystalforge : GameObjectAI
|
||||
{
|
||||
public go_fel_crystalforge(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
if (me.GetGoType() == GameObjectTypes.QuestGiver) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
|
||||
player.PrepareQuestMenu(me.GetGUID()); /* return true*/
|
||||
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipFelCrystalforgeItem1, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipFelCrystalforgeItem5, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
|
||||
player.SendGossipMenu(GossipConst.GossipFelCrystalforgeText, me.GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
{
|
||||
uint action = player.PlayerTalkClass.GetGossipOptionAction(gossipListId);
|
||||
player.ClearGossipMenu();
|
||||
switch (action)
|
||||
{
|
||||
case eTradeskill.GossipActionInfoDef:
|
||||
player.CastSpell(player, SpellIds.Create1FlaskOfBeast, false);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipFelCrystalforgeItemReturn, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 2);
|
||||
player.SendGossipMenu(GossipConst.GossipFelCrystalforgeItemTextReturn, me.GetGUID());
|
||||
break;
|
||||
case eTradeskill.GossipActionInfoDef + 1:
|
||||
player.CastSpell(player, SpellIds.Create5FlaskOfBeast, false);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipFelCrystalforgeItemReturn, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 2);
|
||||
player.SendGossipMenu(GossipConst.GossipFelCrystalforgeItemTextReturn, me.GetGUID());
|
||||
break;
|
||||
case eTradeskill.GossipActionInfoDef + 2:
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipFelCrystalforgeItem1, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipFelCrystalforgeItem5, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
player.SendGossipMenu(GossipConst.GossipFelCrystalforgeText, me.GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_bashir_crystalforge : GameObjectAI
|
||||
{
|
||||
public go_bashir_crystalforge(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
if (me.GetGoType() == GameObjectTypes.QuestGiver) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
|
||||
player.PrepareQuestMenu(me.GetGUID()); /* return true*/
|
||||
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipBashirCrystalforgeItem1, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipBashirCrystalforgeItem5, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
|
||||
player.SendGossipMenu(GossipConst.GossipBashirCrystalforgeText, me.GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
||||
{
|
||||
uint action = player.PlayerTalkClass.GetGossipOptionAction(gossipListId);
|
||||
player.ClearGossipMenu();
|
||||
switch (action)
|
||||
{
|
||||
case eTradeskill.GossipActionInfoDef:
|
||||
player.CastSpell(player, SpellIds.Create1FlaskOfSorcerer, false);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipBashirCrystalforgeItemReturn, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 2);
|
||||
player.SendGossipMenu(GossipConst.GossipBashirCrystalforgeItemTextReturn, me.GetGUID());
|
||||
break;
|
||||
case eTradeskill.GossipActionInfoDef + 1:
|
||||
player.CastSpell(player, SpellIds.Create5FlaskOfSorcerer, false);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipBashirCrystalforgeItemReturn, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 2);
|
||||
player.SendGossipMenu(GossipConst.GossipBashirCrystalforgeItemTextReturn, me.GetGUID());
|
||||
break;
|
||||
case eTradeskill.GossipActionInfoDef + 2:
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipBashirCrystalforgeItem1, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef);
|
||||
player.AddGossipItem(GossipOptionIcon.None, GossipConst.GossipBashirCrystalforgeItem5, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
player.SendGossipMenu(GossipConst.GossipBashirCrystalforgeText, me.GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_matrix_punchograph : GameObjectAI
|
||||
{
|
||||
@@ -796,21 +623,6 @@ namespace Scripts.World.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_inconspicuous_landmark : GameObjectAI
|
||||
{
|
||||
public go_inconspicuous_landmark(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
if (player.HasItemCount(ItemIds.CuergosKey))
|
||||
return false;
|
||||
|
||||
player.CastSpell(player, SpellIds.SummonPiratesTreasureAndTriggerMob, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_soulwell : GameObjectAI
|
||||
{
|
||||
@@ -825,39 +637,6 @@ namespace Scripts.World.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_dragonflayer_cage : GameObjectAI
|
||||
{
|
||||
public go_dragonflayer_cage(GameObject go) : base(go) { }
|
||||
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
me.UseDoorOrButton();
|
||||
if (player.GetQuestStatus(QuestIds.PrisonersOfWyrmskull) != QuestStatus.Incomplete)
|
||||
return true;
|
||||
|
||||
Creature pPrisoner = me.FindNearestCreature(CreatureIds.PrisonerPriest, 2.0f);
|
||||
if (!pPrisoner)
|
||||
{
|
||||
pPrisoner = me.FindNearestCreature(CreatureIds.PrisonerMage, 2.0f);
|
||||
if (!pPrisoner)
|
||||
{
|
||||
pPrisoner = me.FindNearestCreature(CreatureIds.PrisonerWarrior, 2.0f);
|
||||
if (!pPrisoner)
|
||||
pPrisoner = me.FindNearestCreature(CreatureIds.PrisonerPaladin, 2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!pPrisoner || !pPrisoner.IsAlive())
|
||||
return true;
|
||||
|
||||
/// @todo prisoner should help player for a short period of time
|
||||
player.KilledMonsterCredit(CreatureIds.CapturedValgardePrisonerProxy);
|
||||
pPrisoner.DespawnOrUnsummon();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class go_amberpine_outhouse : GameObjectAI
|
||||
{
|
||||
|
||||
@@ -128,27 +128,6 @@ namespace Scripts.World.ItemScripts
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class item_nether_wraith_beacon : ItemScript
|
||||
{
|
||||
public item_nether_wraith_beacon() : base("item_nether_wraith_beacon") { }
|
||||
|
||||
public override bool OnUse(Player player, Item item, SpellCastTargets targets, ObjectGuid castId)
|
||||
{
|
||||
if (player.GetQuestStatus(10832) == QuestStatus.Incomplete)
|
||||
{
|
||||
Creature nether = player.SummonCreature(22408, player.GetPositionX(), player.GetPositionY() + 20, player.GetPositionZ(), 0, TempSummonType.TimedDespawn, 180000);
|
||||
if (nether)
|
||||
nether.GetAI().AttackStart(player);
|
||||
|
||||
nether = player.SummonCreature(22408, player.GetPositionX(), player.GetPositionY() - 20, player.GetPositionZ(), 0, TempSummonType.TimedDespawn, 180000);
|
||||
if (nether)
|
||||
nether.GetAI().AttackStart(player);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class item_gor_dreks_ointment : ItemScript
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user