TrinityCore
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 int32 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 int32 HiddenBeforeDisplaySeason; // hidden in UI before this DisplaySeason is active
48 int32 LegacyAfterTimeEvent; // category changes clientside to Legacy after this TimeEvent is passed
49};
50
52{
57};
58
60{
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 EnumFlag<AreaFlags> GetFlags() const { return static_cast<AreaFlags>(Flags[0]); }
154 EnumFlag<AreaFlags2> GetFlags2() const { return static_cast<AreaFlags2>(Flags[1]); }
156
157 bool IsSanctuary() const
158 {
159 return GetFlags().HasFlag(AreaFlags::NoPvP);
160 }
161};
162
164{
171 float Radius;
173 float BoxWidth;
175 float BoxYaw;
180
182};
183
185{
188
190};
191
193{
199 float Modifier;
200};
201
203{
215};
216
218{
235};
236
238{
248};
249
251{
255};
256
258{
266};
267
269{
273};
274
276{
279};
280
282{
289};
290
292{
294 std::array<uint32, 10> Difficulty;
295};
296
298{
305};
306
308{
315};
316
318{
321 uint16 FactionID; // id of faction.dbc for player factions associated with city
324};
325
327{
332};
333
335{
340};
341
343{
353};
354
356{
359};
360
362{
368};
369
371{
374};
375
377{
382};
383
385{
391};
392
394{
401};
402
404{
410};
411
413{
416};
417
419{
426};
427
429{
432};
433
435{
437 char const* Name;
438 char const* Version;
440};
441
443{
447 uint8 Type; // value 0 -> hair, value 2 -> facialhair
451 uint8 Data; // real ID to hair/facial hair
452};
453
455{
464};
465
467{
472};
473
475{
480};
481
483{
496
498};
499
501{
506};
507
509{
527
529};
530
532{
536};
537
538#define MAX_BROADCAST_TEXT_EMOTES 3
539
541{
551 std::array<uint32, 2> SoundKitID;
552 std::array<uint16, MAX_BROADCAST_TEXT_EMOTES> EmoteID;
553 std::array<uint16, MAX_BROADCAST_TEXT_EMOTES> EmoteDelay;
554};
555
557{
562};
563
565{
573
577};
578
580{
582 char const* Tag;
584 uint32 Raidorigin; // Date of first raid reset, all other resets are calculated as this date plus interval
587};
588
590{
597};
598
600{
605};
606
608{
614};
615
617{
623
624 bool IsForNewCharacter() const { return Purpose == 9; }
625};
626
628{
632};
633
635{
642
644 ChatChannelRuleset GetRuleset() const { return static_cast<ChatChannelRuleset>(Ruleset); }
645};
646
648{
653};
654
656{
658 char const* Filename;
661 char const* PetNameToken;
696};
697
699{
703};
704
706{
717 std::array<int32, 2> SwatchColor;
718};
719
721{
728};
729
731{
746};
747
749{
765};
766
768{
776 int32 OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
778
780};
781
783{
787};
788
790{
791 std::array<float, 3> FaceCustomizationOffset;
792 std::array<float, 3> CustomizeOffset;
806 float BarberShopCameraHeightOffsetScale; // applied after BarberShopCameraOffsetScale
808};
809
811{
817};
818
820{
822 char const* ClientPrefix;
823 char const* ClientFileString;
850 std::array<int32, 3> AlteredFormStartVisualKitID;
851 std::array<int32, 3> AlteredFormFinishVisualKitID;
865 std::array<float, 3> Unknown910_1;
866 std::array<float, 3> Unknown910_2;
874
875 EnumFlag<ChrRacesFlag> GetFlags() const { return static_cast<ChrRacesFlag>(Flags); }
876};
877
878#define MAX_MASTERY_SPELLS 2
879
881{
894 std::array<int32, MAX_MASTERY_SPELLS> MasterySpellID;
895
897 ChrSpecializationRole GetRole() const { return static_cast<ChrSpecializationRole>(Role); }
898
900 {
901 return ClassID == 0;
902 }
903};
904
906{
908 DBCPosition3D Origin; // Position in map used for basis for M2 co-ordinates
909 uint32 SoundID; // Sound ID (voiceover for cinematic)
910 float OriginFacing; // Orientation in map used for basis for M2 co
913};
914
916{
919 std::array<uint16, 8> Camera;
920};
921
923{
930};
931
933{
939};
940
942{
958
960
962 {
964 if (flags.HasFlag(ContentTuningFlag::Horde))
965 return 5;
966
968 return 3;
969
970 return 0;
971 }
972};
973
975{
981};
982
984{
988};
989
991{
1002};
1003
1005{
1011};
1012
1013//struct CreatureDifficultyEntry
1014//{
1015// uint32 ID;
1016// int32 LevelDeltaMin;
1017// int32 LevelDeltaMax;
1018// uint16 FactionID;
1019// int32 ContentTuningID;
1020// int32 Flags[8];
1021// uint32 CreatureID;
1022//};
1023
1025{
1043 float PetInstanceScale; // scale of not own player pets inside dungeons/raids/scenarios
1053 std::array<int32, 4> TextureVariationFileDataID;
1054};
1055
1057{
1065};
1066
1068{
1078 std::array<int16, 2> SkillLine;
1079};
1080
1082{
1084 std::array<float, 6> GeoBox;
1117 std::array<float, 2> MountScaleOther;
1118
1120};
1121
1123{
1127};
1128
1130{
1134 {
1136 // CriteriaType::KillCreature = 0
1137 // CriteriaType::KilledByCreature = 20
1138 // CriteriaType::AccountKnownPet = 96
1139 // CriteriaType::KillCreatureScenario = 208
1141
1142 // CriteriaType::WinBattleground = 1
1143 // CriteriaType::ParticipateInBattleground = 15
1144 // CriteriaType::DieOnMap = 16
1145 // CriteriaType::WinArena = 32
1146 // CriteriaType::ParticipateInArena = 33
1147 // CriteriaType::CompleteChallengeMode = 71
1149
1150 // CriteriaType::CompleteResearchProject = 2
1152
1153 // CriteriaType::FindResearchObject = 4
1154 // CriteriaType::UseGameobject = 68
1155 // CriteriaType::CatchFishInFishingHole = 72
1157
1158 // CriteriaType::SkillRaised = 7
1159 // CriteriaType::AchieveSkillStep = 40
1160 // CriteriaType::LearnSpellFromSkillLine = 75
1161 // CriteriaType::LearnTradeskillSkillLine = 112
1163
1164 // CriteriaType::EarnAchievement = 8
1166
1167 // CriteriaType::CompleteQuestsInZone = 11
1168 // CriteriaType::EnterTopLevelArea = 225
1169 // CriteriaType::LeaveTopLevelArea = 226
1171
1172 // CriteriaType::CurrencyGained = 12
1173 // CriteriaType::ObtainAnyItemWithCurrencyValue = 229
1175
1176 // CriteriaType::DieInInstance = 18
1177 // CriteriaType::RunInstance = 19
1179
1180 // CriteriaType::CompleteInternalCriteria = 21
1182
1183 // CriteriaType::DieFromEnviromentalDamage = 26
1185
1186 // CriteriaType::CompleteQuest = 27
1188
1189 // CriteriaType::BeSpellTarget = 28
1190 // CriteriaType::CastSpell = 29
1191 // CriteriaType::LearnOrKnowSpell = 34
1192 // CriteriaType::GainAura = 69
1193 // CriteriaType::LandTargetedSpellOnTarget = 110
1194 // CriteriaType::MemorizeSpell = 222
1196
1197 // CriteriaType::TrackedWorldStateUIModified = 30
1199
1200 // CriteriaType::PVPKillInArea = 31
1201 // CriteriaType::EnterArea = 163
1202 // CriteriaType::LeaveArea = 164
1204
1205 // CriteriaType::AcquireItem = 36
1206 // CriteriaType::UseItem = 41
1207 // CriteriaType::LootItem = 42
1208 // CriteriaType::EquipItem = 57
1209 // CriteriaType::LearnToy = 185
1210 // CriteriaType::LearnHeirloom = 188
1212
1213 // CriteriaType::EarnTeamArenaRating = 38
1214 // CriteriaType::EarnPersonalArenaRating = 39
1216
1217 // CriteriaType::RevealWorldMapOverlay = 43
1219
1220 // CriteriaType::ReputationGained = 46
1221 // CriteriaType::ParagonLevelIncreaseWithFaction = 206
1223
1224 // CriteriaType::EquipItemInSlot = 49
1225 // CriteriaType::LearnAnyTransmogInSlot = 199
1227
1228 // CriteriaType::RollNeed = 50
1229 // CriteriaType::RollGreed = 51
1230 // CriteriaType::RollDisenchant = 116
1232
1233 // CriteriaType::DeliverKillingBlowToClass = 52
1235
1236 // CriteriaType::DeliverKillingBlowToRace = 53
1238
1239 // CriteriaType::DoEmote = 54
1241
1242 // CriteriaType::CompleteQuestsInSort = 58
1244
1245 // CriteriaType::KilledAllUnitsInSpawnRegion = 64
1247
1248 // CriteriaType::PlayerTriggerGameEvent = 73
1249 // CriteriaType::AnyoneTriggerGameEventScenario = 92
1251
1252 // CriteriaType::DefeatDungeonEncounterWhileElegibleForLoot = 97
1253 // CriteriaType::DefeatDungeonEncounter = 165
1255
1256 // CriteriaType::GetLootByType = 109
1258
1259 // CriteriaType::CompleteGuildChallenge = 138
1261
1262 // CriteriaType::CompleteScenario = 152
1264
1265 // CriteriaType::EnterAreaTriggerWithActionSet = 153
1266 // CriteriaType::LeaveAreaTriggerWithActionSet = 154
1268
1269 // CriteriaType::BattlePetReachLevel = 160
1270 // CriteriaType::ActivelyEarnPetLevel = 162
1272
1273 // CriteriaType::PlaceGarrisonBuilding = 167
1274 // CriteriaType::ActivateGarrisonBuilding = 169
1275 // CriteriaType::LearnGarrisonBlueprint = 179
1277
1278 // CriteriaType::UpgradeGarrison = 170
1280
1281 // CriteriaType::StartAnyGarrisonMissionWithFollowerType = 171
1282 // CriteriaType::SucceedAnyGarrisonMissionWithFollowerType = 173
1284
1285 // CriteriaType::StartGarrisonMission = 172
1286 // CriteriaType::SucceedGarrisonMission = 174
1288
1289 // CriteriaType::RecruitGarrisonFollower = 176
1291
1292 // CriteriaType::LearnGarrisonSpecialization = 181
1294
1295 // CriteriaType::CollectGarrisonShipment = 182
1297
1298 // CriteriaType::LearnTransmog = 192
1300
1301 // CriteriaType::ActivelyReachLevel = 196
1303
1304 // CriteriaType::CompleteResearchGarrisonTalent = 198
1305 // CriteriaType::StartResearchGarrisonTalent = 202
1306 // CriteriaType::SocketGarrisonTalent = 227
1308
1309 // CriteriaType::EarnLicense = 204
1311
1312 // CriteriaType::CollectTransmogSetFromGroup = 205
1314
1315 // CriteriaType::ArtifactPowerRankPurchased = 209
1316 // CriteriaType::ChooseRelicTalent = 211
1318
1319 // CriteriaType::EarnExpansionLevel = 212
1321
1322 // CriteriaType::AccountHonorLevelReached = 213
1324
1325 // CriteriaType::AzeriteLevelReached = 215
1327
1328 // CriteriaType::MythicPlusRatingAttained = 230
1340
1341 EnumFlag<CriteriaFlags> GetFlags() const { return static_cast<CriteriaFlags>(Flags); }
1342};
1343
1345{
1354
1356};
1357
1359{
1369};
1370
1372{
1391 std::array<int32, 2> Flags;
1392
1395
1396 // Helpers
1398 {
1399 return GetFlags().HasFlag(CurrencyTypesFlags::_100_Scaler) ? 100 : 1;
1400 }
1401
1403 {
1405 }
1406
1407 bool HasMaxQuantity(bool onLoad = false, bool onUpdateVersion = false) const
1408 {
1409 if (onLoad && GetFlags().HasFlag(CurrencyTypesFlags::IgnoreMaxQtyOnLoad))
1410 return false;
1411
1412 if (onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::UpdateVersionIgnoreMax))
1413 return false;
1414
1416 }
1417
1418 bool HasTotalEarned() const
1419 {
1421 }
1422
1423 bool IsAlliance() const
1424 {
1426 }
1427
1428 bool IsHorde() const
1429 {
1430 return GetFlags().HasFlag(CurrencyTypesFlags::IsHordeOnly);
1431 }
1432
1433 bool IsSuppressingChatLog(bool onUpdateVersion = false) const
1434 {
1435 if ((onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::SuppressChatMessageOnVersionChange)) ||
1437 return true;
1438
1439 return false;
1440 }
1441
1443 {
1445 }
1446};
1447
1449{
1453};
1454
1456{
1462};
1463
1465{
1489};
1490
1492{
1507};
1508
1510{
1521};
1522
1524{
1526 std::array<uint16, 21> WeaponSubClassCost;
1527 std::array<uint16, 8> ArmorSubClassCost;
1528};
1529
1531{
1533 float Data;
1534};
1535
1537{
1548};
1549
1551{
1553 char const* Name;
1555};
1556
1558{
1565};
1566
1568{
1581};
1582
1584{
1595};
1596
1598{
1600 std::array<Trinity::RaceMask<int64>, 4> ReputationRaceMask;
1611 std::array<int16, 4> ReputationClassMask;
1612 std::array<uint16, 4> ReputationFlags;
1613 std::array<int32, 4> ReputationBase;
1614 std::array<int32, 4> ReputationMax;
1615 std::array<float, 2> ParentFactionMod; // Faction outputs rep * ParentFactionModOut as spillover reputation
1616 std::array<uint8, 2> ParentFactionCap; // The highest rank the faction will profit from incoming spillover
1617
1618 // helpers
1620 {
1621 return ReputationIndex >= 0;
1622 }
1623};
1624
1625#define MAX_FACTION_RELATIONS 8
1626
1628{
1635 std::array<uint16, MAX_FACTION_RELATIONS> Enemies;
1636 std::array<uint16, MAX_FACTION_RELATIONS> Friend;
1637
1638 //------------------------------------------------------- end structure
1639
1640 // helpers
1641 bool IsFriendlyTo(FactionTemplateEntry const* entry) const
1642 {
1643 if (this == entry)
1644 return true;
1645 if (entry->Faction)
1646 {
1647 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1648 if (Enemies[i] == entry->Faction)
1649 return false;
1650 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1651 if (Friend[i] == entry->Faction)
1652 return true;
1653 }
1654 return (FriendGroup & entry->FactionGroup) || (FactionGroup & entry->FriendGroup);
1655 }
1656 bool IsHostileTo(FactionTemplateEntry const* entry) const
1657 {
1658 if (this == entry)
1659 return false;
1660 if (entry->Faction)
1661 {
1662 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1663 if (Enemies[i] == entry->Faction)
1664 return true;
1665 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1666 if (Friend[i] == entry->Faction)
1667 return false;
1668 }
1669 return (EnemyGroup & entry->FactionGroup) != 0;
1670 }
1671 bool IsHostileToPlayers() const { return (EnemyGroup & FACTION_MASK_PLAYER) !=0; }
1672 bool IsNeutralToAll() const
1673 {
1674 for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
1675 if (Enemies[i] != 0)
1676 return false;
1677 return EnemyGroup == 0 && FriendGroup == 0;
1678 }
1680};
1681
1683{
1689};
1690
1692{
1700
1702};
1703
1705{
1708 std::array<int32, 3> TextureVariationFileID;
1709};
1710
1712{
1724};
1725
1727{
1730 std::array<float, 4> Rot;
1734 float Scale;
1740 std::array<int32, 8> PropValue;
1741};
1742
1744{
1753};
1754
1756{
1782};
1783
1785{
1791};
1792
1794{
1803};
1804
1806{
1841};
1842
1844{
1850};
1851
1853{
1886};
1887
1889{
1891 char const* Name;
1897 std::array<uint32, 2> UpgradeRequirement;
1898};
1899
1901{
1905};
1906
1908{
1910 char const* Name;
1912};
1913
1915{
1926};
1927
1929{
1935};
1936
1938{
1952};
1953
1955{
1959};
1960
1962{
1966};
1967
1969{
1973};
1974
1976{
1982};
1983
1985{
1989};
1990
1992{
2009};
2010
2012{
2017};
2018
2020{
2025};
2026
2028{
2033};
2034
2036{
2039};
2040
2042{
2051 std::array<int32, 6> UpgradeItemID;
2052 std::array<uint16, 6> UpgradeItemBonusListID;
2053};
2054
2055#define MAX_HOLIDAY_DURATIONS 10
2056#define MAX_HOLIDAY_DATES 26
2057#define MAX_HOLIDAY_FLAGS 10
2058
2060{
2069 std::array<uint16, MAX_HOLIDAY_DURATIONS> Duration;
2070 std::array<uint32, MAX_HOLIDAY_DATES> Date; // dates in unix time starting at January, 1, 2000
2071 std::array<uint8, MAX_HOLIDAY_DURATIONS> CalendarFlags;
2072 std::array<int32, 3> TextureFileDataID;
2073};
2074
2076{
2082};
2083
2085{
2087 float Data;
2088};
2089
2091{
2093 float Data;
2094};
2095
2097{
2099 float Data;
2100};
2101
2103{
2116};
2117
2119{
2126};
2127
2129{
2131 std::array<float, 7> Qualitymod;
2132};
2133
2135{
2137 std::array<float, 7> Quality;
2139};
2140
2142{
2145 float Cloth;
2146 float Leather;
2147 float Mail;
2148 float Plate;
2149};
2150
2152{
2155};
2156
2158{
2160 std::array<int32, 4> Value;
2164};
2165
2166// new item upgrade system
2168{
2178};
2179
2181{
2184};
2185
2186//struct ItemBonusSequenceSpellEntry
2187//{
2188// uint32 ID;
2189// int32 SpellID;
2190// int32 ItemID;
2191//};
2192
2194{
2198};
2199
2201{
2212};
2213
2215{
2220};
2221
2223{
2229};
2230
2232{
2241};
2242
2244{
2247};
2248
2250{
2253 std::array<float, 7> Quality;
2254};
2255
2257{
2260 std::array<float, 7> Quality;
2261};
2262
2264{
2267 std::array<float, 7> Quality;
2268};
2269
2271{
2274 std::array<float, 7> Quality;
2275};
2276
2278{
2281 std::array<float, 7> Quality;
2282};
2283
2285{
2294};
2295
2297{
2307};
2308
2309#define MAX_ITEM_EXT_COST_ITEMS 5
2310#define MAX_ITEM_EXT_COST_CURRENCIES 5
2311
2313{
2316 int8 ArenaBracket; // arena slot restrictions (min slot value)
2320 uint8 RequiredAchievement; // required personal arena rating
2321 std::array<int32, MAX_ITEM_EXT_COST_ITEMS> ItemID; // required item id
2322 std::array<uint16, MAX_ITEM_EXT_COST_ITEMS> ItemCount; // required count of 1st item
2323 std::array<uint16, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyID; // required curency id
2324 std::array<uint32, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyCount; // required curency count
2325};
2326
2328{
2333};
2334
2336{
2341};
2342
2344{
2348};
2349
2351{
2356};
2357
2359{
2364};
2365
2367{
2375};
2376
2378{
2385};
2386
2388{
2392};
2393
2395{
2398 float Armor;
2399 float Weapon;
2400};
2401
2403{
2417 std::array<int32, 5> Flags;
2418};
2419
2420#define MAX_ITEM_SET_ITEMS 17
2421
2423{
2429 std::array<uint32, MAX_ITEM_SET_ITEMS> ItemID;
2430};
2431
2433{
2439};
2440
2442{
2459 std::array<float, MAX_ITEM_PROTO_STATS> StatPercentageOfSocket;
2460 std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor;
2461 std::array<int32, MAX_ITEM_PROTO_STATS> StatModifierBonusStat;
2471 std::array<int32, MAX_ITEM_PROTO_FLAGS> Flags;
2483 std::array<uint16, MAX_ITEM_PROTO_ZONES> ZoneBound;
2496 std::array<uint8, MAX_ITEM_PROTO_SOCKETS> SocketType;
2508};
2509
2511{
2519};
2520
2522{
2526};
2527
2529{
2533};
2534
2536{
2540};
2541
2543{
2556};
2557
2559{
2576};
2577
2579{
2590};
2591
2593{
2598};
2599
2600#define KEYCHAIN_SIZE 32
2601
2603{
2605 std::array<uint8, KEYCHAIN_SIZE> Key;
2606};
2607
2609{
2614};
2615
2617{
2619 char const* Word;
2621};
2622
2624{
2631};
2632
2634{
2647 float MinGear;
2664 std::array<int32, 2> Flags;
2665
2666 // Helpers
2667 uint32 Entry() const { return ID + (TypeID << 24); }
2668};
2669
2671{
2677 std::array<uint16, 8> LightParamsID;
2678};
2679
2681{
2683 char const* Name;
2684 std::array<char const*, 6> Texture;
2686 uint8 SoundBank; // used to be "type", maybe needs fixing (works well for now)
2699 std::array<uint8, 6> FrameCountTexture;
2700 std::array<int32, 2> Color;
2701 std::array<float, 18> Float;
2702 std::array<uint32, 4> Int;
2703 std::array<float, 4> Coefficient;
2704};
2705
2707{
2710 std::array<float, 3> Rot;
2711};
2712
2713#define MAX_LOCK_CASE 8
2714
2716{
2719 std::array<int32, MAX_LOCK_CASE> Index;
2720 std::array<uint16, MAX_LOCK_CASE> Skill;
2721 std::array<uint8, MAX_LOCK_CASE> Type;
2722 std::array<uint8, MAX_LOCK_CASE> Action;
2723};
2724
2726{
2729};
2730
2732{
2734 char const* Directory;
2740 DBCPosition2D Corpse; // entrance coordinates in ghost mode (in most cases = normal entrance)
2751 int16 CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
2758 std::array<int32, 3> Flags;
2759
2760 // Helpers
2761 uint8 Expansion() const { return ExpansionID; }
2762
2764 bool IsNonRaidDungeon() const { return InstanceType == MAP_INSTANCE; }
2766 bool IsRaid() const { return InstanceType == MAP_RAID; }
2768 bool IsBattleArena() const { return InstanceType == MAP_ARENA; }
2770 bool IsScenario() const { return InstanceType == MAP_SCENARIO; }
2771 bool IsWorldMap() const { return InstanceType == MAP_COMMON; }
2772
2773 bool GetEntrancePos(int32& mapid, float& x, float& y) const
2774 {
2775 if (CorpseMapID < 0)
2776 return false;
2777
2778 mapid = CorpseMapID;
2779 x = Corpse.X;
2780 y = Corpse.Y;
2781 return true;
2782 }
2783
2784 bool IsContinent() const
2785 {
2786 switch (ID)
2787 {
2788 case 0:
2789 case 1:
2790 case 530:
2791 case 571:
2792 case 870:
2793 case 1116:
2794 case 1220:
2795 case 1642:
2796 case 1643:
2797 case 2222:
2798 case 2444:
2799 return true;
2800 default:
2801 return false;
2802 }
2803 }
2804
2806 bool IsFlexLocking() const { return GetFlags().HasFlag(MapFlags::FlexibleRaidLocking); }
2807 bool IsGarrison() const { return GetFlags().HasFlag(MapFlags::Garrison); }
2808 bool IsSplitByFaction() const
2809 {
2810 return ID == 609 || // Acherus (DeathKnight Start)
2811 ID == 1265 || // Assault on the Dark Portal (WoD Intro)
2812 ID == 1481 || // Mardum (DH Start)
2813 ID == 2175 || // Exiles Reach - NPE
2814 ID == 2570; // Forbidden Reach (Dracthyr/Evoker Start)
2815 }
2816
2817 EnumFlag<MapFlags> GetFlags() const { return static_cast<MapFlags>(Flags[0]); }
2818 EnumFlag<MapFlags2> GetFlags2() const { return static_cast<MapFlags2>(Flags[1]); }
2819};
2820
2822{
2829 std::array<int16, 3> CriteriaCount;
2830};
2831
2833{
2835 LocalizedString Message; // m_message_lang (text showed when transfer to map failed)
2846
2851
2853 {
2855 return 86400;
2857 return 604800;
2858 return 0;
2859 }
2860
2862};
2863
2865{
2871};
2872
2874{
2878};
2879
2881{
2890};
2891
2893{
2907
2908 bool IsSelfMount() const { return (Flags & MOUNT_FLAG_SELF_MOUNT) != 0; }
2909};
2910
2912{
2923};
2924
2926{
2931};
2932
2934{
2940};
2941
2943{
2950};
2951
2953{
2959};
2960
2962{
2964 char const* Name;
2967};
2968
2970{
2972 char const* Name;
2974};
2975
2977{
2979 char const* Name;
2980};
2981
2983{
2985 char const* Name;
2987};
2988
2990{
2995};
2996
2997#define MAX_OVERRIDE_SPELL 10
2998
3000{
3002 std::array<int32, MAX_OVERRIDE_SPELL> Spells;
3005};
3006
3008{
3013};
3014
3016{
3025};
3026
3028{
3033};
3034
3036{
3041
3043};
3044
3046{
3049
3051};
3052
3054{
3058};
3059
3061{
3120 std::array<uint16, 4> SkillID;
3121 std::array<uint16, 4> MinSkill;
3122 std::array<uint16, 4> MaxSkill;
3123 std::array<uint32, 3> MinFactionID;
3124 std::array<uint8, 3> MinReputation;
3125 std::array<int32, 4> PrevQuestID;
3126 std::array<int32, 4> CurrQuestID;
3127 std::array<int32, 4> CurrentCompletedQuestID;
3128 std::array<int32, 4> SpellID;
3129 std::array<int32, 4> ItemID;
3130 std::array<uint32, 4> ItemCount;
3131 std::array<uint16, 2> Explored;
3132 std::array<uint32, 2> Time;
3133 std::array<int32, 4> AuraSpellID;
3134 std::array<uint8, 4> AuraStacks;
3135 std::array<uint16, 4> Achievement;
3136 std::array<uint16, 4> AreaID;
3137 std::array<uint8, 4> LfgStatus;
3138 std::array<uint8, 4> LfgCompare;
3139 std::array<uint32, 4> LfgValue;
3140 std::array<uint32, 4> CurrencyID;
3141 std::array<uint32, 4> CurrencyCount;
3142 std::array<uint32, 6> QuestKillMonster;
3143 std::array<int32, 2> MovementFlags;
3144 std::array<int32, 4> TraitNodeEntryID;
3145 std::array<uint16, 4> TraitNodeEntryMinRank;
3146 std::array<uint16, 4> TraitNodeEntryMaxRank;
3147};
3148
3150{
3157};
3158
3160{
3174
3175 EnumFlag<PowerTypeFlags> GetFlags() const { return static_cast<PowerTypeFlags>(Flags); }
3176};
3177
3179{
3186
3187 bool IsDisabled() const { return (Flags & PRESTIGE_FLAG_DISABLED) != 0; }
3188};
3189
3191{
3197
3198 // helpers
3200};
3201
3203{
3207};
3208
3210{
3214};
3215
3217{
3222};
3223
3225{
3236};
3237
3239{
3242};
3243
3245{
3251};
3252
3254{
3264};
3265
3267{
3269 std::array<int16, 10> Difficulty;
3270};
3271
3273{
3279};
3280
3282{
3288};
3289
3291{
3293 std::array<uint32, 10> Difficulty;
3294};
3295
3297{
3303};
3304
3306{
3311};
3312
3314{
3318};
3319
3321{
3323 std::array<uint16, 10> Difficulty;
3324};
3325
3327{
3333 std::array<float, 5> EpicF;
3334 std::array<float, 5> SuperiorF;
3335 std::array<float, 5> GoodF;
3336 std::array<uint32, 5> Epic;
3337 std::array<uint32, 5> Superior;
3338 std::array<uint32, 5> Good;
3339};
3340
3342{
3350};
3351
3353{
3358};
3359
3361{
3366};
3367
3369{
3376};
3377
3379{
3386 int32 RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
3387 uint16 Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
3392
3393 // helpers
3394 bool IsBonusObjective() const
3395 {
3397 }
3398};
3399
3401{
3406};
3407
3409{
3411 char const* Name;
3412 char const* Script;
3413};
3414
3416{
3418 char const* Name;
3420};
3421
3423{
3425 char const* Name;
3426 char const* Script;
3427};
3428
3430{
3433};
3434
3436{
3452
3453 EnumFlag<SkillLineFlags> GetFlags() const { return static_cast<SkillLineFlags>(Flags); }
3454};
3455
3457{