1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

Some changes in weapons check.

This commit is contained in:
Marek Kochanowicz 2014-01-03 18:23:11 +01:00
parent 7b63e1942c
commit 1c3296fb64

View File

@ -8,6 +8,7 @@
#include "../world/record.hpp"
#include "../world/universalid.hpp"
#include <components/esm/loadmgef.hpp>
CSMTools::ReferenceableCheckStage::ReferenceableCheckStage(const CSMWorld::RefIdData& referenceable, const CSMWorld::IdCollection<ESM::Race >& races, const CSMWorld::IdCollection<ESM::Class>& classes, const CSMWorld::IdCollection<ESM::Faction>& faction) :
mReferencables(referenceable),
@ -551,6 +552,7 @@ void CSMTools::ReferenceableCheckStage::lightCheck(int stage, const CSMWorld::Re
}
}
}
void CSMTools::ReferenceableCheckStage::lockpickCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::Lockpick >& records, std::vector< std::string >& messages)
{
const CSMWorld::RecordBase& baserecord = records.getRecord(stage);
@ -667,7 +669,6 @@ void CSMTools::ReferenceableCheckStage::npcCheck(int stage, const CSMWorld::RefI
{
messages.push_back(id.toString() + "|" + NPC.mId + " willpower has zero value");
}
}
if (level < 1)
@ -771,10 +772,13 @@ void CSMTools::ReferenceableCheckStage::weaponCheck(int stage, const CSMWorld::R
//TODO, It seems that this stuff for spellcasting is obligatory and In fact We should check if records are present
if
(
Weapon.mId.find("VFX_") == std::string::npos
and Weapon.mId != "magic_bolt"
and Weapon.mId != "shield_bolt"
and Weapon.mId != "shock_bolt"
//THOSE ARE HARDCODED!
Weapon.mId != "VFX_Hands"
and Weapon.mId != "VFX_Absorb"
and Weapon.mId != "VFX_Reflect"
and Weapon.mId != "VFX_DefaultBolt"
//THIS ONE IS NOT, but it thas to be ignored as well
//TODO I don't know how to get full list of effects :/
)
{
inventoryItemCheck<ESM::Weapon>(Weapon, messages, id.toString(), true);
@ -977,5 +981,4 @@ template<typename LIST> void CSMTools::ReferenceableCheckStage::listCheck(const
messages.push_back(someid + "|" + somelist.mId + " contains item with non-positive level");
}
}
}
}