Misc fixes
This commit is contained in:
@@ -120,6 +120,18 @@ namespace System.Collections.Generic
|
|||||||
list.Resize(size);
|
list.Resize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RandomShuffle<T>(this IList<T> array)
|
||||||
|
{
|
||||||
|
for (int n = array.Count; n > 1;)
|
||||||
|
{
|
||||||
|
int k = (int)RandomHelper.Rand32(n);
|
||||||
|
--n;
|
||||||
|
T temp = array[n];
|
||||||
|
array[n] = array[k];
|
||||||
|
array[k] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void RandomShuffle<T>(this IList<T> array, int first, int count)
|
public static void RandomShuffle<T>(this IList<T> array, int first, int count)
|
||||||
{
|
{
|
||||||
for (int n = count; n > 1;)
|
for (int n = count; n > 1;)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Game.AI
|
|||||||
PostEvent = 0x10 //can be set at complete and allow post event to run
|
PostEvent = 0x10 //can be set at complete and allow post event to run
|
||||||
}
|
}
|
||||||
|
|
||||||
class FollowerAI : ScriptedAI
|
public class FollowerAI : ScriptedAI
|
||||||
{
|
{
|
||||||
ObjectGuid _leaderGUID;
|
ObjectGuid _leaderGUID;
|
||||||
uint _updateFollowTimer;
|
uint _updateFollowTimer;
|
||||||
|
|||||||
@@ -667,7 +667,7 @@ namespace Scripts.BrokenIsles.ZoneMardum
|
|||||||
|
|
||||||
public override void OnSceneStart(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
|
public override void OnSceneStart(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
|
||||||
{
|
{
|
||||||
Creature sevisObject = player.FindNearestCreatureWithOptions(30.0f, new() { CreatureId = AshtongueIntroData.NpcSevisBrightflameAshtongue, IgnorePhases = true });
|
Creature sevisObject = player.FindNearestCreatureWithOptions(30.0f, new() new FindCreatureOptions() { CreatureId = AshtongueIntroData.NpcSevisBrightflameAshtongue, IgnorePhases = true });
|
||||||
if (sevisObject == null)
|
if (sevisObject == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -679,7 +679,7 @@ namespace Scripts.World.GameObjects
|
|||||||
_rings = 12;
|
_rings = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dwarf hourly horn should only play a Math.Single time, each time the next hour begins.
|
// Dwarf hourly horn should only play a Single time, each time the next hour begins.
|
||||||
if (_soundId == BellHourlyConst.Belltolldwarfgnome)
|
if (_soundId == BellHourlyConst.Belltolldwarfgnome)
|
||||||
{
|
{
|
||||||
_rings = 1;
|
_rings = 1;
|
||||||
|
|||||||
@@ -620,7 +620,7 @@ namespace Scripts.World.NpcsSpecial
|
|||||||
Creature patient = me.SummonCreature(patientEntry, point, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromSeconds(5));
|
Creature patient = me.SummonCreature(patientEntry, point, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromSeconds(5));
|
||||||
if (patient != null)
|
if (patient != null)
|
||||||
{
|
{
|
||||||
//303, this flag appear to be required for client side item.spell to work (TargetMath.SingleFriend)
|
//303, this flag appear to be required for client side item.spell to work (TargetSingleFriend)
|
||||||
patient.SetUnitFlag(UnitFlags.PlayerControlled);
|
patient.SetUnitFlag(UnitFlags.PlayerControlled);
|
||||||
|
|
||||||
Patients.Add(patient.GetGUID());
|
Patients.Add(patient.GetGUID());
|
||||||
|
|||||||
Reference in New Issue
Block a user