Messed up the commit history, so here is all the files rip, Credit to TrinityCore

This commit is contained in:
hondacrx
2023-09-16 08:42:35 -04:00
parent 87284bbded
commit f636ea225f
373 changed files with 158910 additions and 2170 deletions
+4 -31
View File
@@ -1430,23 +1430,8 @@ namespace Game.Entities
}
}
// unsummon pet
Pet pet = player.GetPet();
if (pet != null)
{
Battleground bg = ToPlayer().GetBattleground();
// don't unsummon pet in arena but SetFlag UNIT_FLAG_STUNNED to disable pet's interface
if (bg && bg.IsArena())
pet.SetUnitFlag(UnitFlags.Stunned);
else
player.UnsummonPetTemporaryIfAny();
}
// if we have charmed npc, stun him also (everywhere)
Unit charm = player.GetCharmed();
if (charm)
if (charm.GetTypeId() == TypeId.Unit)
charm.SetUnitFlag(UnitFlags.Stunned);
// disable pet controls
player.DisablePetControlsOnMount(ReactStates.Passive, CommandStates.Follow);
player.SendMovementSetCollisionHeight(player.GetCollisionHeight(), UpdateCollisionHeightReason.Mount);
}
@@ -1483,20 +1468,8 @@ namespace Game.Entities
Player player = ToPlayer();
if (player != null)
{
Pet pPet = player.GetPet();
if (pPet != null)
{
if (pPet.HasUnitFlag(UnitFlags.Stunned) && !pPet.HasUnitState(UnitState.Stunned))
pPet.RemoveUnitFlag(UnitFlags.Stunned);
}
else
player.ResummonPetTemporaryUnSummonedIfAny();
// if we have charmed npc, remove stun also
Unit charm = player.GetCharmed();
if (charm)
if (charm.GetTypeId() == TypeId.Unit && charm.HasUnitFlag(UnitFlags.Stunned) && !charm.HasUnitState(UnitState.Stunned))
charm.RemoveUnitFlag(UnitFlags.Stunned);
player.EnablePetControlsOnDismount();
player.ResummonPetTemporaryUnSummonedIfAny();
}
}