Core/Entities: Phasing rewrite
This commit is contained in:
@@ -102,23 +102,19 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.Amanitar
|
||||
for (byte i = 0; i < 30; ++i)
|
||||
{
|
||||
Position pos = me.GetRandomNearPosition(30.0f);
|
||||
pos.posZ = me.GetMap().GetHeight(pos.GetPositionX(), pos.GetPositionY(), MapConst.MaxHeight) + 2.0f;
|
||||
me.UpdateGroundPositionZ(pos.GetPositionX(), pos.GetPositionY(), ref pos.posZ);
|
||||
|
||||
Creature trigger = me.SummonCreature(CreatureIds.Trigger, pos);
|
||||
if (trigger)
|
||||
{
|
||||
Creature temp1 = trigger.FindNearestCreature(CreatureIds.HealthyMushroom, 4.0f, true);
|
||||
Creature temp2 = trigger.FindNearestCreature(CreatureIds.PoisonousMushroom, 4.0f, true);
|
||||
if (temp1 || temp2)
|
||||
{
|
||||
trigger.DisappearAndDie();
|
||||
}
|
||||
else
|
||||
if (!temp1 && !temp2)
|
||||
{
|
||||
u = 1 - u;
|
||||
trigger.DisappearAndDie();
|
||||
me.SummonCreature(u > 0 ? CreatureIds.PoisonousMushroom : CreatureIds.HealthyMushroom, pos, TempSummonType.TimedOrCorpseDespawn, 60 * Time.InMilliseconds);
|
||||
}
|
||||
trigger.DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ using Game.Scripting;
|
||||
using Game.Spells;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Game;
|
||||
|
||||
namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
|
||||
{
|
||||
@@ -133,7 +134,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
|
||||
// clone
|
||||
player.CastSpell(summon, SpellIds.ClonePlayer, true);
|
||||
// phase the summon
|
||||
summon.SetInPhase((uint)spellInfo.GetEffect(0).MiscValueB, true, true);
|
||||
PhasingHandler.AddPhase(summon, (uint)spellInfo.GetEffect(0).MiscValueB, true);
|
||||
}
|
||||
}
|
||||
++insanityHandled;
|
||||
@@ -158,9 +159,9 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
|
||||
instance.DoStopCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievQuickDemiseStartEvent);
|
||||
|
||||
// Visible for all players in insanity
|
||||
me.SetInPhase(169, true, true);
|
||||
for (uint i = 173; i <= 177; ++i)
|
||||
me.SetInPhase(i, true, true);
|
||||
PhasingHandler.AddPhase(me, i, false);
|
||||
PhasingHandler.AddPhase(me, 169, true);
|
||||
|
||||
ResetPlayersPhase();
|
||||
|
||||
@@ -199,7 +200,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
|
||||
return;
|
||||
else
|
||||
{
|
||||
nextPhase = visage.GetPhases().First();
|
||||
nextPhase = visage.GetPhaseShift().GetPhases().First().Id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
|
||||
{
|
||||
float x, y, z;
|
||||
me.GetPosition(out x, out y, out z);
|
||||
z = me.GetMap().GetHeight(me.GetPhases(), x, y, z);
|
||||
z = me.GetMap().GetHeight(me.GetPhaseShift(), x, y, z);
|
||||
me.GetMotionMaster().MovePoint(0, x, y, z);
|
||||
me.SetPosition(x, y, z, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user