diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-05-31 15:39:18 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-05-31 15:39:18 +0200 |
commit | 5eee40249c51b35719a18907da94d64d98f89258 (patch) | |
tree | c599a974f1734a2eedceaeab38764d3f87a88aa3 /src/server/game/Globals/ObjectMgr.cpp | |
parent | b5443af772f54800321a30cc789cfa6ae85c5188 (diff) |
Core/Items: Added custom flags field to item_template, currently 2 flag values are available
* ITEM_FLAGS_CU_DURATION_REAL_TIME determines item duration counts even if offline (replaced ugly negative duration workaround, easy to lose data when importing fresh wdb)
* ITEM_FLAGS_CU_IGNORE_QUEST_STATUS quest status will not affect this item appearing in loot, currently needed for Arena Master trinket
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rwxr-xr-x | src/server/game/Globals/ObjectMgr.cpp | 15 |
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`"); |