Normalise spelling of "levelled" throughout the code

pull/470/head
scrawl 10 years ago
parent 0c6e2170db
commit 6d097fbfbd

@ -837,7 +837,7 @@ void Record<ESM::CreatureLevList>::print()
std::cout << " Chance for None: " << (int)mData.mChanceNone << std::endl;
std::cout << " Flags: " << creatureListFlags(mData.mFlags) << std::endl;
std::cout << " Number of items: " << mData.mList.size() << std::endl;
std::vector<ESM::LeveledListBase::LevelItem>::iterator iit;
std::vector<ESM::LevelledListBase::LevelItem>::iterator iit;
for (iit = mData.mList.begin(); iit != mData.mList.end(); ++iit)
std::cout << " Creature: Level: " << iit->mLevel
<< " Creature: " << iit->mId << std::endl;
@ -849,7 +849,7 @@ void Record<ESM::ItemLevList>::print()
std::cout << " Chance for None: " << (int)mData.mChanceNone << std::endl;
std::cout << " Flags: " << itemListFlags(mData.mFlags) << std::endl;
std::cout << " Number of items: " << mData.mList.size() << std::endl;
std::vector<ESM::LeveledListBase::LevelItem>::iterator iit;
std::vector<ESM::LevelledListBase::LevelItem>::iterator iit;
for (iit = mData.mList.begin(); iit != mData.mList.end(); ++iit)
std::cout << " Inventory: Level: " << iit->mLevel
<< " Item: " << iit->mId << std::endl;

@ -22,7 +22,7 @@ namespace ESSImport
ActorData::load(esm);
if (esm.isNextSub("LVCR"))
{
// occurs on leveled creature spawner references
// occurs on levelled creature spawner references
// probably some identifier for the creature that has been spawned?
unsigned char lvcr;
esm.getHT(lvcr);
@ -32,7 +32,7 @@ namespace ESSImport
mEnabled = true;
esm.getHNOT(mEnabled, "ZNAM");
// DATA should occur for all references, except leveled creature spawners
// DATA should occur for all references, except levelled creature spawners
// I've seen DATA *twice* on a creature record, and with the exact same content too! weird
// alarmvoi0000.ess
esm.getHNOT(mPos, "DATA", 24);

@ -12,9 +12,9 @@ namespace MWMechanics
{
/// @return ID of resulting item, or empty if none
inline std::string getLevelledItem (const ESM::LeveledListBase* levItem, bool creature, unsigned char failChance=0)
inline std::string getLevelledItem (const ESM::LevelledListBase* levItem, bool creature, unsigned char failChance=0)
{
const std::vector<ESM::LeveledListBase::LevelItem>& items = levItem->mList;
const std::vector<ESM::LevelledListBase::LevelItem>& items = levItem->mList;
const MWWorld::Ptr& player = MWBase::Environment::get().getWorld()->getPlayerPtr();
int playerLevel = player.getClass().getCreatureStats(player).getLevel();
@ -27,7 +27,7 @@ namespace MWMechanics
std::vector<std::string> candidates;
int highestLevel = 0;
for (std::vector<ESM::LeveledListBase::LevelItem>::const_iterator it = items.begin(); it != items.end(); ++it)
for (std::vector<ESM::LevelledListBase::LevelItem>::const_iterator it = items.begin(); it != items.end(); ++it)
{
if (it->mLevel > highestLevel && it->mLevel <= playerLevel)
highestLevel = it->mLevel;
@ -39,7 +39,7 @@ namespace MWMechanics
allLevels = levItem->mFlags & ESM::CreatureLevList::AllLevels;
std::pair<int, std::string> highest = std::make_pair(-1, "");
for (std::vector<ESM::LeveledListBase::LevelItem>::const_iterator it = items.begin(); it != items.end(); ++it)
for (std::vector<ESM::LevelledListBase::LevelItem>::const_iterator it = items.begin(); it != items.end(); ++it)
{
if (playerLevel >= it->mLevel
&& (allLevels || it->mLevel == highestLevel))

@ -200,7 +200,7 @@ void MWMechanics::NpcStats::useSkill (int skillIndex, const ESM::Class& class_,
if (value.getProgress()>=1)
{
// skill leveled up
// skill levelled up
increaseSkill(skillIndex, class_, false);
}
}

@ -34,24 +34,24 @@
namespace
{
void addToLevList(ESM::LeveledListBase* list, const std::string& itemId, int level)
void addToLevList(ESM::LevelledListBase* list, const std::string& itemId, int level)
{
for (std::vector<ESM::LeveledListBase::LevelItem>::iterator it = list->mList.begin(); it != list->mList.end();)
for (std::vector<ESM::LevelledListBase::LevelItem>::iterator it = list->mList.begin(); it != list->mList.end();)
{
if (it->mLevel == level && itemId == it->mId)
return;
}
ESM::LeveledListBase::LevelItem item;
ESM::LevelledListBase::LevelItem item;
item.mId = itemId;
item.mLevel = level;
list->mList.push_back(item);
}
void removeFromLevList(ESM::LeveledListBase* list, const std::string& itemId, int level)
void removeFromLevList(ESM::LevelledListBase* list, const std::string& itemId, int level)
{
// level of -1 removes all items with that itemId
for (std::vector<ESM::LeveledListBase::LevelItem>::iterator it = list->mList.begin(); it != list->mList.end();)
for (std::vector<ESM::LevelledListBase::LevelItem>::iterator it = list->mList.begin(); it != list->mList.end();)
{
if (level != -1 && it->mLevel != level)
{

@ -7,7 +7,7 @@
namespace ESM
{
void LeveledListBase::load(ESMReader &esm)
void LevelledListBase::load(ESMReader &esm)
{
esm.getHNT(mFlags, "DATA");
esm.getHNT(mChanceNone, "NNAM");
@ -34,7 +34,7 @@ void LeveledListBase::load(ESMReader &esm)
esm.getHNT(li.mLevel, "INTV");
}
}
void LeveledListBase::save(ESMWriter &esm) const
void LevelledListBase::save(ESMWriter &esm) const
{
esm.writeHNT("DATA", mFlags);
esm.writeHNT("NNAM", mChanceNone);
@ -47,7 +47,7 @@ void LeveledListBase::save(ESMWriter &esm) const
}
}
void LeveledListBase::blank()
void LevelledListBase::blank()
{
mFlags = 0;
mChanceNone = 0;

@ -11,14 +11,14 @@ class ESMReader;
class ESMWriter;
/*
* Leveled lists. Since these have identical layout, I only bothered
* Levelled lists. Since these have identical layout, I only bothered
* to implement it once.
*
* We should later implement the ability to merge leveled lists from
* We should later implement the ability to merge levelled lists from
* several files.
*/
struct LeveledListBase
struct LevelledListBase
{
int mFlags;
unsigned char mChanceNone; // Chance that none are selected (0-100)
@ -43,7 +43,7 @@ struct LeveledListBase
///< Set record to default state (does not touch the ID).
};
struct CreatureLevList: LeveledListBase
struct CreatureLevList: LevelledListBase
{
static unsigned int sRecordId;
@ -61,7 +61,7 @@ struct CreatureLevList: LeveledListBase
}
};
struct ItemLevList: LeveledListBase
struct ItemLevList: LevelledListBase
{
static unsigned int sRecordId;
@ -72,7 +72,7 @@ struct ItemLevList: LeveledListBase
// list is instantiated, instead of
// giving several identical items
// (used when a container has more
// than one instance of one leveled
// than one instance of one levelled
// list.)
AllLevels = 0x02 // Calculate from all levels <= player
// level, not just the closest below

Loading…
Cancel
Save