Misc fixes
This commit is contained in:
@@ -120,6 +120,18 @@ namespace System.Collections.Generic
|
||||
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)
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
class FollowerAI : ScriptedAI
|
||||
public class FollowerAI : ScriptedAI
|
||||
{
|
||||
ObjectGuid _leaderGUID;
|
||||
uint _updateFollowTimer;
|
||||
|
||||
@@ -667,7 +667,7 @@ namespace Scripts.BrokenIsles.ZoneMardum
|
||||
|
||||
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)
|
||||
return;
|
||||
|
||||
|
||||
@@ -679,7 +679,7 @@ namespace Scripts.World.GameObjects
|
||||
_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)
|
||||
{
|
||||
_rings = 1;
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace Scripts.World.NpcsSpecial
|
||||
Creature patient = me.SummonCreature(patientEntry, point, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromSeconds(5));
|
||||
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);
|
||||
|
||||
Patients.Add(patient.GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user