TrinityCore
Loading...
Searching...
No Matches
DB2Structure.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITY_DB2STRUCTURE_H
19#define TRINITY_DB2STRUCTURE_H
20
21#include "Common.h"
22#include "DBCEnums.h"
23#include "FlagsArray.h"
24#include "RaceMask.h"
25
26#pragma pack(push, 1)
27
29{
34 int16 InstanceID; // -1 = none
35 int8 Faction; // -1 = all, 0 = horde, 1 = alliance
36 int16 Supercedes; // its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
38 int8 MinimumCriteria; // need this count of completed criterias (own or referenced achievement criterias)
45 int16 SharesCriteria; // referenced achievement (counting of all completed criterias)
47};
48
50{
55};
56
58{
80 std::array<uint32, 2> BonusPlayerConditionID;
81 std::array<uint8, 2> BonusValue;
82};
83
85{
99};
100
102{
107 std::array<int32, 2> Flags;
108};
109
111{
116};
117
119{
123};
124
126{
128 char const* ZoneName;
149 std::array<int32, 2> Flags;
150 std::array<uint16, 4> LiquidTypeID;
151
152 // helpers
153 bool IsSanctuary() const
154 {
155 return (Flags[0] & AREA_FLAG_SANCTUARY) != 0;
156 }
157
158 bool IsFlyable() const
159 {
160 if (Flags[0] & AREA_FLAG_OUTLAND)
161 {
162 if (!(Flags[0] & AREA_FLAG_NO_FLY_ZONE))
163 return true;
164 }
165
166 return false;
167 }
168};
169
171{
178 float Radius;
180 float BoxWidth;
182 float BoxYaw;
187};
188
190{
196 float Modifier;
197};
198
200{
212};
213
215{
232};
233
235{
245};
246
248{
252};
253
255{
263};
264
266{
270};
271
273{
276};
277
279{
286};
287
289{
291 std::array<uint32, 10> Difficulty;
292};
293
295{
302};
303
305{
312};
313
315{
318 uint16 FactionID; // id of faction.dbc for player factions associated with city
321};
322
324{
329};
330
332{
337};
338
340{
350};
351
353{
356};
357
359{
365};
366
368{
371};
372
374{
379};
380
382{
388};
389
391{
398};
399
401{
407};
408
410{
413};
414
416{
423};
424
426{
429};
430
432{
434 char const* Name;
435 char const* Version;
437};
438
440{
444 uint8 Type; // value 0 -> hair, value 2 -> facialhair
448 uint8 Data; // real ID to hair/facial hair
449};
450
452{
457};
458
460{
465};
466
468{
481
483};
484
486{
491};
492
494{
512 std::array<int16, 16> MapID;
513
515};
516
517#define MAX_BROADCAST_TEXT_EMOTES 3
518
520{
530 std::array<uint32, 2> SoundKitID;
531 std::array<uint16, MAX_BROADCAST_TEXT_EMOTES> EmoteID;
532 std::array<uint16, MAX_BROADCAST_TEXT_EMOTES> EmoteDelay;
533};
534
536{
541};
542
544{
546 char const* Tag;
548 uint32 Raidorigin; // Date of first raid reset, all other resets are calculated as this date plus interval
551};
552
554{
560};
561
563{
569
570 bool IsForNewCharacter() const { return Purpose == 9; }
571};
572
574{
578};
579
581{
588};
589
591{
596};
597
599{
601 char const* Filename;
604 char const* PetNameToken;
639};
640
642{
646};
647
649{
659 std::array<int32, 2> SwatchColor;
660};
661
663{
669};
670
672{
684};
685
687{
701};
702
704{
711 int32 OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
713
715};
716
718{
722};
723
725{
726 std::array<float, 3> FaceCustomizationOffset;
727 std::array<float, 3> CustomizeOffset;
741 float BarberShopCameraHeightOffsetScale; // applied after BarberShopCameraOffsetScale
743};
744
746{
752};
753
755{
757 char const* ClientPrefix;
758 char const* ClientFileString;
785 std::array<int32, 3> AlteredFormStartVisualKitID;
786 std::array<int32, 3> AlteredFormFinishVisualKitID;
800 std::array<float, 3> Unknown910_1;
801 std::array<float, 3> Unknown910_2;
809
810 EnumFlag<ChrRacesFlag> GetFlags() const { return static_cast<ChrRacesFlag>(Flags); }
811};
812
813#define MAX_MASTERY_SPELLS 2
814
816{
829 std::array<int32, MAX_MASTERY_SPELLS> MasterySpellID;
830
832 {
833 return ClassID == 0;
834 }
835};
836
838{
840 DBCPosition3D Origin; // Position in map used for basis for M2 co-ordinates
841 uint32 SoundID; // Sound ID (voiceover for cinematic)
842 float OriginFacing; // Orientation in map used for basis for M2 co
845};
846
848{
851 std::array<uint16, 8> Camera;
852};
853
855{
868
870
872 {
874 if (flags.HasFlag(ContentTuningFlag::Horde))
875 return 5;
876
877 if (flags.HasFlag(ContentTuningFlag::Alliance))
878 return 3;
879
880 return 0;
881 }
882};
883
885{
891};
892
894{
904};
905
907{
913};
914
915//struct CreatureDifficultyEntry
916//{
917// uint32 ID;
918// int32 LevelDeltaMin;
919// int32 LevelDeltaMax;
920// uint16 FactionID;
921// int32 ContentTuningID;
922// int32 Flags[8];
923// uint32 CreatureID;
924//};
925
927{
945 float PetInstanceScale; // scale of not own player pets inside dungeons/raids/scenarios
952 std::array<int32, 4> TextureVariationFileDataID;
953};
954
956{
964};
965
967{
970 float MinScale;
972 float MaxScale;
977 std::array<int16, 2> SkillLine;
978};
979
981{
983 std::array<float, 6> GeoBox;
1011 int8 Unknown820_1; // scale related
1012 float Unknown820_2; // scale related
1013 std::array<float, 2> Unknown820_3; // scale related
1014
1016};
1017
1019{
1023};
1024
1026{
1030 {
1032 // CriteriaType::KillCreature = 0
1033 // CriteriaType::KilledByCreature = 20
1034 // CriteriaType::AccountKnownPet = 96
1035 // CriteriaType::KillCreatureScenario = 208
1037
1038 // CriteriaType::WinBattleground = 1
1039 // CriteriaType::ParticipateInBattleground = 15
1040 // CriteriaType::DieOnMap = 16
1041 // CriteriaType::WinArena = 32
1042 // CriteriaType::ParticipateInArena = 33
1043 // CriteriaType::CompleteChallengeMode = 71
1045
1046 // CriteriaType::CompleteResearchProject = 2
1048
1049 // CriteriaType::FindResearchObject = 4
1050 // CriteriaType::UseGameobject = 68
1051 // CriteriaType::CatchFishInFishingHole = 72
1053
1054 // CriteriaType::SkillRaised = 7
1055 // CriteriaType::AchieveSkillStep = 40
1056 // CriteriaType::LearnSpellFromSkillLine = 75
1057 // CriteriaType::LearnTradeskillSkillLine = 112
1059
1060 // CriteriaType::EarnAchievement = 8
1062
1063 // CriteriaType::CompleteQuestsInZone = 11
1065
1066 // CriteriaType::CurrencyGained = 12
1067 // CriteriaType::ObtainAnyItemWithCurrencyValue = 229
1069
1070 // CriteriaType::DieInInstance = 18
1071 // CriteriaType::RunInstance = 19
1073
1074 // CriteriaType::CompleteInternalCriteria = 21
1076
1077 // CriteriaType::DieFromEnviromentalDamage = 26
1079
1080 // CriteriaType::CompleteQuest = 27
1082
1083 // CriteriaType::BeSpellTarget = 28
1084 // CriteriaType::CastSpell = 29
1085 // CriteriaType::LearnOrKnowSpell = 34
1086 // CriteriaType::GainAura = 69
1087 // CriteriaType::LandTargetedSpellOnTarget = 110
1088 // CriteriaType::MemorizeSpell = 222
1090
1091 // CriteriaType::TrackedWorldStateUIModified = 30
1093
1094 // CriteriaType::PVPKillInArea = 31
1095 // CriteriaType::EnterArea = 163
1096 // CriteriaType::LeaveArea = 164
1097 // CriteriaType::EnterTopLevelArea = 225
1098 // CriteriaType::LeaveTopLevelArea = 226
1100
1101 // CriteriaType::AcquireItem = 36
1102 // CriteriaType::UseItem = 41
1103 // CriteriaType::LootItem = 42
1104 // CriteriaType::EquipItem = 57
1105 // CriteriaType::LearnToy = 185
1106 // CriteriaType::LearnHeirloom = 188
1108
1109 // CriteriaType::EarnTeamArenaRating = 38
1110 // CriteriaType::EarnPersonalArenaRating = 39
1112
1113 // CriteriaType::RevealWorldMapOverlay = 43
1115
1116 // CriteriaType::ReputationGained = 46
1117 // CriteriaType::ParagonLevelIncreaseWithFaction = 206
1119
1120 // CriteriaType::EquipItemInSlot = 49
1121 // CriteriaType::LearnAnyTransmogInSlot = 199
1123
1124 // CriteriaType::RollNeed = 50
1125 // CriteriaType::RollGreed = 51
1126 // CriteriaType::RollDisenchant = 116
1128
1129 // CriteriaType::DeliverKillingBlowToClass = 52
1131
1132 // CriteriaType::DeliverKillingBlowToRace = 53
1134
1135 // CriteriaType::DoEmote = 54
1137
1138 // CriteriaType::CompleteQuestsInSort = 58
1140
1141 // CriteriaType::KilledAllUnitsInSpawnRegion = 64
1143
1144 // CriteriaType::PlayerTriggerGameEvent = 73
1145 // CriteriaType::AnyoneTriggerGameEventScenario = 92
1147
1148 // CriteriaType::DefeatDungeonEncounterWhileElegibleForLoot = 97
1149 // CriteriaType::DefeatDungeonEncounter = 165
1151
1152 // CriteriaType::GetLootByType = 109
1154
1155 // CriteriaType::CompleteGuildChallenge = 138
1157
1158 // CriteriaType::CompleteScenario = 152
1160
1161 // CriteriaType::EnterAreaTriggerWithActionSet = 153
1162 // CriteriaType::LeaveAreaTriggerWithActionSet = 154
1164
1165 // CriteriaType::BattlePetReachLevel = 160
1166 // CriteriaType::ActivelyEarnPetLevel = 162
1168
1169 // CriteriaType::PlaceGarrisonBuilding = 167
1170 // CriteriaType::ActivateGarrisonBuilding = 169
1171 // CriteriaType::LearnGarrisonBlueprint = 179
1173
1174 // CriteriaType::UpgradeGarrison = 170
1176
1177 // CriteriaType::StartAnyGarrisonMissionWithFollowerType = 171
1178 // CriteriaType::SucceedAnyGarrisonMissionWithFollowerType = 173
1180
1181 // CriteriaType::StartGarrisonMission = 172
1182 // CriteriaType::SucceedGarrisonMission = 174
1184
1185 // CriteriaType::RecruitGarrisonFollower = 176
1187
1188 // CriteriaType::LearnGarrisonSpecialization = 181
1190
1191 // CriteriaType::CollectGarrisonShipment = 182
1193
1194 // CriteriaType::LearnTransmog = 192
1196
1197 // CriteriaType::ActivelyReachLevel = 196
1199
1200 // CriteriaType::CompleteResearchGarrisonTalent = 198
1201 // CriteriaType::StartResearchGarrisonTalent = 202
1202 // CriteriaType::SocketGarrisonTalent = 227
1204
1205 // CriteriaType::EarnLicense = 204
1207
1208 // CriteriaType::CollectTransmogSetFromGroup = 205
1210
1211 // CriteriaType::ArtifactPowerRankPurchased = 209
1212 // CriteriaType::ChooseRelicTalent = 211
1214
1215 // CriteriaType::EarnExpansionLevel = 212
1217
1218 // CriteriaType::AccountHonorLevelReached = 213
1220
1221 // CriteriaType::AzeriteLevelReached = 215
1223
1224 // CriteriaType::MythicPlusRatingAttained = 230
1236
1237 EnumFlag<CriteriaFlags> GetFlags() const { return static_cast<CriteriaFlags>(Flags); }
1238};
1239
1241{
1250
1252};
1253
1255{
1265};
1266
1268{
1286 std::array<int32, 2> Flags;
1287
1290
1291 // Helpers
1293 {
1294 return GetFlags().HasFlag(CurrencyTypesFlags::_100_Scaler) ? 100 : 1;
1295 }
1296
1298 {
1299 return MaxEarnablePerWeek || GetFlags().HasFlag(CurrencyTypesFlags::ComputedWeeklyMaximum);
1300 }
1301
1302 bool HasMaxQuantity(bool onLoad = false, bool onUpdateVersion = false) const
1303 {
1304 if (onLoad && GetFlags().HasFlag(CurrencyTypesFlags::IgnoreMaxQtyOnLoad))
1305 return false;
1306
1307 if (onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::UpdateVersionIgnoreMax))
1308 return false;
1309
1310 return MaxQty || MaxQtyWorldStateID || GetFlags().HasFlag(CurrencyTypesFlags::DynamicMaximum);
1311 }
1312
1313 bool HasTotalEarned() const
1314 {
1315 return GetFlagsB().HasFlag(CurrencyTypesFlagsB::UseTotalEarnedForEarned);
1316 }
1317
1318 bool IsAlliance() const
1319 {
1320 return GetFlags().HasFlag(CurrencyTypesFlags::IsAllianceOnly);
1321 }
1322
1323 bool IsHorde() const
1324 {
1325 return GetFlags().HasFlag(CurrencyTypesFlags::IsHordeOnly);
1326 }
1327
1328 bool IsSuppressingChatLog(bool onUpdateVersion = false) const
1329 {
1330 if ((onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::SuppressChatMessageOnVersionChange)) ||
1331 GetFlags().HasFlag(CurrencyTypesFlags::SuppressChatMessages))
1332 return true;
1333
1334 return false;
1335 }
1336
1338 {
1339 return GetFlags().HasFlag(CurrencyTypesFlags::TrackQuantity);
1340 }
1341};
1342
1344{
1348};
1349
1351{
1357};
1358
1360{
1384};
1385
1387{
1402};
1403
1405{
1416};
1417
1419{
1421 std::array<uint16, 21> WeaponSubClassCost;
1422 std::array<uint16, 8> ArmorSubClassCost;
1423};
1424
1426{
1428 float Data;
1429};
1430
1432{
1443};
1444
1446{
1448 char const* Name;
1450};
1451
1453{
1460};
1461
1463{
1476};
1477
1479{
1490};
1491
1493{
1495 std::array<Trinity::RaceMask<int64>, 4> ReputationRaceMask;
1506 std::array<int16, 4> ReputationClassMask;
1507 std::array<uint16, 4> ReputationFlags;
1508 std::array<int32, 4> ReputationBase;
1509 std::array<int32, 4> ReputationMax;
1510 std::array<float, 2> ParentFactionMod; // Faction outputs rep * ParentFactionModOut as spillover reputation
1511 std::array<uint8, 2> ParentFactionCap; // The highest rank the faction will profit from incoming spillover
1512
1513 // helpers
1515 {
1516 return ReputationIndex >= 0;
1517 }
1518};
1519
1520#define MAX_FACTION_RELATIONS 8
1521
1523{
1530 std::array<uint16, MAX_FACTION_RELATIONS> Enemies;
1531 std::array<uint16, MAX_FACTION_RELATIONS> Friend;
1532
1533 //------------------------------------------------------- end structure
1534
1535 // helpers
1536 bool IsFriendlyTo(FactionTemplateEntry const* entry) const
1537 {
1538 if (this == entry)
1539 return true;
1540 if (entry->Faction)
1541 {
1542 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1543 if (Enemies[i] == entry->Faction)
1544 return false;
1545 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1546 if (Friend[i] == entry->Faction)
1547 return true;
1548 }
1549 return (FriendGroup & entry->FactionGroup) || (FactionGroup & entry->FriendGroup);
1550 }
1551 bool IsHostileTo(FactionTemplateEntry const* entry) const
1552 {
1553 if (this == entry)
1554 return false;
1555 if (entry->Faction)
1556 {
1557 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1558 if (Enemies[i] == entry->Faction)
1559 return true;
1560 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1561 if (Friend[i] == entry->Faction)
1562 return false;
1563 }
1564 return (EnemyGroup & entry->FactionGroup) != 0;
1565 }
1566 bool IsHostileToPlayers() const { return (EnemyGroup & FACTION_MASK_PLAYER) !=0; }
1567 bool IsNeutralToAll() const
1568 {
1569 for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
1570 if (Enemies[i] != 0)
1571 return false;
1572 return EnemyGroup == 0 && FriendGroup == 0;
1573 }
1575};
1576
1578{
1584};
1585
1587{
1595
1597};
1598
1600{
1603 std::array<int32, 3> TextureVariationFileID;
1604};
1605
1607{
1615};
1616
1618{
1621 std::array<float, 4> Rot;
1625 float Scale;
1630 std::array<int32, 8> PropValue;
1631};
1632
1634{
1643};
1644
1646{
1672};
1673
1675{
1681};
1682
1684{
1693};
1694
1696{
1731};
1732
1734{
1740};
1741
1743{
1776};
1777
1779{
1781 char const* Name;
1787 std::array<uint32, 2> UpgradeRequirement;
1788};
1789
1791{
1795};
1796
1798{
1800 char const* Name;
1802};
1803
1805{
1816};
1817
1819{
1825};
1826
1828{
1842};
1843
1845{
1849};
1850
1852{
1856};
1857
1859{
1863};
1864
1866{
1872};
1873
1875{
1879};
1880
1882{
1899};
1900
1902{
1907};
1908
1910{
1915};
1916
1918{
1923};
1924
1926{
1929};
1930
1932{
1941 std::array<int32, 6> UpgradeItemID;
1942 std::array<uint16, 6> UpgradeItemBonusListID;
1943};
1944
1945#define MAX_HOLIDAY_DURATIONS 10
1946#define MAX_HOLIDAY_DATES 26
1947#define MAX_HOLIDAY_FLAGS 10
1948
1950{
1959 std::array<uint16, MAX_HOLIDAY_DURATIONS> Duration;
1960 std::array<uint32, MAX_HOLIDAY_DATES> Date; // dates in unix time starting at January, 1, 2000
1961 std::array<uint8, MAX_HOLIDAY_DURATIONS> CalendarFlags;
1962 std::array<int32, 3> TextureFileDataID;
1963};
1964
1966{
1972};
1973
1975{
1977 float Data;
1978};
1979
1981{
1983 float Data;
1984};
1985
1987{
1989 float Data;
1990};
1991
1993{
2006};
2007
2009{
2016};
2017
2019{
2021 std::array<float, 7> Qualitymod;
2022};
2023
2025{
2027 std::array<float, 7> Quality;
2029};
2030
2032{
2035 float Cloth;
2036 float Leather;
2037 float Mail;
2038 float Plate;
2039};
2040
2042{
2045};
2046
2048{
2050 std::array<int32, 4> Value;
2054};
2055
2056// new item upgrade system
2057//struct ItemBonusListGroupEntryEntry
2058//{
2059// uint32 ID;
2060// int32 ItemBonusListGroupID;
2061// int32 ItemBonusListID;
2062// int32 ItemLevelSelectorID;
2063// int32 SequenceValue;
2064// int32 ItemExtendedCostID;
2065// int32 PlayerConditionID;
2066// int32 Flags;
2067// int32 ItemLogicalCostGroupID;
2068//};
2069
2071{
2074};
2075
2076//struct ItemBonusSequenceSpellEntry
2077//{
2078// uint32 ID;
2079// int32 SpellID;
2080// int32 ItemID;
2081//};
2082
2084{
2093};
2094
2096{
2101};
2102
2104{
2110};
2111
2113{
2116};
2117
2119{
2122 std::array<float, 7> Quality;
2123};
2124
2126{
2129 std::array<float, 7> Quality;
2130};
2131
2133{
2136 std::array<float, 7> Quality;
2137};
2138
2140{
2143 std::array<float, 7> Quality;
2144};
2145
2147{
2150 std::array<float, 7> Quality;
2151};
2152
2154{
2163};
2164
2166{
2176};
2177
2178#define MAX_ITEM_EXT_COST_ITEMS 5
2179#define MAX_ITEM_EXT_COST_CURRENCIES 5
2180
2182{
2185 int8 ArenaBracket; // arena slot restrictions (min slot value)
2189 uint8 RequiredAchievement; // required personal arena rating
2190 std::array<int32, MAX_ITEM_EXT_COST_ITEMS> ItemID; // required item id
2191 std::array<uint16, MAX_ITEM_EXT_COST_ITEMS> ItemCount; // required count of 1st item
2192 std::array<uint16, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyID; // required curency id
2193 std::array<uint32, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyCount; // required curency count
2194};
2195
2197{
2202};
2203
2205{
2210};
2211
2213{
2217};
2218
2220{
2225};
2226
2228{
2233};
2234
2236{
2243};
2244
2246{
2253};
2254
2256{
2260};
2261
2263{
2266 float Armor;
2267 float Weapon;
2268};
2269
2271{
2285 std::array<int32, 4> Flags;
2286};
2287
2288#define MAX_ITEM_SET_ITEMS 17
2289
2291{
2297 std::array<uint32, MAX_ITEM_SET_ITEMS> ItemID;
2298};
2299
2301{
2307};
2308
2310{
2327 std::array<float, MAX_ITEM_PROTO_STATS> StatPercentageOfSocket;
2328 std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor;
2338 std::array<int32, MAX_ITEM_PROTO_FLAGS> Flags;
2350 std::array<uint16, MAX_ITEM_PROTO_ZONES> ZoneBound;
2363 std::array<uint8, MAX_ITEM_PROTO_SOCKETS> SocketType;
2369 std::array<int8, MAX_ITEM_PROTO_STATS> StatModifierBonusStat;
2376};
2377
2379{
2387};
2388
2390{
2394};
2395
2397{
2401};
2402
2404{
2408};
2409
2411{
2424};
2425
2427{
2444};
2445
2447{
2458};
2459
2461{
2465};
2466
2467#define KEYCHAIN_SIZE 32
2468
2470{
2472 std::array<uint8, KEYCHAIN_SIZE> Key;
2473};
2474
2476{
2481};
2482
2484{
2486 char const* Word;
2488};
2489
2491{
2497};
2498
2500{
2513 float MinGear;
2530 std::array<int32, 2> Flags;
2531
2532 // Helpers
2533 uint32 Entry() const { return ID + (TypeID << 24); }
2534};
2535
2537{
2543 std::array<uint16, 8> LightParamsID;
2544};
2545
2547{
2549 char const* Name;
2550 std::array<char const*, 6> Texture;
2552 uint8 SoundBank; // used to be "type", maybe needs fixing (works well for now)
2565 std::array<uint8, 6> FrameCountTexture;
2566 std::array<int32, 2> Color;
2567 std::array<float, 18> Float;
2568 std::array<uint32, 4> Int;
2569 std::array<float, 4> Coefficient;
2570};
2571
2572#define MAX_LOCK_CASE 8
2573
2575{
2578 std::array<int32, MAX_LOCK_CASE> Index;
2579 std::array<uint16, MAX_LOCK_CASE> Skill;
2580 std::array<uint8, MAX_LOCK_CASE> Type;
2581 std::array<uint8, MAX_LOCK_CASE> Action;
2582};
2583
2585{
2588};
2589
2591{
2593 char const* Directory;
2599 DBCPosition2D Corpse; // entrance coordinates in ghost mode (in most cases = normal entrance)
2610 int16 CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
2616 std::array<int32, 3> Flags;
2617
2618 // Helpers
2619 uint8 Expansion() const { return ExpansionID; }
2620
2622 bool IsNonRaidDungeon() const { return InstanceType == MAP_INSTANCE; }
2624 bool IsRaid() const { return InstanceType == MAP_RAID; }
2626 bool IsBattleArena() const { return InstanceType == MAP_ARENA; }
2628 bool IsScenario() const { return InstanceType == MAP_SCENARIO; }
2629 bool IsWorldMap() const { return InstanceType == MAP_COMMON; }
2630
2631 bool GetEntrancePos(int32& mapid, float& x, float& y) const
2632 {
2633 if (CorpseMapID < 0)
2634 return false;
2635
2636 mapid = CorpseMapID;
2637 x = Corpse.X;
2638 y = Corpse.Y;
2639 return true;
2640 }
2641
2642 bool IsContinent() const
2643 {
2644 switch (ID)
2645 {
2646 case 0:
2647 case 1:
2648 case 530:
2649 case 571:
2650 case 870:
2651 case 1116:
2652 case 1220:
2653 case 1642:
2654 case 1643:
2655 case 2222:
2656 case 2444:
2657 return true;
2658 default:
2659 return false;
2660 }
2661 }
2662
2663 bool IsDynamicDifficultyMap() const { return GetFlags().HasFlag(MapFlags::DynamicDifficulty); }
2664 bool IsFlexLocking() const { return GetFlags().HasFlag(MapFlags::FlexibleRaidLocking); }
2665 bool IsGarrison() const { return GetFlags().HasFlag(MapFlags::Garrison); }
2666 bool IsSplitByFaction() const { return ID == 609 || ID == 2175 || ID == 2570; }
2667
2668 EnumFlag<MapFlags> GetFlags() const { return static_cast<MapFlags>(Flags[0]); }
2669 EnumFlag<MapFlags2> GetFlags2() const { return static_cast<MapFlags2>(Flags[1]); }
2670};
2671
2673{
2680 std::array<int16, 3> CriteriaCount;
2681};
2682
2684{
2686 LocalizedString Message; // m_message_lang (text showed when transfer to map failed)
2696
2698 bool IsUsingEncounterLocks() const { return GetFlags().HasFlag(MapDifficultyFlags::UseLootBasedLockInsteadOfInstanceLock); }
2699 bool IsRestoringDungeonState() const { return GetFlags().HasFlag(MapDifficultyFlags::ResumeDungeonProgressBasedOnLockout); }
2700 bool IsExtendable() const { return !GetFlags().HasFlag(MapDifficultyFlags::DisableLockExtension); }
2701
2703 {
2705 return 86400;
2707 return 604800;
2708 return 0;
2709 }
2710
2712};
2713
2715{
2721};
2722
2724{
2728};
2729
2731{
2740};
2741
2743{
2757
2758 bool IsSelfMount() const { return (Flags & MOUNT_FLAG_SELF_MOUNT) != 0; }
2759};
2760
2762{
2773};
2774
2776{
2781};
2782
2784{
2789};
2790
2792{
2798};
2799
2801{
2803 char const* Name;
2806};
2807
2809{
2811 char const* Name;
2813};
2814
2816{
2818 char const* Name;
2819};
2820
2822{
2824 char const* Name;
2826};
2827
2829{
2834};
2835
2836#define MAX_OVERRIDE_SPELL 10
2837
2839{
2841 std::array<int32, MAX_OVERRIDE_SPELL> Spells;
2844};
2845
2847{
2852};
2853
2855{
2858
2860};
2861
2863{
2867};
2868
2870{
2929 std::array<uint16, 4> SkillID;
2930 std::array<uint16, 4> MinSkill;
2931 std::array<uint16, 4> MaxSkill;
2932 std::array<uint32, 3> MinFactionID;
2933 std::array<uint8, 3> MinReputation;
2934 std::array<int32, 4> PrevQuestID;
2935 std::array<int32, 4> CurrQuestID;
2936 std::array<int32, 4> CurrentCompletedQuestID;
2937 std::array<int32, 4> SpellID;
2938 std::array<int32, 4> ItemID;
2939 std::array<uint32, 4> ItemCount;
2940 std::array<uint16, 2> Explored;
2941 std::array<uint32, 2> Time;
2942 std::array<int32, 4> AuraSpellID;
2943 std::array<uint8, 4> AuraStacks;
2944 std::array<uint16, 4> Achievement;
2945 std::array<uint16, 4> AreaID;
2946 std::array<uint8, 4> LfgStatus;
2947 std::array<uint8, 4> LfgCompare;
2948 std::array<uint32, 4> LfgValue;
2949 std::array<uint32, 4> CurrencyID;
2950 std::array<uint32, 4> CurrencyCount;
2951 std::array<uint32, 6> QuestKillMonster;
2952 std::array<int32, 2> MovementFlags;
2953 std::array<int32, 4> TraitNodeEntryID;
2954 std::array<uint16, 4> TraitNodeEntryMinRank;
2955 std::array<uint16, 4> TraitNodeEntryMaxRank;
2956};
2957
2959{
2966};
2967
2969{
2983};
2984
2986{
2993
2994 bool IsDisabled() const { return (Flags & PRESTIGE_FLAG_DISABLED) != 0; }
2995};
2996
2998{
3004
3005 // helpers
3007};
3008
3010{
3014};
3015
3017{
3028};
3029
3031{
3034};
3035
3037{
3043};
3044
3046{
3056};
3057
3059{
3061 std::array<int16, 10> Difficulty;
3062};
3063
3065{
3071};
3072
3074{
3080};
3081
3083{
3085 std::array<uint32, 10> Difficulty;
3086};
3087
3089{
3095};
3096
3098{
3102};
3103
3105{
3109};
3110
3112{
3114 std::array<uint16, 10> Difficulty;
3115};
3116
3118{
3124 std::array<float, 5> EpicF;
3125 std::array<float, 5> SuperiorF;
3126 std::array<float, 5> GoodF;
3127 std::array<uint32, 5> Epic;
3128 std::array<uint32, 5> Superior;
3129 std::array<uint32, 5> Good;
3130};
3131
3133{
3141};
3142
3144{
3149};
3150
3152{
3157};
3158
3160{
3167};
3168
3170{
3177 int32 RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
3178 uint16 Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
3183
3184 // helpers
3185 bool IsBonusObjective() const
3186 {
3188 }
3189};
3190
3192{
3197};
3198
3200{
3202 char const* Name;
3203 char const* Script;
3204};
3205
3207{
3209 char const* Name;
3211};
3212
3214{
3216 char const* Name;
3217 char const* Script;
3218};
3219
3221{
3237
3238 EnumFlag<SkillLineFlags> GetFlags() const { return static_cast<SkillLineFlags>(Flags); }
3239};
3240
3242{
3260
3262};
3263
3265{
3270};
3271
3273{
3282};
3283
3285{