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 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 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};
181
183{
189 float Modifier;
190};
191
193{
205};
206
208{
225};
226
228{
238};
239
241{
245};
246
248{
256};
257
259{
263};
264
266{
269};
270
272{
279};
280
282{
284 std::array<uint32, 10> Difficulty;
285};
286
288{
295};
296
298{
305};
306
308{
311 uint16 FactionID; // id of faction.dbc for player factions associated with city
314};
315
317{
322};
323
325{
330};
331
333{
343};
344
346{
349};
350
352{
358};
359
361{
364};
365
367{
372};
373
375{
381};
382
384{
391};
392
394{
400};
401
403{
406};
407
409{
416};
417
419{
422};
423
425{
427 char const* Name;
428 char const* Version;
430};
431
433{
437 uint8 Type; // value 0 -> hair, value 2 -> facialhair
441 uint8 Data; // real ID to hair/facial hair
442};
443
445{
454};
455
457{
462};
463
465{
470};
471
473{
486
488};
489
491{
496};
497
499{
517 std::array<int16, 16> MapID;
518
520};
521
522#define MAX_BROADCAST_TEXT_EMOTES 3
523
525{
535 std::array<uint32, 2> SoundKitID;
536 std::array<uint16, MAX_BROADCAST_TEXT_EMOTES> EmoteID;
537 std::array<uint16, MAX_BROADCAST_TEXT_EMOTES> EmoteDelay;
538};
539
541{
546};
547
549{
557
561};
562
564{
566 char const* Tag;
568 uint32 Raidorigin; // Date of first raid reset, all other resets are calculated as this date plus interval
571};
572
574{
583};
584
586{
592};
593
595{
601
602 bool IsForNewCharacter() const { return Purpose == 9; }
603};
604
606{
610};
611
613{
620
622 ChatChannelRuleset GetRuleset() const { return static_cast<ChatChannelRuleset>(Ruleset); }
623};
624
626{
631};
632
634{
636 char const* Filename;
639 char const* PetNameToken;
674};
675
677{
681};
682
684{
695 std::array<int32, 2> SwatchColor;
696};
697
699{
706};
707
709{
724};
725
727{
741};
742
744{
752 int32 OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
754
756};
757
759{
763};
764
766{
767 std::array<float, 3> FaceCustomizationOffset;
768 std::array<float, 3> CustomizeOffset;
782 float BarberShopCameraHeightOffsetScale; // applied after BarberShopCameraOffsetScale
784};
785
787{
793};
794
796{
798 char const* ClientPrefix;
799 char const* ClientFileString;
826 std::array<int32, 3> AlteredFormStartVisualKitID;
827 std::array<int32, 3> AlteredFormFinishVisualKitID;
841 std::array<float, 3> Unknown910_1;
842 std::array<float, 3> Unknown910_2;
850
851 EnumFlag<ChrRacesFlag> GetFlags() const { return static_cast<ChrRacesFlag>(Flags); }
852};
853
854#define MAX_MASTERY_SPELLS 2
855
857{
870 std::array<int32, MAX_MASTERY_SPELLS> MasterySpellID;
871
873 ChrSpecializationRole GetRole() const { return static_cast<ChrSpecializationRole>(Role); }
874
876 {
877 return ClassID == 0;
878 }
879};
880
882{
884 DBCPosition3D Origin; // Position in map used for basis for M2 co-ordinates
885 uint32 SoundID; // Sound ID (voiceover for cinematic)
886 float OriginFacing; // Orientation in map used for basis for M2 co
889};
890
892{
895 std::array<uint16, 8> Camera;
896};
897
899{
906};
907
909{
915};
916
918{
932
934
936 {
938 if (flags.HasFlag(ContentTuningFlag::Horde))
939 return 5;
940
942 return 3;
943
944 return 0;
945 }
946};
947
949{
955};
956
958{
962};
963
965{
976};
977
979{
985};
986
987//struct CreatureDifficultyEntry
988//{
989// uint32 ID;
990// int32 LevelDeltaMin;
991// int32 LevelDeltaMax;
992// uint16 FactionID;
993// int32 ContentTuningID;
994// int32 Flags[8];
995// uint32 CreatureID;
996//};
997
999{
1017 float PetInstanceScale; // scale of not own player pets inside dungeons/raids/scenarios
1024 std::array<int32, 4> TextureVariationFileDataID;
1025};
1026
1028{
1036};
1037
1039{
1049 std::array<int16, 2> SkillLine;
1050};
1051
1053{
1055 std::array<float, 6> GeoBox;
1085 int8 Unknown820_1; // scale related
1086 float Unknown820_2; // scale related
1087 std::array<float, 2> Unknown820_3; // scale related
1088
1090};
1091
1093{
1097};
1098
1100{
1104 {
1106 // CriteriaType::KillCreature = 0
1107 // CriteriaType::KilledByCreature = 20
1108 // CriteriaType::AccountKnownPet = 96
1109 // CriteriaType::KillCreatureScenario = 208
1111
1112 // CriteriaType::WinBattleground = 1
1113 // CriteriaType::ParticipateInBattleground = 15
1114 // CriteriaType::DieOnMap = 16
1115 // CriteriaType::WinArena = 32
1116 // CriteriaType::ParticipateInArena = 33
1117 // CriteriaType::CompleteChallengeMode = 71
1119
1120 // CriteriaType::CompleteResearchProject = 2
1122
1123 // CriteriaType::FindResearchObject = 4
1124 // CriteriaType::UseGameobject = 68
1125 // CriteriaType::CatchFishInFishingHole = 72
1127
1128 // CriteriaType::SkillRaised = 7
1129 // CriteriaType::AchieveSkillStep = 40
1130 // CriteriaType::LearnSpellFromSkillLine = 75
1131 // CriteriaType::LearnTradeskillSkillLine = 112
1133
1134 // CriteriaType::EarnAchievement = 8
1136
1137 // CriteriaType::CompleteQuestsInZone = 11
1138 // CriteriaType::EnterTopLevelArea = 225
1139 // CriteriaType::LeaveTopLevelArea = 226
1141
1142 // CriteriaType::CurrencyGained = 12
1143 // CriteriaType::ObtainAnyItemWithCurrencyValue = 229
1145
1146 // CriteriaType::DieInInstance = 18
1147 // CriteriaType::RunInstance = 19
1149
1150 // CriteriaType::CompleteInternalCriteria = 21
1152
1153 // CriteriaType::DieFromEnviromentalDamage = 26
1155
1156 // CriteriaType::CompleteQuest = 27
1158
1159 // CriteriaType::BeSpellTarget = 28
1160 // CriteriaType::CastSpell = 29
1161 // CriteriaType::LearnOrKnowSpell = 34
1162 // CriteriaType::GainAura = 69
1163 // CriteriaType::LandTargetedSpellOnTarget = 110
1164 // CriteriaType::MemorizeSpell = 222
1166
1167 // CriteriaType::TrackedWorldStateUIModified = 30
1169
1170 // CriteriaType::PVPKillInArea = 31
1171 // CriteriaType::EnterArea = 163
1172 // CriteriaType::LeaveArea = 164
1174
1175 // CriteriaType::AcquireItem = 36
1176 // CriteriaType::UseItem = 41
1177 // CriteriaType::LootItem = 42
1178 // CriteriaType::EquipItem = 57
1179 // CriteriaType::LearnToy = 185
1180 // CriteriaType::LearnHeirloom = 188
1182
1183 // CriteriaType::EarnTeamArenaRating = 38
1184 // CriteriaType::EarnPersonalArenaRating = 39
1186
1187 // CriteriaType::RevealWorldMapOverlay = 43
1189
1190 // CriteriaType::ReputationGained = 46
1191 // CriteriaType::ParagonLevelIncreaseWithFaction = 206
1193
1194 // CriteriaType::EquipItemInSlot = 49
1195 // CriteriaType::LearnAnyTransmogInSlot = 199
1197
1198 // CriteriaType::RollNeed = 50
1199 // CriteriaType::RollGreed = 51
1200 // CriteriaType::RollDisenchant = 116
1202
1203 // CriteriaType::DeliverKillingBlowToClass = 52
1205
1206 // CriteriaType::DeliverKillingBlowToRace = 53
1208
1209 // CriteriaType::DoEmote = 54
1211
1212 // CriteriaType::CompleteQuestsInSort = 58
1214
1215 // CriteriaType::KilledAllUnitsInSpawnRegion = 64
1217
1218 // CriteriaType::PlayerTriggerGameEvent = 73
1219 // CriteriaType::AnyoneTriggerGameEventScenario = 92
1221
1222 // CriteriaType::DefeatDungeonEncounterWhileElegibleForLoot = 97
1223 // CriteriaType::DefeatDungeonEncounter = 165
1225
1226 // CriteriaType::GetLootByType = 109
1228
1229 // CriteriaType::CompleteGuildChallenge = 138
1231
1232 // CriteriaType::CompleteScenario = 152
1234
1235 // CriteriaType::EnterAreaTriggerWithActionSet = 153
1236 // CriteriaType::LeaveAreaTriggerWithActionSet = 154
1238
1239 // CriteriaType::BattlePetReachLevel = 160
1240 // CriteriaType::ActivelyEarnPetLevel = 162
1242
1243 // CriteriaType::PlaceGarrisonBuilding = 167
1244 // CriteriaType::ActivateGarrisonBuilding = 169
1245 // CriteriaType::LearnGarrisonBlueprint = 179
1247
1248 // CriteriaType::UpgradeGarrison = 170
1250
1251 // CriteriaType::StartAnyGarrisonMissionWithFollowerType = 171
1252 // CriteriaType::SucceedAnyGarrisonMissionWithFollowerType = 173
1254
1255 // CriteriaType::StartGarrisonMission = 172
1256 // CriteriaType::SucceedGarrisonMission = 174
1258
1259 // CriteriaType::RecruitGarrisonFollower = 176
1261
1262 // CriteriaType::LearnGarrisonSpecialization = 181
1264
1265 // CriteriaType::CollectGarrisonShipment = 182
1267
1268 // CriteriaType::LearnTransmog = 192
1270
1271 // CriteriaType::ActivelyReachLevel = 196
1273
1274 // CriteriaType::CompleteResearchGarrisonTalent = 198
1275 // CriteriaType::StartResearchGarrisonTalent = 202
1276 // CriteriaType::SocketGarrisonTalent = 227
1278
1279 // CriteriaType::EarnLicense = 204
1281
1282 // CriteriaType::CollectTransmogSetFromGroup = 205
1284
1285 // CriteriaType::ArtifactPowerRankPurchased = 209
1286 // CriteriaType::ChooseRelicTalent = 211
1288
1289 // CriteriaType::EarnExpansionLevel = 212
1291
1292 // CriteriaType::AccountHonorLevelReached = 213
1294
1295 // CriteriaType::AzeriteLevelReached = 215
1297
1298 // CriteriaType::MythicPlusRatingAttained = 230
1310
1311 EnumFlag<CriteriaFlags> GetFlags() const { return static_cast<CriteriaFlags>(Flags); }
1312};
1313
1315{
1324
1326};
1327
1329{
1339};
1340
1342{
1360 std::array<int32, 2> Flags;
1361
1364
1365 // Helpers
1367 {
1368 return GetFlags().HasFlag(CurrencyTypesFlags::_100_Scaler) ? 100 : 1;
1369 }
1370
1372 {
1374 }
1375
1376 bool HasMaxQuantity(bool onLoad = false, bool onUpdateVersion = false) const
1377 {
1378 if (onLoad && GetFlags().HasFlag(CurrencyTypesFlags::IgnoreMaxQtyOnLoad))
1379 return false;
1380
1381 if (onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::UpdateVersionIgnoreMax))
1382 return false;
1383
1385 }
1386
1387 bool HasTotalEarned() const
1388 {
1390 }
1391
1392 bool IsAlliance() const
1393 {
1395 }
1396
1397 bool IsHorde() const
1398 {
1399 return GetFlags().HasFlag(CurrencyTypesFlags::IsHordeOnly);
1400 }
1401
1402 bool IsSuppressingChatLog(bool onUpdateVersion = false) const
1403 {
1404 if ((onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::SuppressChatMessageOnVersionChange)) ||
1406 return true;
1407
1408 return false;
1409 }
1410
1412 {
1414 }
1415};
1416
1418{
1422};
1423
1425{
1431};
1432
1434{
1458};
1459
1461{
1476};
1477
1479{
1490};
1491
1493{
1495 std::array<uint16, 21> WeaponSubClassCost;
1496 std::array<uint16, 8> ArmorSubClassCost;
1497};
1498
1500{
1502 float Data;
1503};
1504
1506{
1517};
1518
1520{
1522 char const* Name;
1524};
1525
1527{
1534};
1535
1537{
1550};
1551
1553{
1564};
1565
1567{
1569 std::array<Trinity::RaceMask<int64>, 4> ReputationRaceMask;
1580 std::array<int16, 4> ReputationClassMask;
1581 std::array<uint16, 4> ReputationFlags;
1582 std::array<int32, 4> ReputationBase;
1583 std::array<int32, 4> ReputationMax;
1584 std::array<float, 2> ParentFactionMod; // Faction outputs rep * ParentFactionModOut as spillover reputation
1585 std::array<uint8, 2> ParentFactionCap; // The highest rank the faction will profit from incoming spillover
1586
1587 // helpers
1589 {
1590 return ReputationIndex >= 0;
1591 }
1592};
1593
1594#define MAX_FACTION_RELATIONS 8
1595
1597{
1604 std::array<uint16, MAX_FACTION_RELATIONS> Enemies;
1605 std::array<uint16, MAX_FACTION_RELATIONS> Friend;
1606
1607 //------------------------------------------------------- end structure
1608
1609 // helpers
1610 bool IsFriendlyTo(FactionTemplateEntry const* entry) const
1611 {
1612 if (this == entry)
1613 return true;
1614 if (entry->Faction)
1615 {
1616 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1617 if (Enemies[i] == entry->Faction)
1618 return false;
1619 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1620 if (Friend[i] == entry->Faction)
1621 return true;
1622 }
1623 return (FriendGroup & entry->FactionGroup) || (FactionGroup & entry->FriendGroup);
1624 }
1625 bool IsHostileTo(FactionTemplateEntry const* entry) const
1626 {
1627 if (this == entry)
1628 return false;
1629 if (entry->Faction)
1630 {
1631 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1632 if (Enemies[i] == entry->Faction)
1633 return true;
1634 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1635 if (Friend[i] == entry->Faction)
1636 return false;
1637 }
1638 return (EnemyGroup & entry->FactionGroup) != 0;
1639 }
1640 bool IsHostileToPlayers() const { return (EnemyGroup & FACTION_MASK_PLAYER) !=0; }
1641 bool IsNeutralToAll() const
1642 {
1643 for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
1644 if (Enemies[i] != 0)
1645 return false;
1646 return EnemyGroup == 0 && FriendGroup == 0;
1647 }
1649};
1650
1652{
1658};
1659
1661{
1669
1671};
1672
1674{
1677 std::array<int32, 3> TextureVariationFileID;
1678};
1679
1681{
1692};
1693
1695{
1698 std::array<float, 4> Rot;
1702 float Scale;
1707 std::array<int32, 8> PropValue;
1708};
1709
1711{
1720};
1721
1723{
1749};
1750
1752{
1758};
1759
1761{
1770};
1771
1773{
1808};
1809
1811{
1817};
1818
1820{
1853};
1854
1856{
1858 char const* Name;
1864 std::array<uint32, 2> UpgradeRequirement;
1865};
1866
1868{
1872};
1873
1875{
1877 char const* Name;
1879};
1880
1882{
1893};
1894
1896{
1902};
1903
1905{
1919};
1920
1922{
1926};
1927
1929{
1933};
1934
1936{
1940};
1941
1943{
1949};
1950
1952{
1956};
1957
1959{
1976};
1977
1979{
1984};
1985
1987{
1992};
1993
1995{
2000};
2001
2003{
2006};
2007
2009{
2018 std::array<int32, 6> UpgradeItemID;
2019 std::array<uint16, 6> UpgradeItemBonusListID;
2020};
2021
2022#define MAX_HOLIDAY_DURATIONS 10
2023#define MAX_HOLIDAY_DATES 26
2024#define MAX_HOLIDAY_FLAGS 10
2025
2027{
2036 std::array<uint16, MAX_HOLIDAY_DURATIONS> Duration;
2037 std::array<uint32, MAX_HOLIDAY_DATES> Date; // dates in unix time starting at January, 1, 2000
2038 std::array<uint8, MAX_HOLIDAY_DURATIONS> CalendarFlags;
2039 std::array<int32, 3> TextureFileDataID;
2040};
2041
2043{
2049};
2050
2052{
2054 float Data;
2055};
2056
2058{
2060 float Data;
2061};
2062
2064{
2066 float Data;
2067};
2068
2070{
2083};
2084
2086{
2093};
2094
2096{
2098 std::array<float, 7> Qualitymod;
2099};
2100
2102{
2104 std::array<float, 7> Quality;
2106};
2107
2109{
2112 float Cloth;
2113 float Leather;
2114 float Mail;
2115 float Plate;
2116};
2117
2119{
2122};
2123
2125{
2127 std::array<int32, 4> Value;
2131};
2132
2133// new item upgrade system
2135{
2145};
2146
2148{
2151};
2152
2153//struct ItemBonusSequenceSpellEntry
2154//{
2155// uint32 ID;
2156// int32 SpellID;
2157// int32 ItemID;
2158//};
2159
2161{
2165};
2166
2168{
2179};
2180
2182{
2187};
2188
2190{
2196};
2197
2199{
2208};
2209
2211{
2214};
2215
2217{
2220 std::array<float, 7> Quality;
2221};
2222
2224{
2227 std::array<float, 7> Quality;
2228};
2229
2231{
2234 std::array<float, 7> Quality;
2235};
2236
2238{
2241 std::array<float, 7> Quality;
2242};
2243
2245{
2248 std::array<float, 7> Quality;
2249};
2250
2252{
2261};
2262
2264{
2274};
2275
2276#define MAX_ITEM_EXT_COST_ITEMS 5
2277#define MAX_ITEM_EXT_COST_CURRENCIES 5
2278
2280{
2283 int8 ArenaBracket; // arena slot restrictions (min slot value)
2287 uint8 RequiredAchievement; // required personal arena rating
2288 std::array<int32, MAX_ITEM_EXT_COST_ITEMS> ItemID; // required item id
2289 std::array<uint16, MAX_ITEM_EXT_COST_ITEMS> ItemCount; // required count of 1st item
2290 std::array<uint16, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyID; // required curency id
2291 std::array<uint32, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyCount; // required curency count
2292};
2293
2295{
2300};
2301
2303{
2308};
2309
2311{
2315};
2316
2318{
2323};
2324
2326{
2331};
2332
2334{
2341};
2342
2344{
2351};
2352
2354{
2358};
2359
2361{
2364 float Armor;
2365 float Weapon;
2366};
2367
2369{
2383 std::array<int32, 4> Flags;
2384};
2385
2386#define MAX_ITEM_SET_ITEMS 17
2387
2389{
2395 std::array<uint32, MAX_ITEM_SET_ITEMS> ItemID;
2396};
2397
2399{
2405};
2406
2408{
2425 std::array<float, MAX_ITEM_PROTO_STATS> StatPercentageOfSocket;
2426 std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor;
2436 std::array<int32, MAX_ITEM_PROTO_FLAGS> Flags;
2448 std::array<uint16, MAX_ITEM_PROTO_ZONES> ZoneBound;
2461 std::array<uint8, MAX_ITEM_PROTO_SOCKETS> SocketType;
2467 std::array<int8, MAX_ITEM_PROTO_STATS> StatModifierBonusStat;
2474};
2475
2477{
2485};
2486
2488{
2492};
2493
2495{
2499};
2500
2502{
2506};
2507
2509{
2522};
2523
2525{
2542};
2543
2545{
2556};
2557
2559{
2563};
2564
2565#define KEYCHAIN_SIZE 32
2566
2568{
2570 std::array<uint8, KEYCHAIN_SIZE> Key;
2571};
2572
2574{
2579};
2580
2582{
2584 char const* Word;
2586};
2587
2589{
2596};
2597
2599{
2612 float MinGear;
2629 std::array<int32, 2> Flags;
2630
2631 // Helpers
2632 uint32 Entry() const { return ID + (TypeID << 24); }
2633};
2634
2636{
2642 std::array<uint16, 8> LightParamsID;
2643};
2644
2646{
2648 char const* Name;
2649 std::array<char const*, 6> Texture;
2651 uint8 SoundBank; // used to be "type", maybe needs fixing (works well for now)
2664 std::array<uint8, 6> FrameCountTexture;
2665 std::array<int32, 2> Color;
2666 std::array<float, 18> Float;
2667 std::array<uint32, 4> Int;
2668 std::array<float, 4> Coefficient;
2669};
2670
2671#define MAX_LOCK_CASE 8
2672
2674{
2677 std::array<int32, MAX_LOCK_CASE> Index;
2678 std::array<uint16, MAX_LOCK_CASE> Skill;
2679 std::array<uint8, MAX_LOCK_CASE> Type;
2680 std::array<uint8, MAX_LOCK_CASE> Action;
2681};
2682
2684{
2687};
2688
2690{
2692 char const* Directory;
2698 DBCPosition2D Corpse; // entrance coordinates in ghost mode (in most cases = normal entrance)
2709 int16 CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
2715 std::array<int32, 3> Flags;
2716
2717 // Helpers
2718 uint8 Expansion() const { return ExpansionID; }
2719
2721 bool IsNonRaidDungeon() const { return InstanceType == MAP_INSTANCE; }
2723 bool IsRaid() const { return InstanceType == MAP_RAID; }
2725 bool IsBattleArena() const { return InstanceType == MAP_ARENA; }
2727 bool IsScenario() const { return InstanceType == MAP_SCENARIO; }
2728 bool IsWorldMap() const { return InstanceType == MAP_COMMON; }
2729
2730 bool GetEntrancePos(int32& mapid, float& x, float& y) const
2731 {
2732 if (CorpseMapID < 0)
2733 return false;
2734
2735 mapid = CorpseMapID;
2736 x = Corpse.X;
2737 y = Corpse.Y;
2738 return true;
2739 }
2740
2741 bool IsContinent() const
2742 {
2743 switch (ID)
2744 {
2745 case 0:
2746 case 1:
2747 case 530:
2748 case 571:
2749 case 870:
2750 case 1116:
2751 case 1220:
2752 case 1642:
2753 case 1643:
2754 case 2222:
2755 case 2444:
2756 return true;
2757 default:
2758 return false;
2759 }
2760 }
2761
2763 bool IsFlexLocking() const { return GetFlags().HasFlag(MapFlags::FlexibleRaidLocking); }
2764 bool IsGarrison() const { return GetFlags().HasFlag(MapFlags::Garrison); }
2765 bool IsSplitByFaction() const
2766 {
2767 return ID == 609 || // Acherus (DeathKnight Start)
2768 ID == 1265 || // Assault on the Dark Portal (WoD Intro)
2769 ID == 1481 || // Mardum (DH Start)
2770 ID == 2175 || // Exiles Reach - NPE
2771 ID == 2570; // Forbidden Reach (Dracthyr/Evoker Start)
2772 }
2773
2774 EnumFlag<MapFlags> GetFlags() const { return static_cast<MapFlags>(Flags[0]); }
2775 EnumFlag<MapFlags2> GetFlags2() const { return static_cast<MapFlags2>(Flags[1]); }
2776};
2777
2779{
2786 std::array<int16, 3> CriteriaCount;
2787};
2788
2790{
2792 LocalizedString Message; // m_message_lang (text showed when transfer to map failed)
2802
2807
2809 {
2811 return 86400;
2813 return 604800;
2814 return 0;
2815 }
2816
2818};
2819
2821{
2827};
2828
2830{
2834};
2835
2837{
2846};
2847
2849{
2863
2864 bool IsSelfMount() const { return (Flags & MOUNT_FLAG_SELF_MOUNT) != 0; }
2865};
2866
2868{
2879};
2880
2882{
2887};
2888
2890{
2895};
2896
2898{
2905};
2906
2908{
2913};
2914
2916{
2918 char const* Name;
2921};
2922
2924{
2926 char const* Name;
2928};
2929
2931{
2933 char const* Name;
2934};
2935
2937{
2939 char const* Name;
2941};
2942
2944{
2949};
2950
2951#define MAX_OVERRIDE_SPELL 10
2952
2954{
2956 std::array<int32, MAX_OVERRIDE_SPELL> Spells;
2959};
2960
2962{
2967};
2968
2970{
2973
2975};
2976
2978{
2982};
2983
2985{
3044 std::array<uint16, 4> SkillID;
3045 std::array<uint16, 4> MinSkill;
3046 std::array<uint16, 4> MaxSkill;
3047 std::array<uint32, 3> MinFactionID;
3048 std::array<uint8, 3> MinReputation;
3049 std::array<int32, 4> PrevQuestID;
3050 std::array<int32, 4> CurrQuestID;
3051 std::array<int32, 4> CurrentCompletedQuestID;
3052 std::array<int32, 4> SpellID;
3053 std::array<int32, 4> ItemID;
3054 std::array<uint32, 4> ItemCount;
3055 std::array<uint16, 2> Explored;
3056 std::array<uint32, 2> Time;
3057 std::array<int32, 4> AuraSpellID;
3058 std::array<uint8, 4> AuraStacks;
3059 std::array<uint16, 4> Achievement;
3060 std::array<uint16, 4> AreaID;
3061 std::array<uint8, 4> LfgStatus;
3062 std::array<uint8, 4> LfgCompare;
3063 std::array<uint32, 4> LfgValue;
3064 std::array<uint32, 4> CurrencyID;
3065 std::array<uint32, 4> CurrencyCount;
3066 std::array<uint32, 6> QuestKillMonster;
3067 std::array<int32, 2> MovementFlags;
3068 std::array<int32, 4> TraitNodeEntryID;
3069 std::array<uint16, 4> TraitNodeEntryMinRank;
3070 std::array<uint16, 4> TraitNodeEntryMaxRank;
3071};
3072
3074{
3081};
3082
3084{
3098
3099 EnumFlag<PowerTypeFlags> GetFlags() const { return static_cast<PowerTypeFlags>(Flags); }
3100};
3101
3103{
3110
3111 bool IsDisabled() const { return (Flags & PRESTIGE_FLAG_DISABLED) != 0; }
3112};
3113
3115{
3121
3122 // helpers
3124};
3125
3127{
3131};
3132
3134{
3138};
3139
3141{
3146};
3147
3149{
3160};
3161
3163{
3166};
3167
3169{
3175};
3176
3178{
3188};
3189
3191{
3193 std::array<int16, 10> Difficulty;
3194};
3195
3197{
3203};
3204
3206{
3212};
3213
3215{
3217 std::array<uint32, 10> Difficulty;
3218};
3219
3221{
3227};
3228
3230{
3234};
3235
3237{
3241};
3242
3244{
3246 std::array<uint16, 10> Difficulty;
3247};
3248
3250{
3256 std::array<float, 5> EpicF;
3257 std::array<float, 5> SuperiorF;
3258 std::array<float, 5> GoodF;
3259 std::array<uint32, 5> Epic;
3260 std::array<uint32, 5> Superior;
3261 std::array<uint32, 5> Good;
3262};
3263
3265{
3273};
3274
3276{
3281};
3282
3284{
3289};
3290
3292{
3299};
3300
3302{
3309 int32 RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
3310 uint16 Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
3315
3316 // helpers
3317 bool IsBonusObjective() const
3318 {
3320 }
3321};
3322
3324{
3329};
3330
3332{
3334 char const* Name;
3335 char const* Script;
3336};
3337
3339{
3341 char const* Name;
3343};
3344
3346{
3348 char const* Name;
3349 char const* Script;
3350};
3351
3353{
3356};
3357
3359{
3375
3376 EnumFlag<SkillLineFlags> GetFlags() const { return static_cast<SkillLineFlags>(Flags); }
3377};
3378
3380{
3398
3400};
3401
3403{
3408};
3409
3411{
3420};
3421
3423{
3429};
3430
3432{
3450};
3451
3453{
3460};
3461
3463{