aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 1e36b4c732b..df6018faf39 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2111,9 +2111,9 @@ void ObjectMgr::LoadItemTemplates()
// 118 119 120 121 122 123 124 125
"TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, "
// 126 127 128 129 130 131 132 133
- "GemProperties, RequiredDisenchantSkill, ArmorDamageModifier, Duration, ItemLimitCategory, HolidayId, ScriptName, DisenchantID, "
+ "GemProperties, RequiredDisenchantSkill, ArmorDamageModifier, duration, ItemLimitCategory, HolidayId, ScriptName, DisenchantID, "
// 134 135 136
- "FoodType, minMoneyLoot, maxMoneyLoot FROM item_template");
+ "FoodType, minMoneyLoot, maxMoneyLoot, flagsCustom FROM item_template");
if (!result)
{
@@ -2230,7 +2230,7 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.GemProperties = fields[126].GetUInt32();
itemTemplate.RequiredDisenchantSkill = uint32(fields[127].GetInt16());
itemTemplate.ArmorDamageModifier = fields[128].GetFloat();
- itemTemplate.Duration = fields[129].GetInt32();
+ itemTemplate.Duration = fields[129].GetUInt32();
itemTemplate.ItemLimitCategory = uint32(fields[130].GetInt16());
itemTemplate.HolidayId = fields[131].GetUInt32();
itemTemplate.ScriptId = sObjectMgr->GetScriptId(fields[132].GetCString());
@@ -2238,6 +2238,7 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.FoodType = uint32(fields[134].GetUInt8());
itemTemplate.MinMoneyLoot = fields[135].GetUInt32();
itemTemplate.MaxMoneyLoot = fields[136].GetUInt32();
+ itemTemplate.FlagsCu = fields[137].GetUInt32();
// Checks
@@ -2645,6 +2646,12 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.HolidayId = 0;
}
+ if (itemTemplate.FlagsCu & ITEM_FLAGS_CU_DURATION_REAL_TIME && !itemTemplate.Duration)
+ {
+ sLog->outErrorDb("Item (Entry %u) has flag ITEM_FLAGS_CU_DURATION_REAL_TIME but it does not have duration limit", entry);
+ itemTemplate.FlagsCu &= ~ITEM_FLAGS_CU_DURATION_REAL_TIME;
+ }
+
++count;
}
while (result->NextRow());
@@ -2731,7 +2738,7 @@ void ObjectMgr::LoadItemSetNames()
if (setEntry->itemId[i])
itemSetItems.insert(setEntry->itemId[i]);
}
-
+
// 0 1 2
QueryResult result = WorldDatabase.Query("SELECT `entry`, `name`, `InventoryType` FROM `item_set_names`");