Fix duplicate code

pull/303/head
scrawl 7 years ago
parent e4c9d84666
commit 82a211ba03

@ -365,19 +365,7 @@ namespace MWDialogue
}
// check the available services of this actor
int services = 0;
if (mActor.getTypeName() == typeid(ESM::NPC).name())
{
MWWorld::LiveCellRef<ESM::NPC>* ref = mActor.get<ESM::NPC>();
if (ref->mBase->mHasAI)
services = ref->mBase->mAiData.mServices;
}
else if (mActor.getTypeName() == typeid(ESM::Creature).name())
{
MWWorld::LiveCellRef<ESM::Creature>* ref = mActor.get<ESM::Creature>();
if (ref->mBase->mHasAI)
services = ref->mBase->mAiData.mServices;
}
int services = mActor.getClass().getServices(mActor);
int windowServices = 0;

@ -46,7 +46,7 @@ struct NPC
// Other services
Spells = 0x00800,
MagicItems = 0x01000,
Training = 0x04000, // What skills?
Training = 0x04000,
Spellmaking = 0x08000,
Enchanting = 0x10000,
Repair = 0x20000

Loading…
Cancel
Save