diff options
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 96 | ||||
-rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 9 | ||||
-rw-r--r-- | src/server/game/Loot/LootMgr.h | 1 |
3 files changed, 0 insertions, 106 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 1a6ae405edb..f7e42519774 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1710,14 +1710,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Creature.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE: @@ -1727,14 +1719,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Disenchant.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE: @@ -1744,14 +1728,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Fishing.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE: @@ -1761,14 +1737,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Gameobject.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE: @@ -1778,14 +1746,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Item.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE: @@ -1795,14 +1755,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Mail.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE: @@ -1812,14 +1764,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Milling.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE: @@ -1829,14 +1773,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Pickpocketing.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE: @@ -1846,14 +1782,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Prospecting.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE: @@ -1863,14 +1791,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Reference.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE: @@ -1880,14 +1800,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Skinning.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE: @@ -1897,14 +1809,6 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "{} SourceGroup in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->ToString()); return false; } - - LootTemplate* loot = LootTemplates_Spell.GetLootForConditionFill(cond->SourceGroup); - ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); - if (!pItemProto && !loot->isReference(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "{} SourceType, SourceEntry in `condition` table, item does not exist, ignoring.", cond->ToString()); - return false; - } break; } case CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET: diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 833f6a0ad5d..a6ed0eb9fcb 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -863,15 +863,6 @@ bool LootTemplate::LinkConditions(ConditionId const& id, ConditionsReference ref return false; } -bool LootTemplate::isReference(uint32 id) -{ - for (LootStoreItemList::const_iterator ieItr = Entries.begin(); ieItr != Entries.end(); ++ieItr) - if ((*ieItr)->itemid == id && (*ieItr)->reference > 0) - return true; - - return false;//not found or not reference -} - std::unordered_map<ObjectGuid, std::unique_ptr<Loot>> GenerateDungeonEncounterPersonalLoot(uint32 dungeonEncounterId, uint32 lootId, LootStore const& store, LootType type, WorldObject const* lootOwner, uint32 minMoney, uint32 maxMoney, uint16 lootMode, MapDifficultyEntry const* mapDifficulty, std::vector<Player*> const& tappers) diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index c199f263737..74397527c86 100644 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -137,7 +137,6 @@ class TC_GAME_API LootTemplate void Verify(LootStore const& store, uint32 Id) const; void CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const; bool LinkConditions(ConditionId const& id, ConditionsReference reference); - bool isReference(uint32 id); private: LootStoreItemList Entries; // not grouped only |