mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 19:45:33 +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:
parent
07ea63c10c
commit
be4af711af
1 changed files with 9 additions and 4 deletions
|
@ -53,9 +53,14 @@ namespace MWClass
|
||||||
// NPC stats
|
// NPC stats
|
||||||
if (!ref->base->faction.empty())
|
if (!ref->base->faction.empty())
|
||||||
{
|
{
|
||||||
// TODO research how initial rank is stored. The information in loadnpc.hpp are at
|
if(ref->base->npdt52.gold != -10)
|
||||||
// best very unclear.
|
{
|
||||||
data->mNpcStats.mFactionRank[ref->base->faction] = 0;
|
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)
|
for (int i=0; i<27; ++i)
|
||||||
|
@ -281,7 +286,7 @@ namespace MWClass
|
||||||
void Npc::registerSelf()
|
void Npc::registerSelf()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Class> instance (new Npc);
|
boost::shared_ptr<Class> instance (new Npc);
|
||||||
|
std::cout << "class npc:" << typeid (ESM::NPC).name();
|
||||||
registerClass (typeid (ESM::NPC).name(), instance);
|
registerClass (typeid (ESM::NPC).name(), instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue