Fixes some crashes.
This commit is contained in:
@@ -334,6 +334,8 @@ namespace Game.AI
|
|||||||
|
|
||||||
public SpellCastResult DoCast(Unit victim, uint spellId, CastSpellExtraArgs args = null)
|
public SpellCastResult DoCast(Unit victim, uint spellId, CastSpellExtraArgs args = null)
|
||||||
{
|
{
|
||||||
|
args = args ?? new CastSpellExtraArgs();
|
||||||
|
|
||||||
if (me.HasUnitState(UnitState.Casting) && !args.TriggerFlags.HasAnyFlag(TriggerCastFlags.IgnoreCastInProgress))
|
if (me.HasUnitState(UnitState.Casting) && !args.TriggerFlags.HasAnyFlag(TriggerCastFlags.IgnoreCastInProgress))
|
||||||
return SpellCastResult.SpellInProgress;
|
return SpellCastResult.SpellInProgress;
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Moroes
|
|||||||
if (me.IsAlive())
|
if (me.IsAlive())
|
||||||
SpawnAdds();
|
SpawnAdds();
|
||||||
|
|
||||||
base.Reset();
|
instance.SetBossState(DataTypes.Moroes, EncounterState.NotStarted);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void JustEngagedWith(Unit who)
|
public override void JustEngagedWith(Unit who)
|
||||||
@@ -203,15 +203,14 @@ namespace Scripts.EasternKingdoms.Karazhan.Moroes
|
|||||||
{
|
{
|
||||||
List<uint> AddList = MiscConst.Adds.ToList();
|
List<uint> AddList = MiscConst.Adds.ToList();
|
||||||
AddList.RandomResize(4);
|
AddList.RandomResize(4);
|
||||||
|
|
||||||
byte i = 0;
|
for (var i = 0; i < 4; ++i)
|
||||||
foreach (var entry in AddList)
|
|
||||||
{
|
{
|
||||||
Creature creature = me.SummonCreature(entry, MiscConst.Locations[i], TempSummonType.CorpseTimedDespawn, TimeSpan.FromSeconds(10));
|
Creature creature = me.SummonCreature(AddList[i], MiscConst.Locations[i], TempSummonType.CorpseTimedDespawn, TimeSpan.FromSeconds(10));
|
||||||
if (creature)
|
if (creature)
|
||||||
{
|
{
|
||||||
AddGUID[i] = creature.GetGUID();
|
AddGUID[i] = creature.GetGUID();
|
||||||
AddId[i] = entry;
|
AddId[i] = AddList[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user