mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 00:35:23 +00:00
Fix duplicate code
This commit is contained in:
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…
x
Reference in New Issue
Block a user