Misc stuff

This commit is contained in:
hondacrx
2022-05-30 15:09:02 -04:00
parent 2472177ef6
commit af29d3158e
5 changed files with 36 additions and 26 deletions
+4 -4
View File
@@ -685,7 +685,7 @@ namespace Game.Entities
return IsInDist(obj, objBoundaryRadius); return IsInDist(obj, objBoundaryRadius);
} }
public bool SetDisableGravity(bool disable, bool updateAnimationTier = true) public bool SetDisableGravity(bool disable, bool updateAnimTier = true)
{ {
if (disable == IsGravityDisabled()) if (disable == IsGravityDisabled())
return false; return false;
@@ -718,7 +718,7 @@ namespace Game.Entities
SendMessageToSet(packet, true); SendMessageToSet(packet, true);
} }
if (IsCreature() && updateAnimationTier && IsAlive() && !HasUnitState(UnitState.Root) && !ToCreature().GetMovementTemplate().IsRooted()) if (IsCreature() && updateAnimTier && IsAlive() && !HasUnitState(UnitState.Root) && !ToCreature().GetMovementTemplate().IsRooted())
{ {
if (IsGravityDisabled()) if (IsGravityDisabled())
SetAnimTier(AnimTier.Fly); SetAnimTier(AnimTier.Fly);
@@ -1047,7 +1047,7 @@ namespace Game.Entities
return true; return true;
} }
public bool SetHover(bool enable, bool updateAnimationTier = true) public bool SetHover(bool enable, bool updateAnimTier = true)
{ {
if (enable == HasUnitMovementFlag(MovementFlag.Hover)) if (enable == HasUnitMovementFlag(MovementFlag.Hover))
return false; return false;
@@ -1093,7 +1093,7 @@ namespace Game.Entities
SendMessageToSet(packet, true); SendMessageToSet(packet, true);
} }
if (IsCreature() && updateAnimationTier && IsAlive() && !HasUnitState(UnitState.Root) && !ToCreature().GetMovementTemplate().IsRooted()) if (IsCreature() && updateAnimTier && IsAlive() && !HasUnitState(UnitState.Root) && !ToCreature().GetMovementTemplate().IsRooted())
{ {
if (IsGravityDisabled()) if (IsGravityDisabled())
SetAnimTier(AnimTier.Fly); SetAnimTier(AnimTier.Fly);
@@ -229,7 +229,7 @@ namespace Game.Networking.Packets
data.WriteBit(false); // HasSplineFilter data.WriteBit(false); // HasSplineFilter
data.WriteBit(moveSpline.spell_effect_extra != null); // HasSpellEffectExtraData data.WriteBit(moveSpline.spell_effect_extra != null); // HasSpellEffectExtraData
bool hasJumpExtraData = data.WriteBit(moveSpline.splineflags.HasFlag(SplineFlag.Parabolic) && (moveSpline.spell_effect_extra == null || moveSpline.effect_start_time != 0)); bool hasJumpExtraData = data.WriteBit(moveSpline.splineflags.HasFlag(SplineFlag.Parabolic) && (moveSpline.spell_effect_extra == null || moveSpline.effect_start_time != 0));
data.WriteBit(moveSpline.anim_tier != null); // HasAnimationTierTransition data.WriteBit(moveSpline.anim_tier != null); // HasAnimTierTransition
data.WriteBit(false); // HasUnknown901 data.WriteBit(false); // HasUnknown901
data.FlushBits(); data.FlushBits();
+2 -1
View File
@@ -3279,7 +3279,8 @@ namespace Game.Entities
46008, // Negative Energy 46008, // Negative Energy
45641, // Fire Bloom 45641, // Fire Bloom
55665, // Life Drain - Sapphiron (H) 55665, // Life Drain - Sapphiron (H)
28796 // Poison Bolt Volly - Faerlina 28796, // Poison Bolt Volly - Faerlina
37135 // Domination
}, spellInfo => }, spellInfo =>
{ {
spellInfo.MaxAffectedTargets = 5; spellInfo.MaxAffectedTargets = 5;
+29
View File
@@ -3398,6 +3398,35 @@ namespace Scripts.Spells.Generic
} }
} }
[Script]
class spell_gen_whisper_to_controller : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return CliDB.BroadcastTextStorage.HasRecord((uint)spellInfo.GetEffect(0).CalcValue());
}
void HandleScript(uint effIndex)
{
Unit caster = GetCaster();
if (caster != null)
{
TempSummon casterSummon = caster.ToTempSummon();
if (casterSummon != null)
{
Player target = casterSummon.GetSummonerUnit().ToPlayer();
if (target != null)
casterSummon.Whisper((uint)GetEffectValue(), target, false);
}
}
}
public override void Register()
{
OnEffectHit.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
}
}
[Script] [Script]
class spell_gen_eject_all_passengers : SpellScript class spell_gen_eject_all_passengers : SpellScript
{ {
-20
View File
@@ -544,26 +544,6 @@ namespace Scripts.World.GameObjects
} }
} }
[Script]
class go_frostblade_shrine : GameObjectAI
{
public go_frostblade_shrine(GameObject go) : base(go) { }
public override bool OnGossipHello(Player player)
{
me.UseDoorOrButton(10);
if (!player.HasAura(SpellIds.RecentMeditation))
{
if (player.GetQuestStatus(QuestIds.TheCleansingHorde) == QuestStatus.Incomplete || player.GetQuestStatus(QuestIds.TheCleansingAlliance) == QuestStatus.Incomplete)
{
player.CastSpell(player, SpellIds.CleansingSoul);
player.SetStandState(UnitStandStateType.Sit);
}
}
return true;
}
}
[Script] [Script]
class go_midsummer_bonfire : GameObjectAI class go_midsummer_bonfire : GameObjectAI
{ {