diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-04-02 20:36:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-04-02 20:36:17 +0300 |
commit | 9e94feb923afe8ce73b6590b73f513dd3895e70b (patch) | |
tree | c60c6979ef76ebf1b820000883e4c79e6a928777 /src/resources/db/statuseffectdb.cpp | |
parent | b9584b9b876709ae97e94929d3904975e8143832 (diff) | |
download | mv-9e94feb923afe8ce73b6590b73f513dd3895e70b.tar.gz mv-9e94feb923afe8ce73b6590b73f513dd3895e70b.tar.bz2 mv-9e94feb923afe8ce73b6590b73f513dd3895e70b.tar.xz mv-9e94feb923afe8ce73b6590b73f513dd3895e70b.zip |
Remove legacy status effect field "block-id".
Before was warning about this field for some years.
Diffstat (limited to 'src/resources/db/statuseffectdb.cpp')
-rw-r--r-- | src/resources/db/statuseffectdb.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/resources/db/statuseffectdb.cpp b/src/resources/db/statuseffectdb.cpp index 72dbf26a6..77da2737a 100644 --- a/src/resources/db/statuseffectdb.cpp +++ b/src/resources/db/statuseffectdb.cpp @@ -42,17 +42,8 @@ namespace OptionsMap opt1ToIdMap; OptionsMap opt2ToIdMap; OptionsMap opt3ToIdMap; - - OptionsMap blockIdToIdMap; } // namespace -int StatusEffectDB::blockIdToId(const int blockIndex) -{ - if (blockIdToIdMap.find(blockIndex) == blockIdToIdMap.end()) - return -1; - return blockIdToIdMap[blockIndex]; -} - StatusEffect *StatusEffectDB::getStatusEffect(const int index, const Enable enabling) { @@ -78,11 +69,6 @@ void StatusEffectDB::load() SkipError_true); loadXmlDir("statusEffectsPatchDir", loadXmlFile); - if (!blockIdToIdMap.empty()) - { - reportAlways("Detected legacy attribute block-id " - "in status-effects.xml"); - } mLoaded = true; } @@ -113,12 +99,6 @@ void StatusEffectDB::loadXmlFile(const std::string &fileName, } int id = XML::getProperty(node, "id", -1); - - // legacy field. Only for clients 1.6.3.12 and older - const int blockId = XML::getProperty(node, "block-id", -1); - if (id >= 0 && blockId >= 0) - blockIdToIdMap[blockId] = id; - if (id == -1) { id = fakeId; @@ -131,22 +111,18 @@ void StatusEffectDB::loadXmlFile(const std::string &fileName, if (option != 0) { optionToIdMap[option] = id; - settings.legacyEffects = false; } if (opt1 != 0) { opt1ToIdMap[opt1] = id; - settings.legacyEffects = false; } if (opt2 != 0) { opt2ToIdMap[opt2] = id; - settings.legacyEffects = false; } if (opt3 != 0) { opt3ToIdMap[opt3] = id; - settings.legacyEffects = false; } StatusEffect *startEffect = statusEffects[1][id]; @@ -225,7 +201,6 @@ void StatusEffectDB::unload() opt1ToIdMap.clear(); opt2ToIdMap.clear(); opt3ToIdMap.clear(); - blockIdToIdMap.clear(); mLoaded = false; } |