Core/Misc: Misc fixes
This commit is contained in:
@@ -2370,12 +2370,12 @@ namespace Game.Entities
|
||||
// between UNIT_FIELD_SCALING_LEVEL_MIN and UNIT_FIELD_SCALING_LEVEL_MAX
|
||||
if (HasScalableLevels())
|
||||
{
|
||||
uint targetLevelWithDelta = (uint)(unitTarget.getLevel() + GetInt32Value(UnitFields.ScalingLevelDelta));
|
||||
int targetLevelWithDelta = ((int)unitTarget.getLevel() + GetInt32Value(UnitFields.ScalingLevelDelta));
|
||||
|
||||
if (target.IsPlayer())
|
||||
targetLevelWithDelta += target.GetUInt32Value(PlayerFields.ScalingLevelDelta);
|
||||
targetLevelWithDelta += target.GetInt32Value(PlayerFields.ScalingLevelDelta);
|
||||
|
||||
return MathFunctions.RoundToInterval(ref targetLevelWithDelta, GetUInt32Value(UnitFields.ScalingLevelMin), GetUInt32Value(UnitFields.ScalingLevelMax));
|
||||
return (uint)MathFunctions.RoundToInterval(ref targetLevelWithDelta, GetInt32Value(UnitFields.ScalingLevelMin), GetInt32Value(UnitFields.ScalingLevelMax));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace Game.Maps
|
||||
|
||||
bool relocated_for_ai = (i_player == i_player.seerView);
|
||||
|
||||
foreach (var creature in objs)
|
||||
foreach (var creature in objs.ToList())
|
||||
{
|
||||
vis_guids.Remove(creature.GetGUID());
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Game.Maps
|
||||
|
||||
private Queue<MapUpdateRequest> _queue;
|
||||
private object _syncLock = new object();
|
||||
private AutoResetEvent[] autoResetEvent;
|
||||
private WaitHandle[] autoResetEvent;
|
||||
}
|
||||
|
||||
public class MapUpdateRequest
|
||||
|
||||
@@ -266,9 +266,7 @@ namespace Game
|
||||
|
||||
public bool ModifyReputation(FactionRecord factionEntry, int standing, bool noSpillover = false) { return SetReputation(factionEntry, standing, true, noSpillover); }
|
||||
|
||||
bool SetReputation(FactionRecord factionEntry, int standing) { return SetReputation(factionEntry, standing, false, false); }
|
||||
|
||||
public bool SetReputation(FactionRecord factionEntry, int standing, bool incremental = true, bool noSpillover = false)
|
||||
public bool SetReputation(FactionRecord factionEntry, int standing, bool incremental = false, bool noSpillover = false)
|
||||
{
|
||||
Global.ScriptMgr.OnPlayerReputationChange(_player, factionEntry.Id, standing, incremental);
|
||||
bool res = false;
|
||||
|
||||
Reference in New Issue
Block a user