1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 16:15:31 +00:00

NPC rank was not loaded. Not sure if it's the right way, but it seems to work.

This commit is contained in:
gugus 2012-04-03 17:30:19 +02:00
parent 07ea63c10c
commit be4af711af

View file

@ -53,9 +53,14 @@ namespace MWClass
// NPC stats
if (!ref->base->faction.empty())
{
// TODO research how initial rank is stored. The information in loadnpc.hpp are at
// best very unclear.
data->mNpcStats.mFactionRank[ref->base->faction] = 0;
if(ref->base->npdt52.gold != -10)
{
data->mNpcStats.mFactionRank[ref->base->faction] = ref->base->npdt52.rank;
}
else
{
data->mNpcStats.mFactionRank[ref->base->faction] = ref->base->npdt52.rank;
}
}
for (int i=0; i<27; ++i)
@ -281,7 +286,7 @@ namespace MWClass
void Npc::registerSelf()
{
boost::shared_ptr<Class> instance (new Npc);
std::cout << "class npc:" << typeid (ESM::NPC).name();
registerClass (typeid (ESM::NPC).name(), instance);
}
}