Core/Phasing: Fixed inverse phaseshift logic
Port From (https://github.com/TrinityCore/TrinityCore/commit/630adfec227c18b8825f4871a1bf1a395b8dee05)
This commit is contained in:
@@ -1617,9 +1617,16 @@ namespace Framework.Constants
|
|||||||
|
|
||||||
public enum PhaseEntryFlags : ushort
|
public enum PhaseEntryFlags : ushort
|
||||||
{
|
{
|
||||||
Normal = 0x08,
|
ReadOnly = 0x001,
|
||||||
Cosmetic = 0x10,
|
InternalPhase = 0x002,
|
||||||
Personal = 0x20
|
Normal = 0x008,
|
||||||
|
Cosmetic = 0x010,
|
||||||
|
Personal = 0x020,
|
||||||
|
Expensive = 0x040,
|
||||||
|
EventsAreObservable = 0x080,
|
||||||
|
UsesPreloadConditions = 0x100,
|
||||||
|
UnshareablePersonal = 0x200,
|
||||||
|
ObjectsAreVisible = 0x400,
|
||||||
}
|
}
|
||||||
|
|
||||||
// PhaseUseFlags fields in different db2s
|
// PhaseUseFlags fields in different db2s
|
||||||
|
|||||||
@@ -166,8 +166,8 @@ namespace Game
|
|||||||
|
|
||||||
var checkInversePhaseShift = new Func<PhaseShift, PhaseShift, bool>((phaseShift, excludedPhaseShift) =>
|
var checkInversePhaseShift = new Func<PhaseShift, PhaseShift, bool>((phaseShift, excludedPhaseShift) =>
|
||||||
{
|
{
|
||||||
if (phaseShift.Flags.HasFlag(PhaseShiftFlags.Unphased) && !excludedPhaseShift.Flags.HasFlag(PhaseShiftFlags.InverseUnphased))
|
if (phaseShift.Flags.HasFlag(PhaseShiftFlags.Unphased) && excludedPhaseShift.Flags.HasFlag(PhaseShiftFlags.InverseUnphased))
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
foreach (var pair in phaseShift.Phases)
|
foreach (var pair in phaseShift.Phases)
|
||||||
{
|
{
|
||||||
@@ -175,11 +175,11 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var ExcludedPhaseRef = excludedPhaseShift.Phases.LookupByKey(pair.Key);
|
var ExcludedPhaseRef = excludedPhaseShift.Phases.LookupByKey(pair.Key);
|
||||||
if (ExcludedPhaseRef == null || ExcludedPhaseRef.Flags.HasAnyFlag(excludePhasesWithFlag))
|
if (ExcludedPhaseRef != null || !ExcludedPhaseRef.Flags.HasAnyFlag(excludePhasesWithFlag))
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (other.Flags.HasFlag(PhaseShiftFlags.Inverse))
|
if (other.Flags.HasFlag(PhaseShiftFlags.Inverse))
|
||||||
|
|||||||
Reference in New Issue
Block a user