Core/Entities: Ethereal Soul-Trader

Port From (https://github.com/TrinityCore/TrinityCore/commit/3503e9dc929692bc9a8e9a23de2bae9cad24497f)
This commit is contained in:
hondacrx
2021-10-17 10:01:25 -04:00
parent 8a976ee972
commit 4a6da800fe
3 changed files with 147 additions and 0 deletions
+31
View File
@@ -26,13 +26,22 @@ namespace Scripts.Pets
{
struct SpellIds
{
//Mojo
public const uint FeelingFroggy = 43906;
public const uint SeductionVisual = 43919;
//SoulTrader
public const uint EtherealOnSummon = 50052;
public const uint EtherealPetRemoveAura = 50055;
}
struct TextIds
{
//Mojo
public const uint SayMojo = 0;
//SoulTrader
public const uint SaySoulTraderInto = 0;
}
[Script]
@@ -81,5 +90,27 @@ namespace Scripts.Pets
ObjectGuid _victimGUID;
}
[Script]
class npc_pet_gen_soul_trader : ScriptedAI
{
public npc_pet_gen_soul_trader(Creature creature) : base(creature) { }
public override void LeavingWorld()
{
Unit owner = me.GetOwner();
if (owner != null)
DoCast(owner, SpellIds.EtherealPetRemoveAura);
}
public override void JustAppeared()
{
Talk(TextIds.SaySoulTraderInto);
Unit owner = me.GetOwner();
if (owner != null)
DoCast(owner, SpellIds.EtherealOnSummon);
}
}
}
}