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{
763};
764
766{
774 int32 OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
776
778};
779
781{
785};
786
788{
789 std::array<float, 3> FaceCustomizationOffset;
790 std::array<float, 3> CustomizeOffset;
804 float BarberShopCameraHeightOffsetScale; // applied after BarberShopCameraOffsetScale
806};
807
809{
815};
816
818{
820 char const* ClientPrefix;
821 char const* ClientFileString;
848 std::array<int32, 3> AlteredFormStartVisualKitID;
849 std::array<int32, 3> AlteredFormFinishVisualKitID;
863 std::array<float, 3> Unknown910_1;
864 std::array<float, 3> Unknown910_2;
872
873 EnumFlag<ChrRacesFlag> GetFlags() const { return static_cast<ChrRacesFlag>(Flags); }
874};
875
876#define MAX_MASTERY_SPELLS 2
877
879{
892 std::array<int32, MAX_MASTERY_SPELLS> MasterySpellID;
893
895 ChrSpecializationRole GetRole() const { return static_cast<ChrSpecializationRole>(Role); }
896
898 {
899 return ClassID == 0;
900 }
901};
902
904{
906 DBCPosition3D Origin; // Position in map used for basis for M2 co-ordinates
907 uint32 SoundID; // Sound ID (voiceover for cinematic)
908 float OriginFacing; // Orientation in map used for basis for M2 co
911};
912
914{
917 std::array<uint16, 8> Camera;
918};
919
921{
928};
929
931{
937};
938
940{
956
958
960 {
962 if (flags.HasFlag(ContentTuningFlag::Horde))
963 return 5;
964
966 return 3;
967
968 return 0;
969 }
970};
971
973{
979};
980
982{
986};
987
989{
1000};
1001
1003{
1009};
1010
1011//struct CreatureDifficultyEntry
1012//{
1013// uint32 ID;
1014// int32 LevelDeltaMin;
1015// int32 LevelDeltaMax;
1016// uint16 FactionID;
1017// int32 ContentTuningID;
1018// int32 Flags[8];
1019// uint32 CreatureID;
1020//};
1021
1023{
1041 float PetInstanceScale; // scale of not own player pets inside dungeons/raids/scenarios
1051 std::array<int32, 4> TextureVariationFileDataID;
1052};
1053
1055{
1063};
1064
1066{
1076 std::array<int16, 2> SkillLine;
1077};
1078
1080{
1084};
1085
1087{
1089 std::array<float, 6> GeoBox;
1122 std::array<float, 2> MountScaleOther;
1123
1125};
1126
1128{
1132};
1133
1135{
1139 {
1141 // CriteriaType::KillCreature = 0
1142 // CriteriaType::KilledByCreature = 20
1143 // CriteriaType::AccountKnownPet = 96
1144 // CriteriaType::KillCreatureScenario = 208
1146
1147 // CriteriaType::WinBattleground = 1
1148 // CriteriaType::ParticipateInBattleground = 15
1149 // CriteriaType::DieOnMap = 16
1150 // CriteriaType::WinArena = 32
1151 // CriteriaType::ParticipateInArena = 33
1152 // CriteriaType::CompleteChallengeMode = 71
1154
1155 // CriteriaType::CompleteResearchProject = 2
1157
1158 // CriteriaType::FindResearchObject = 4
1159 // CriteriaType::UseGameobject = 68
1160 // CriteriaType::CatchFishInFishingHole = 72
1162
1163 // CriteriaType::SkillRaised = 7
1164 // CriteriaType::AchieveSkillStep = 40
1165 // CriteriaType::LearnSpellFromSkillLine = 75
1166 // CriteriaType::LearnTradeskillSkillLine = 112
1168
1169 // CriteriaType::EarnAchievement = 8
1171
1172 // CriteriaType::CompleteQuestsInZone = 11
1173 // CriteriaType::EnterTopLevelArea = 225
1174 // CriteriaType::LeaveTopLevelArea = 226
1176
1177 // CriteriaType::CurrencyGained = 12
1178 // CriteriaType::ObtainAnyItemWithCurrencyValue = 229
1179 // CriteriaType::ReachRenownLevel = 261
1181
1182 // CriteriaType::DieInInstance = 18
1183 // CriteriaType::RunInstance = 19
1185
1186 // CriteriaType::CompleteInternalCriteria = 21
1188
1189 // CriteriaType::DieFromEnviromentalDamage = 26
1191
1192 // CriteriaType::CompleteQuest = 27
1194
1195 // CriteriaType::BeSpellTarget = 28
1196 // CriteriaType::CastSpell = 29
1197 // CriteriaType::LearnOrKnowSpell = 34
1198 // CriteriaType::GainAura = 69
1199 // CriteriaType::LandTargetedSpellOnTarget = 110
1200 // CriteriaType::MemorizeSpell = 222
1202
1203 // CriteriaType::TrackedWorldStateUIModified = 30
1205
1206 // CriteriaType::PVPKillInArea = 31
1207 // CriteriaType::EnterArea = 163
1208 // CriteriaType::LeaveArea = 164
1210
1211 // CriteriaType::AcquireItem = 36
1212 // CriteriaType::UseItem = 41
1213 // CriteriaType::LootItem = 42
1214 // CriteriaType::EquipItem = 57
1215 // CriteriaType::LearnToy = 185
1216 // CriteriaType::LearnHeirloom = 188
1218
1219 // CriteriaType::EarnTeamArenaRating = 38
1220 // CriteriaType::EarnPersonalArenaRating = 39
1222
1223 // CriteriaType::RevealWorldMapOverlay = 43
1225
1226 // CriteriaType::ReputationGained = 46
1227 // CriteriaType::ParagonLevelIncreaseWithFaction = 206
1229
1230 // CriteriaType::EquipItemInSlot = 49
1231 // CriteriaType::LearnAnyTransmogInSlot = 199
1233
1234 // CriteriaType::RollNeed = 50
1235 // CriteriaType::RollGreed = 51
1236 // CriteriaType::RollDisenchant = 116
1238
1239 // CriteriaType::DeliverKillingBlowToClass = 52
1241
1242 // CriteriaType::DeliverKillingBlowToRace = 53
1244
1245 // CriteriaType::DoEmote = 54
1247
1248 // CriteriaType::CompleteQuestsInSort = 58
1250
1251 // CriteriaType::KilledAllUnitsInSpawnRegion = 64
1253
1254 // CriteriaType::PlayerTriggerGameEvent = 73
1255 // CriteriaType::AnyoneTriggerGameEventScenario = 92
1257
1258 // CriteriaType::DefeatDungeonEncounterWhileElegibleForLoot = 97
1259 // CriteriaType::DefeatDungeonEncounter = 165
1261
1262 // CriteriaType::GetLootByType = 109
1264
1265 // CriteriaType::CompleteGuildChallenge = 138
1267
1268 // CriteriaType::CompleteScenario = 152
1270
1271 // CriteriaType::EnterAreaTriggerWithActionSet = 153
1272 // CriteriaType::LeaveAreaTriggerWithActionSet = 154
1274
1275 // CriteriaType::BattlePetReachLevel = 160
1276 // CriteriaType::ActivelyEarnPetLevel = 162
1278
1279 // CriteriaType::PlaceGarrisonBuilding = 167
1280 // CriteriaType::ActivateGarrisonBuilding = 169
1281 // CriteriaType::LearnGarrisonBlueprint = 179
1283
1284 // CriteriaType::UpgradeGarrison = 170
1286
1287 // CriteriaType::StartAnyGarrisonMissionWithFollowerType = 171
1288 // CriteriaType::SucceedAnyGarrisonMissionWithFollowerType = 173
1290
1291 // CriteriaType::StartGarrisonMission = 172
1292 // CriteriaType::SucceedGarrisonMission = 174
1294
1295 // CriteriaType::RecruitGarrisonFollower = 176
1297
1298 // CriteriaType::LearnGarrisonSpecialization = 181
1300
1301 // CriteriaType::CollectGarrisonShipment = 182
1303
1304 // CriteriaType::LearnTransmog = 192
1306
1307 // CriteriaType::ActivelyReachLevel = 196
1309
1310 // CriteriaType::CompleteResearchGarrisonTalent = 198
1311 // CriteriaType::StartResearchGarrisonTalent = 202
1312 // CriteriaType::SocketGarrisonTalent = 227
1314
1315 // CriteriaType::EarnLicense = 204
1317
1318 // CriteriaType::CollectTransmogSetFromGroup = 205
1320
1321 // CriteriaType::ArtifactPowerRankPurchased = 209
1322 // CriteriaType::ChooseRelicTalent = 211
1324
1325 // CriteriaType::EarnExpansionLevel = 212
1327
1328 // CriteriaType::AccountHonorLevelReached = 213
1330
1331 // CriteriaType::AzeriteLevelReached = 215
1333
1334 // CriteriaType::MythicPlusRatingAttained = 230
1336
1337 // CriteriaType::LearnTaxiNode = 262
1349
1350 EnumFlag<CriteriaFlags> GetFlags() const { return static_cast<CriteriaFlags>(Flags); }
1351};
1352
1354{
1363
1365};
1366
1368{
1378};
1379
1381{
1400 std::array<int32, 2> Flags;
1401
1404
1405 // Helpers
1407 {
1408 return GetFlags().HasFlag(CurrencyTypesFlags::_100_Scaler) ? 100 : 1;
1409 }
1410
1412 {
1414 }
1415
1416 bool HasMaxQuantity(bool onLoad = false, bool onUpdateVersion = false) const
1417 {
1418 if (onLoad && GetFlags().HasFlag(CurrencyTypesFlags::IgnoreMaxQtyOnLoad))
1419 return false;
1420
1421 if (onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::UpdateVersionIgnoreMax))
1422 return false;
1423
1425 }
1426
1427 bool HasTotalEarned() const
1428 {
1430 }
1431
1432 bool IsAlliance() const
1433 {
1435 }
1436
1437 bool IsHorde() const
1438 {
1439 return GetFlags().HasFlag(CurrencyTypesFlags::IsHordeOnly);
1440 }
1441
1442 bool IsSuppressingChatLog(bool onUpdateVersion = false) const
1443 {
1444 if ((onUpdateVersion && GetFlags().HasFlag(CurrencyTypesFlags::SuppressChatMessageOnVersionChange)) ||
1446 return true;
1447
1448 return false;
1449 }
1450
1452 {
1454 }
1455};
1456
1458{
1462};
1463
1465{
1471};
1472
1474{
1498};
1499
1501{
1517};
1518
1520{
1531};
1532
1534{
1536 std::array<uint16, 21> WeaponSubClassCost;
1537 std::array<uint16, 8> ArmorSubClassCost;
1538};
1539
1541{
1543 float Data;
1544};
1545
1547{
1558};
1559
1561{
1563 char const* Name;
1565};
1566
1568{
1575};
1576
1578{
1591};
1592
1594{
1605};
1606
1608{
1610 std::array<Trinity::RaceMask<int64>, 4> ReputationRaceMask;
1621 std::array<int16, 4> ReputationClassMask;
1622 std::array<uint16, 4> ReputationFlags;
1623 std::array<int32, 4> ReputationBase;
1624 std::array<int32, 4> ReputationMax;
1625 std::array<float, 2> ParentFactionMod; // Faction outputs rep * ParentFactionModOut as spillover reputation
1626 std::array<uint8, 2> ParentFactionCap; // The highest rank the faction will profit from incoming spillover
1627
1628 // helpers
1630 {
1631 return ReputationIndex >= 0;
1632 }
1633};
1634
1635#define MAX_FACTION_RELATIONS 8
1636
1638{
1645 std::array<uint16, MAX_FACTION_RELATIONS> Enemies;
1646 std::array<uint16, MAX_FACTION_RELATIONS> Friend;
1647
1648 //------------------------------------------------------- end structure
1649
1650 // helpers
1651 bool IsFriendlyTo(FactionTemplateEntry const* entry) const
1652 {
1653 if (this == entry)
1654 return true;
1655 if (entry->Faction)
1656 {
1657 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1658 if (Enemies[i] == entry->Faction)
1659 return false;
1660 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1661 if (Friend[i] == entry->Faction)
1662 return true;
1663 }
1664 return (FriendGroup & entry->FactionGroup) || (FactionGroup & entry->FriendGroup);
1665 }
1666 bool IsHostileTo(FactionTemplateEntry const* entry) const
1667 {
1668 if (this == entry)
1669 return false;
1670 if (entry->Faction)
1671 {
1672 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1673 if (Enemies[i] == entry->Faction)
1674 return true;
1675 for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i)
1676 if (Friend[i] == entry->Faction)
1677 return false;
1678 }
1679 return (EnemyGroup & entry->FactionGroup) != 0;
1680 }
1681 bool IsHostileToPlayers() const { return (EnemyGroup & FACTION_MASK_PLAYER) !=0; }
1682 bool IsNeutralToAll() const
1683 {
1684 for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
1685 if (Enemies[i] != 0)
1686 return false;
1687 return EnemyGroup == 0 && FriendGroup == 0;
1688 }
1690};
1691
1693{
1696 float MaxVel;
1720};
1721
1723{
1729};
1730
1732{
1740
1742};
1743
1745{
1748 std::array<int32, 3> TextureVariationFileID;
1749};
1750
1752{
1764};
1765
1767{
1771};
1772
1774{
1777 std::array<float, 4> Rot;
1781 float Scale;
1787 std::array<int32, 8> PropValue;
1788};
1789
1791{
1800};
1801
1803{
1829};
1830
1832{
1838};
1839
1841{
1850};
1851
1853{
1888};
1889
1891{
1897};
1898
1900{
1933};
1934
1936{
1938 char const* Name;
1944 std::array<uint32, 2> UpgradeRequirement;
1945};
1946
1948{
1952};
1953
1955{
1957 char const* Name;
1959};
1960
1962{
1973};
1974
1976{
1982};
1983
1985{
1999};
2000
2002{
2006};
2007
2009{
2013};
2014
2016{
2020};
2021
2023{
2029};
2030
2032{
2036};
2037
2039{
2056};
2057
2059{
2064};
2065
2067{
2072};
2073
2075{
2080};
2081
2083{
2086};
2087
2089{
2098 std::array<int32, 6> UpgradeItemID;
2099 std::array<uint16, 6> UpgradeItemBonusListID;
2100};
2101
2102#define MAX_HOLIDAY_DURATIONS 10
2103#define MAX_HOLIDAY_DATES 26
2104#define MAX_HOLIDAY_FLAGS 10
2105
2107{
2116 std::array<uint16, MAX_HOLIDAY_DURATIONS> Duration;
2117 std::array<uint32, MAX_HOLIDAY_DATES> Date; // dates in unix time starting at January, 1, 2000
2118 std::array<uint8, MAX_HOLIDAY_DURATIONS> CalendarFlags;
2119 std::array<int32, 3> TextureFileDataID;
2120};
2121
2123{
2129};
2130
2132{
2134 float Data;
2135};
2136
2138{
2140 float Data;
2141};
2142
2144{
2146 float Data;
2147};
2148
2150{
2163};
2164
2166{
2173};
2174
2176{
2178 std::array<float, 7> Qualitymod;
2179};
2180
2182{
2184 std::array<float, 7> Quality;
2186};
2187
2189{
2192 float Cloth;
2193 float Leather;
2194 float Mail;
2195 float Plate;
2196};
2197
2199{
2202};
2203
2205{
2207 std::array<int32, 4> Value;
2211};
2212
2213// new item upgrade system
2215{
2225};
2226
2228{
2231};
2232
2233//struct ItemBonusSequenceSpellEntry
2234//{
2235// uint32 ID;
2236// int32 SpellID;
2237// int32 ItemID;
2238//};
2239
2241{
2245};
2246
2248{
2259};
2260
2262{
2267};
2268
2270{
2276};
2277
2279{
2288};
2289
2291{
2294};
2295
2297{
2300 std::array<float, 7> Quality;
2301};
2302
2304{
2307 std::array<float, 7> Quality;
2308};
2309
2311{
2314 std::array<float, 7> Quality;
2315};
2316
2318{
2321 std::array<float, 7> Quality;
2322};
2323
2325{
2328 std::array<float, 7> Quality;
2329};
2330
2332{
2341};
2342
2344{
2354};
2355
2356#define MAX_ITEM_EXT_COST_ITEMS 5
2357#define MAX_ITEM_EXT_COST_CURRENCIES 5
2358
2360{
2363 int8 ArenaBracket; // arena slot restrictions (min slot value)
2367 uint8 RequiredAchievement; // required personal arena rating
2368 std::array<int32, MAX_ITEM_EXT_COST_ITEMS> ItemID; // required item id
2369 std::array<uint16, MAX_ITEM_EXT_COST_ITEMS> ItemCount; // required count of 1st item
2370 std::array<uint16, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyID; // required curency id
2371 std::array<uint32, MAX_ITEM_EXT_COST_CURRENCIES> CurrencyCount; // required curency count
2372};
2373
2375{
2380};
2381
2383{
2388};
2389
2391{
2395};
2396
2398{
2403};
2404
2406{
2411};
2412
2414{
2422};
2423
2425{
2432};
2433
2435{
2439};
2440
2442{
2445 float Armor;
2446 float Weapon;
2447};
2448
2450{
2464 std::array<int32, 5> Flags;
2465};
2466
2467#define MAX_ITEM_SET_ITEMS 17
2468
2470{
2476 std::array<uint32, MAX_ITEM_SET_ITEMS> ItemID;
2477};
2478
2480{
2486};
2487
2489{
2506 std::array<float, MAX_ITEM_PROTO_STATS> StatPercentageOfSocket;
2507 std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor;
2508 std::array<int32, MAX_ITEM_PROTO_STATS> StatModifierBonusStat;
2518 std::array<int32, MAX_ITEM_PROTO_FLAGS> Flags;
2530 std::array<uint16, MAX_ITEM_PROTO_ZONES> ZoneBound;
2543 std::array<uint8, MAX_ITEM_PROTO_SOCKETS> SocketType;
2555};
2556
2558{
2566};
2567
2569{
2573};
2574
2576{
2580};
2581
2583{
2587};
2588
2590{
2603};
2604
2606{
2623};
2624
2626{
2637};
2638
2640{
2645};
2646
2647#define KEYCHAIN_SIZE 32
2648
2650{
2652 std::array<uint8, KEYCHAIN_SIZE> Key;
2653};
2654
2656{
2661};
2662
2664{
2666 char const* Word;
2668};
2669
2671{
2678};
2679
2681{
2694 float MinGear;
2715 std::array<int32, 2> Flags;
2716
2717 // Helpers
2718 uint32 Entry() const { return ID + (TypeID << 24); }
2719};
2720
2722{
2728 std::array<uint16, 8> LightParamsID;
2729};
2730
2732{
2734 char const* Name;
2735 std::array<char const*, 6> Texture;
2737 uint8 SoundBank; // used to be "type", maybe needs fixing (works well for now)
2750 std::array<uint8, 6> FrameCountTexture;
2751 std::array<int32, 2> Color;
2752 std::array<float, 18> Float;
2753 std::array<uint32, 4> Int;
2754 std::array<float, 4> Coefficient;
2755};
2756
2758{
2761 std::array<float, 3> Rot;
2762};
2763
2764#define MAX_LOCK_CASE 8
2765
2767{
2770 std::array<int32, MAX_LOCK_CASE> Index;
2771 std::array<uint16, MAX_LOCK_CASE> Skill;
2772 std::array<uint8, MAX_LOCK_CASE> Type;
2773 std::array<uint8, MAX_LOCK_CASE> Action;
2774};
2775
2777{
2780};
2781
2783{
2785 char const* Directory;
2791 DBCPosition2D Corpse; // entrance coordinates in ghost mode (in most cases = normal entrance)
2802 int16 CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
2809 std::array<int32, 3> Flags;
2810
2811 // Helpers
2812 uint8 Expansion() const { return ExpansionID; }
2813
2815 bool IsNonRaidDungeon() const { return InstanceType == MAP_INSTANCE; }
2817 bool IsRaid() const { return InstanceType == MAP_RAID; }
2819 bool IsBattleArena() const { return InstanceType == MAP_ARENA; }
2821 bool IsScenario() const { return InstanceType == MAP_SCENARIO; }
2822 bool IsWorldMap() const { return InstanceType == MAP_COMMON; }
2823
2824 bool GetEntrancePos(int32& mapid, float& x, float& y) const
2825 {
2826 if (CorpseMapID < 0)
2827 return false;
2828
2829 mapid = CorpseMapID;
2830 x = Corpse.X;
2831 y = Corpse.Y;
2832 return true;
2833 }
2834
2835 bool IsContinent() const
2836 {
2837 switch (ID)
2838 {
2839 case 0:
2840 case 1:
2841 case 530:
2842 case 571:
2843 case 870:
2844 case 1116:
2845 case 1220:
2846 case 1642:
2847 case 1643:
2848 case 2222:
2849 case 2444:
2850 return true;
2851 default:
2852 return false;
2853 }
2854 }
2855
2857 bool IsFlexLocking() const { return GetFlags().HasFlag(MapFlags::FlexibleRaidLocking); }
2858 bool IsGarrison() const { return GetFlags().HasFlag(MapFlags::Garrison); }
2859 bool IsSplitByFaction() const
2860 {
2861 return ID == 609 || // Acherus (DeathKnight Start)
2862 ID == 1265 || // Assault on the Dark Portal (WoD Intro)
2863 ID == 1481 || // Mardum (DH Start)
2864 ID == 2175 || // Exiles Reach - NPE
2865 ID == 2570; // Forbidden Reach (Dracthyr/Evoker Start)
2866 }
2867
2868 EnumFlag<MapFlags> GetFlags() const { return static_cast<MapFlags>(Flags[0]); }
2869 EnumFlag<MapFlags2> GetFlags2() const { return static_cast<MapFlags2>(Flags[1]); }
2870};
2871
2873{
2880 std::array<int16, 3> CriteriaCount;
2881};
2882
2884{
2885 LocalizedString Message; // m_message_lang (text showed when transfer to map failed)
2897
2902
2904 {
2906 return 86400;
2908 return 604800;
2909 return 0;
2910 }
2911
2913};
2914
2916{
2922};
2923
2925{
2929};
2930
2932{
2941};
2942
2944{
2958
2959 EnumFlag<MountFlags> GetFlags() const { return static_cast<MountFlags>(Flags); }
2960};
2961
2963{
2974};
2975
2977{
2983};
2984
2986{
2991};
2992
2994{
3000};
3001
3003{
3010};
3011
3013{
3019};
3020
3022{
3024 char const* Name;
3027};
3028
3030{
3032 char const* Name;
3034};
3035
3037{
3039 char const* Name;
3040};
3041
3043{
3045 char const* Name;
3047};
3048
3050{
3055};
3056
3057#define MAX_OVERRIDE_SPELL 10
3058
3060{
3062 std::array<int32, MAX_OVERRIDE_SPELL> Spells;
3065};
3066
3068{
3073};
3074
3076{
3085};
3086
3088{
3093};
3094
3096{
3101
3103};
3104
3106{
3109
3111};
3112
3114{
3118};
3119
3121{
3182 std::array<uint16, 4> SkillID;
3183 std::array<uint16, 4> MinSkill;
3184 std::array<uint16, 4> MaxSkill;
3185 std::array<uint32, 3> MinFactionID;
3186 std::array<uint8, 3> MinReputation;
3187 std::array<int32, 4> PrevQuestID;
3188 std::array<int32, 4> CurrQuestID;
3189 std::array<int32, 4> CurrentCompletedQuestID;
3190 std::array<int32, 4> SpellID;
3191 std::array<int32, 4> ItemID;
3192 std::array<uint32, 4> ItemCount;
3193 std::array<uint16, 2> Explored;
3194 std::array<uint32, 2> Time;
3195 std::array<int32, 4> AuraSpellID;
3196 std::array<uint8, 4> AuraStacks;
3197 std::array<uint16, 4> Achievement;
3198 std::array<uint16, 4> AreaID;
3199 std::array<uint8, 4> LfgStatus;
3200 std::array<uint8, 4> LfgCompare;
3201 std::array<uint32, 4> LfgValue;
3202 std::array<uint32, 4> CurrencyID;
3203 std::array<uint32, 4> CurrencyCount;
3204 std::array<uint32, 6> QuestKillMonster;
3205 std::array<int32, 2> MovementFlags;
3206 std::array<int32, 4> TraitNodeEntryID;
3207 std::array<uint16, 4> TraitNodeEntryMinRank;
3208 std::array<uint16, 4> TraitNodeEntryMaxRank;
3209};
3210
3212{
3219};
3220
3222{
3236
3237 EnumFlag<PowerTypeFlags> GetFlags() const { return static_cast<PowerTypeFlags>(Flags); }
3238};
3239
3241{
3248
3249 bool IsDisabled() const { return (Flags & PRESTIGE_FLAG_DISABLED) != 0; }
3250};
3251
3253{
3259
3260 // helpers
3262};
3263
3265{
3269};
3270
3272{
3276};
3277
3279{
3284};
3285
3287{
3298};
3299
3301{
3304};
3305
3307{
3313};
3314
3316{
3326};
3327
3329{
3331 std::array<int16, 10> Difficulty;
3332};
3333
3335{
3341};
3342
3344{
3350};
3351
3353{
3355 std::array<uint32, 10> Difficulty;
3356};
3357
3359{
3365};
3366
3368{
3373};
3374
3376{
3380};
3381
3383{
3385 std::array<uint16, 10> Difficulty;
3386};
3387
3389{
3395 std::array<float, 5> EpicF;
3396 std::array<float, 5> SuperiorF;
3397 std::array<float, 5> GoodF;
3398 std::array<uint32, 5> Epic;
3399 std::array<uint32, 5> Superior;
3400 std::array<uint32, 5> Good;
3401};
3402
3404{
3412};
3413
3415{
3420};