refactor(DBC/Misc): Redefine & Define FactionTemplateFlags (#7697)

This commit is contained in:
Kitzunu
2021-09-07 02:07:37 +02:00
committed by GitHub
parent 52d9f5324c
commit df6ad0db29
4 changed files with 19 additions and 8 deletions

View File

@@ -293,9 +293,20 @@ enum FactionFlags
enum FactionTemplateFlags
{
FACTION_TEMPLATE_FLAG_PVP = 0x00000800, // flagged for PvP
FACTION_TEMPLATE_FLAG_CONTESTED_GUARD = 0x00001000, // faction will attack players that were involved in PvP combats
FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT = 0x00002000,
FACTION_TEMPLATE_FLAG_RESPOND_TO_CALL_FOR_HELP = 0x0001, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_BROADCAST_TO_ENEMIES_LOW_PRIORITY = 0x0002, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_BROADCAST_TO_ENEMIES_MED_PRIORITY = 0x0004, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_BROADCAST_TO_ENEMIES_HIGH_PRIORITY = 0x0008, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_SEARCH_FOR_ENEMIES_LOW_PRIORITY = 0x0010, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_SEARCH_FOR_ENEMIES_MED_PRIORITY = 0x0020, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_SEARCH_FOR_ENEMIES_HIGH_PRIORITY = 0x0040, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_SEARCH_FOR_FRIENDS_LOW_PRIORITY = 0x0080, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_SEARCH_FOR_FRIENDS_MED_PRIORITY = 0x0100, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_SEARCH_FOR_FRIENDS_HIGH_PRIORITY = 0x0200, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_FLEE_FROM_CALL_FOR_HELP = 0x0400, //@todo Not implemented.
FACTION_TEMPLATE_FLAG_ASSIST_PLAYERS = 0x0800, // Old title: FACTION_TEMPLATE_FLAG_ASSIST_PLAYERS, Old comment: flagged for PvP //@todo: Should see if this is implemented correctly.
FACTION_TEMPLATE_FLAG_ATTACK_PVP_ACTIVE_PLAYERS = 0x1000, // Old title: FACTION_TEMPLATE_FLAG_ATTACK_PVP_ACTIVE_PLAYERS, Old comment: faction will attack players that were involved in PvP combats //@todo: Should see if this is implemented correctly.
FACTION_TEMPLATE_FLAG_HATES_ALL_EXCEPT_FRIENDS = 0x2000, // Old title: FACTION_TEMPLATE_FLAG_HATES_ALL_EXCEPT_FRIENDS, Old comment: //@todo: Should see if this is implemented correctly.
};
enum FactionMasks

View File

@@ -935,7 +935,7 @@ struct FactionTemplateEntry
return false;
return hostileMask == 0 && friendlyMask == 0;
}
[[nodiscard]] bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; }
[[nodiscard]] bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_ATTACK_PVP_ACTIVE_PLAYERS) != 0; }
};
struct GameObjectDisplayInfoEntry