Skip to content

Commit 651f53f

Browse files
committed
Fixed PhaseGroups getter to add groups if any phase of the group is active
1 parent 9dffa16 commit 651f53f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

WowPacketParser/DBC/DBC.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,17 +209,14 @@ public static HashSet<ushort> GetPhaseGroups(ICollection<ushort> phases)
209209

210210
foreach (var phaseGroup in Phases)
211211
{
212-
bool valid = true;
213-
214212
foreach (var phase in phaseGroup.Value)
215213
{
216-
if (!phases.Contains(phase))
217-
valid = false;
214+
if (phases.Contains(phase))
215+
{
216+
phaseGroups.Add(phaseGroup.Key);
217+
break;
218+
}
218219
}
219-
220-
if (valid)
221-
phaseGroups.Add(phaseGroup.Key);
222-
223220
}
224221

225222
return phaseGroups;

0 commit comments

Comments
 (0)