Core/Instances: New ZoneScript hook - OnCreatureGroupDepleted
Port From (https://github.com/TrinityCore/TrinityCore/commit/ec2631eca3a397dffd2e525b34c131c283beb167)
This commit is contained in:
@@ -2028,8 +2028,15 @@ namespace Game.Entities
|
||||
SetNoSearchAssistance(false);
|
||||
|
||||
//Dismiss group if is leader
|
||||
if (m_formation != null && m_formation.GetLeader() == this)
|
||||
m_formation.FormationReset(true);
|
||||
if (m_formation != null)
|
||||
{
|
||||
if (m_formation.GetLeader() == this)
|
||||
m_formation.FormationReset(true);
|
||||
|
||||
ZoneScript script = GetZoneScript();
|
||||
if (script != null && !m_formation.HasAliveMembers())
|
||||
script.OnCreatureGroupDepleted(m_formation);
|
||||
}
|
||||
|
||||
bool needsFalling = (IsFlying() || IsHovering()) && !IsUnderWater() && !HasUnitState(UnitState.Root);
|
||||
SetHover(false, false);
|
||||
|
||||
Reference in New Issue
Block a user