Core/Battlegrounds: Moved AreaSpiritHealer resurrection handling to respective npc flags
Port From (https://github.com/TrinityCore/TrinityCore/commit/205aba1ff3a6f1ff92a8b26af646fd25f139c697)
This commit is contained in:
@@ -427,6 +427,9 @@ namespace Game.Entities
|
||||
{
|
||||
if (IsAIEnabled() && triggerJustAppeared && m_deathState != DeathState.Dead)
|
||||
{
|
||||
if (IsAreaSpiritHealer() && !IsAreaSpiritHealerIndividual())
|
||||
CastSpell(null, BattlegroundConst.SpellSpiritHealChannelAoE, false);
|
||||
|
||||
if (m_respawnCompatibilityMode && VehicleKit != null)
|
||||
VehicleKit.Reset();
|
||||
|
||||
@@ -1129,6 +1132,19 @@ namespace Game.Entities
|
||||
SetHomePosition(GetPosition());
|
||||
}
|
||||
|
||||
public void SummonGraveyardTeleporter()
|
||||
{
|
||||
if (!IsAreaSpiritHealer())
|
||||
return;
|
||||
|
||||
uint npcEntry = GetFaction() == (uint)FactionTemplates.AllianceGeneric ? 26350 : 26351u;
|
||||
|
||||
// maybe NPC is summoned with these spells:
|
||||
// ID - 24237 Summon Alliance Graveyard Teleporter (SERVERSIDE)
|
||||
// ID - 46894 Summon Horde Graveyard Teleporter (SERVERSIDE)
|
||||
SummonCreature(npcEntry, GetPosition(), TempSummonType.TimedDespawn, TimeSpan.FromSeconds(1), 0, 0);
|
||||
}
|
||||
|
||||
public bool HasFlag(CreatureStaticFlags flag) { return _staticFlags.HasFlag(flag); }
|
||||
public bool HasFlag(CreatureStaticFlags2 flag) { return _staticFlags.HasFlag(flag); }
|
||||
public bool HasFlag(CreatureStaticFlags3 flag) { return _staticFlags.HasFlag(flag); }
|
||||
|
||||
Reference in New Issue
Block a user