Core/Items: implement some helper methods for easier readability

Port From (https://github.com/TrinityCore/TrinityCore/commit/9124fd1f1fafea19b118eb69c6a35f94376fc7e8)
This commit is contained in:
hondacrx
2022-01-06 10:57:06 -05:00
parent 8f8cd4a7d4
commit 6e0becd106
23 changed files with 105 additions and 100 deletions
+2 -2
View File
@@ -882,8 +882,8 @@ namespace Game.Entities
if (rewardProto == null)
return false;
if ((rewardProto.GetFlags2().HasAnyFlag(ItemFlags2.FactionAlliance) && GetTeam() != Team.Alliance) ||
(rewardProto.GetFlags2().HasAnyFlag(ItemFlags2.FactionHorde) && GetTeam() != Team.Horde))
if ((rewardProto.HasFlag(ItemFlags2.FactionAlliance) && GetTeam() != Team.Alliance) ||
(rewardProto.HasFlag(ItemFlags2.FactionHorde) && GetTeam() != Team.Horde))
return false;
switch (questPackageItem.DisplayType)