aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-06-18 16:36:00 +0200
committerShauren <shauren.trinity@gmail.com>2023-06-18 16:36:00 +0200
commit7282a1772568111f95a1fb85e95f92421439c097 (patch)
treef5aeba8b869f0d670f34ad2320b8e14479ded588 /src/server/game/Globals/ObjectMgr.cpp
parentf93b4d6c438b337d15bf1666f6f0e050beb97ce4 (diff)
Core/Creatures: Added db fields to hold creature static flags
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 4228576ada1..5a9845992e8 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -922,8 +922,15 @@ void ObjectMgr::LoadCreatureTemplateDifficulty()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
- QueryResult result = WorldDatabase.Query("SELECT Entry, DifficultyID, LevelScalingDeltaMin, LevelScalingDeltaMax, ContentTuningID, HealthScalingExpansion, HealthModifier, ManaModifier, ArmorModifier, DamageModifier, CreatureDifficultyID, TypeFlags, TypeFlags2, LootID, PickPocketLootID, SkinLootID, GoldMin, GoldMax FROM creature_template_difficulty ORDER BY Entry");
+ // 0 1 2 3 4 5
+ QueryResult result = WorldDatabase.Query("SELECT Entry, DifficultyID, LevelScalingDeltaMin, LevelScalingDeltaMax, ContentTuningID, HealthScalingExpansion, "
+ // 6 7 8 9 10 11 12
+ "HealthModifier, ManaModifier, ArmorModifier, DamageModifier, CreatureDifficultyID, TypeFlags, TypeFlags2, "
+ // 13 14 15 16 17
+ "LootID, PickPocketLootID, SkinLootID, GoldMin, GoldMax,"
+ // 18 19 20 21 22 23 24 25
+ "StaticFlags1, StaticFlags2, StaticFlags3, StaticFlags4, StaticFlags5, StaticFlags6, StaticFlags7, StaticFlags8 "
+ "FROM creature_template_difficulty ORDER BY Entry");
if (!result)
{
@@ -963,6 +970,9 @@ void ObjectMgr::LoadCreatureTemplateDifficulty()
creatureDifficulty.SkinLootID = fields[15].GetUInt32();
creatureDifficulty.GoldMin = fields[16].GetUInt32();
creatureDifficulty.GoldMax = fields[17].GetUInt32();
+ creatureDifficulty.StaticFlags = { CreatureStaticFlags(fields[18].GetUInt32()), CreatureStaticFlags2(fields[19].GetUInt32()),
+ CreatureStaticFlags3(fields[20].GetUInt32()), CreatureStaticFlags4(fields[21].GetUInt32()), CreatureStaticFlags5(fields[22].GetUInt32()),
+ CreatureStaticFlags6(fields[23].GetUInt32()), CreatureStaticFlags7(fields[24].GetUInt32()), CreatureStaticFlags8(fields[25].GetUInt32()) };
// TODO: Check if this still applies
creatureDifficulty.DamageModifier *= Creature::_GetDamageMod(itr->second.rank);