Fixed wrong area flags, Fixes resting in city.

This commit is contained in:
hondacrx
2021-10-15 18:05:40 -04:00
parent 18033381b9
commit 5994c4e5fb
9 changed files with 27 additions and 24 deletions
+4 -4
View File
@@ -2581,10 +2581,10 @@ namespace Game.Entities
public bool CanJoinConstantChannelInZone(ChatChannelsRecord channel, AreaTableRecord zone)
{
if (channel.Flags.HasAnyFlag(ChannelDBCFlags.ZoneDep) && zone.Flags.HasFlag(AreaFlags.ArenaInstance))
if (channel.Flags.HasAnyFlag(ChannelDBCFlags.ZoneDep) && zone.HasFlag(AreaFlags.ArenaInstance))
return false;
if (channel.Flags.HasAnyFlag(ChannelDBCFlags.CityOnly) && !zone.Flags.HasFlag(AreaFlags.Capital))
if (channel.Flags.HasAnyFlag(ChannelDBCFlags.CityOnly) && !zone.HasFlag(AreaFlags.Capital))
return false;
if (channel.Flags.HasAnyFlag(ChannelDBCFlags.GuildReq) && GetGuildId() != 0)
@@ -4527,7 +4527,7 @@ namespace Game.Entities
AreaTableRecord zone = CliDB.AreaTableStorage.LookupByKey(GetAreaId());
// Such zones are considered unreachable as a ghost and the player must be automatically revived
if ((!IsAlive() && zone != null && zone.Flags.HasFlag(AreaFlags.NeedFly)) || GetTransport() != null || GetPositionZ() < GetMap().GetMinHeight(GetPhaseShift(), GetPositionX(), GetPositionY()))
if ((!IsAlive() && zone != null && zone.HasFlag(AreaFlags.NeedFly)) || GetTransport() != null || GetPositionZ() < GetMap().GetMinHeight(GetPhaseShift(), GetPositionX(), GetPositionY()))
{
ResurrectPlayer(0.5f);
SpawnCorpseBones();
@@ -5057,7 +5057,7 @@ namespace Game.Entities
if (area == null || !IsFriendlyArea(area))
return false;
return area.Flags2.HasFlag(AreaFlags2.CanEnableWarMode);
return area.HasFlag2(AreaFlags2.CanEnableWarMode);
}
// Used in triggers for check "Only to targets that grant experience or honor" req