Core/Movement: Fixed PathGenerator.GetNavTerrain returning ground instead of water in fatigue area

This commit is contained in:
hondacrx
2018-04-16 14:14:16 -04:00
parent bcc61c3ab9
commit 77f981d868
6 changed files with 14 additions and 13 deletions
@@ -209,7 +209,7 @@ namespace Game.Collision
return false;
}
public bool GetLiquidLevel(uint mapId, float x, float y, float z, byte reqLiquidType, ref float level, ref float floor, ref uint type)
public bool GetLiquidLevel(uint mapId, float x, float y, float z, uint reqLiquidType, ref float level, ref float floor, ref uint type)
{
if (!Global.DisableMgr.IsDisabledFor(DisableType.VMAP, mapId, null, DisableFlags.VmapLiquidStatus))
{
+2 -2
View File
@@ -504,7 +504,7 @@ namespace Game.Maps
}
// Get water state on map
public ZLiquidStatus getLiquidStatus(float x, float y, float z, byte ReqLiquidType, LiquidData data)
public ZLiquidStatus getLiquidStatus(float x, float y, float z, uint ReqLiquidType, LiquidData data)
{
// Check water type (if no water return)
if (_liquidGlobalFlags == 0 && _liquidFlags == null)
@@ -524,7 +524,7 @@ namespace Game.Maps
LiquidTypeRecord liquidEntry = CliDB.LiquidTypeStorage.LookupByKey(entry);
if (liquidEntry != null)
{
type &= MapConst.MapLiquidTypeDarkWater;
type &= (byte)MapConst.MapLiquidTypeDarkWater;
uint liqTypeIdx = liquidEntry.SoundBank;
if (entry < 21)
{
+1 -1
View File
@@ -382,7 +382,7 @@ namespace Game.Maps
public override void Visit(ICollection<Player> objs)
{
foreach (var player in objs)
foreach (var player in objs.ToList())
{
if (!player.IsInPhase(i_source))
continue;
+2 -2
View File
@@ -1977,13 +1977,13 @@ namespace Game.Maps
return 0;
}
public ZLiquidStatus getLiquidStatus(PhaseShift phaseShift, float x, float y, float z, byte ReqLiquidType)
public ZLiquidStatus getLiquidStatus(PhaseShift phaseShift, float x, float y, float z, uint ReqLiquidType)
{
LiquidData throwaway;
return getLiquidStatus(phaseShift, x, y, z, ReqLiquidType, out throwaway);
}
public ZLiquidStatus getLiquidStatus(PhaseShift phaseShift, float x, float y, float z, byte ReqLiquidType, out LiquidData data)
public ZLiquidStatus getLiquidStatus(PhaseShift phaseShift, float x, float y, float z, uint ReqLiquidType, out LiquidData data)
{
data = new LiquidData();
var result = ZLiquidStatus.NoWater;
@@ -838,6 +838,7 @@ namespace Game.Movement
if (liquidStatus == ZLiquidStatus.NoWater)
return NavTerrain.Ground;
data.type_flags &= ~MapConst.MapLiquidTypeDarkWater;
switch (data.type_flags)
{
case MapConst.MapLiquidTypeWater: