|
|
@ -32,7 +32,7 @@ namespace MWWorld
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
assert(it != invStore.end());
|
|
|
|
assert(it != invStore.end());
|
|
|
|
|
|
|
|
|
|
|
|
std::string npcRace = actor.get<ESM::NPC>()->mBase->mRace;
|
|
|
|
std::string npcRace = actor.get<ESM::NPC>()->mBase->mRace;
|
|
|
|
|
|
|
|
|
|
|
|
// equip the item in the first free slot
|
|
|
|
// equip the item in the first free slot
|
|
|
@ -43,7 +43,7 @@ namespace MWWorld
|
|
|
|
// Beast races cannot equip shoes / boots, or full helms (head part vs hair part)
|
|
|
|
// Beast races cannot equip shoes / boots, or full helms (head part vs hair part)
|
|
|
|
if(npcRace == "argonian" || npcRace == "khajiit")
|
|
|
|
if(npcRace == "argonian" || npcRace == "khajiit")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(*slot == MWWorld::InventoryStore::Slot_Helmet){
|
|
|
|
if(*slot == MWWorld::InventoryStore::Slot_Helmet){
|
|
|
|
std::vector<ESM::PartReference> parts;
|
|
|
|
std::vector<ESM::PartReference> parts;
|
|
|
|
|
|
|
|
|
|
|
|
if(it.getType() == MWWorld::ContainerStore::Type_Clothing)
|
|
|
|
if(it.getType() == MWWorld::ContainerStore::Type_Clothing)
|
|
|
@ -54,22 +54,22 @@ namespace MWWorld
|
|
|
|
bool allow = true;
|
|
|
|
bool allow = true;
|
|
|
|
for(std::vector<ESM::PartReference>::iterator itr = parts.begin(); itr != parts.end(); ++itr)
|
|
|
|
for(std::vector<ESM::PartReference>::iterator itr = parts.begin(); itr != parts.end(); ++itr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if((*itr).mPart == ESM::PartReferenceType::PRT_Head)
|
|
|
|
if((*itr).mPart == ESM::PRT_Head)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(actor == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
|
|
|
|
if(actor == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
|
|
|
|
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage13}", std::vector<std::string>());
|
|
|
|
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage13}", std::vector<std::string>());
|
|
|
|
|
|
|
|
|
|
|
|
allow = false;
|
|
|
|
allow = false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!allow)
|
|
|
|
if(!allow)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (*slot == MWWorld::InventoryStore::Slot_Boots)
|
|
|
|
if (*slot == MWWorld::InventoryStore::Slot_Boots)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Only notify the player, not npcs
|
|
|
|
// Only notify the player, not npcs
|
|
|
|
if(actor == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
|
|
|
|
if(actor == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|