diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-08-25 14:40:20 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-08-25 14:40:20 +0200 |
commit | 6d3be9cca62ec3149af490b8f6dbbd4f3127d531 (patch) | |
tree | 93fc2548db4800fbc3da5047632a13658fa634b1 /src/server/game/Conditions | |
parent | 430321a80367be039c8dadfdb50ba950270bd720 (diff) |
Core/Conditions: Remove unneccessary duplicate condition startup checks - item existance is checked by loot loading and if that fails, condition loading will fail to find related item inside loot
Diffstat (limited to 'src/server/game/Conditions')
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 96 |
1 files changed, 0 insertions, 96 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: |