Core/Chat: Corrected chat channel flag implementations
Port From (https://github.com/TrinityCore/TrinityCore/commit/d2baaac9ec9c0b0839d5868d9666aa0901031b28)
This commit is contained in:
@@ -93,8 +93,10 @@ namespace Game.Entities
|
||||
{
|
||||
// FFA_PVP flags are area and not zone id dependent
|
||||
// so apply them accordingly
|
||||
uint oldArea = m_areaUpdateId;
|
||||
m_areaUpdateId = newArea;
|
||||
|
||||
AreaTableRecord oldAreaEntry = CliDB.AreaTableStorage.LookupByKey(oldArea);
|
||||
AreaTableRecord area = CliDB.AreaTableStorage.LookupByKey(newArea);
|
||||
bool oldFFAPvPArea = pvpInfo.IsInFFAPvPArea;
|
||||
pvpInfo.IsInFFAPvPArea = area != null && area.GetFlags().HasFlag(AreaFlags.FreeForAllPvP);
|
||||
@@ -135,6 +137,10 @@ namespace Game.Entities
|
||||
UpdateCriteria(CriteriaType.EnterTopLevelArea, newArea);
|
||||
|
||||
UpdateMountCapability();
|
||||
|
||||
if ((oldAreaEntry != null && oldAreaEntry.GetFlags2().HasFlag(AreaFlags2.UseSubzoneForChatChannel))
|
||||
|| (area != null && area.GetFlags2().HasFlag(AreaFlags2.UseSubzoneForChatChannel)))
|
||||
UpdateLocalChannels(newArea);
|
||||
}
|
||||
|
||||
public void UpdateZone(uint newZone, uint newArea)
|
||||
@@ -201,7 +207,9 @@ namespace Game.Entities
|
||||
AutoUnequipOffhandIfNeed();
|
||||
|
||||
// recent client version not send leave/join channel packets for built-in local channels
|
||||
UpdateLocalChannels(newZone);
|
||||
var newAreaEntry = CliDB.AreaTableStorage.LookupByKey(newArea);
|
||||
if (newAreaEntry == null || !newAreaEntry.GetFlags2().HasFlag(AreaFlags2.UseSubzoneForChatChannel))
|
||||
UpdateLocalChannels(newZone);
|
||||
|
||||
UpdateZoneDependentAuras(newZone);
|
||||
|
||||
@@ -612,7 +620,7 @@ namespace Game.Entities
|
||||
|
||||
return (instanceLock.GetData().CompletedEncountersMask & (1u << dungeonEncounter.Bit)) != 0;
|
||||
}
|
||||
|
||||
|
||||
public override void ProcessTerrainStatusUpdate(ZLiquidStatus oldLiquidStatus, LiquidData newLiquidData)
|
||||
{
|
||||
// process liquid auras using generic unit code
|
||||
|
||||
Reference in New Issue
Block a user