|
|
@ -137,6 +137,9 @@ namespace MWMechanics
|
|
|
|
MWMechanics::CreatureStats& stats =
|
|
|
|
MWMechanics::CreatureStats& stats =
|
|
|
|
MWWorld::Class::get (mWatched).getCreatureStats (mWatched);
|
|
|
|
MWWorld::Class::get (mWatched).getCreatureStats (mWatched);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MWMechanics::NpcStats& npcStats =
|
|
|
|
|
|
|
|
MWWorld::Class::get (mWatched).getNpcStats (mWatched);
|
|
|
|
|
|
|
|
|
|
|
|
static const char *attributeNames[8] =
|
|
|
|
static const char *attributeNames[8] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"AttribVal1", "AttribVal2", "AttribVal3", "AttribVal4", "AttribVal5",
|
|
|
|
"AttribVal1", "AttribVal2", "AttribVal3", "AttribVal4", "AttribVal5",
|
|
|
@ -148,6 +151,17 @@ namespace MWMechanics
|
|
|
|
"HBar", "MBar", "FBar"
|
|
|
|
"HBar", "MBar", "FBar"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const char *skillNames[27] =
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"SkillBlock", "SkillArmorer", "SkillMediumArmor", "SkillHeavyArmor",
|
|
|
|
|
|
|
|
"SkillBluntWeapon", "SkillLongBlade", "SkillAxe", "SkillSpear",
|
|
|
|
|
|
|
|
"SkillAthletics", "SkillEnchant", "SkillDestruction", "SkillAlteration",
|
|
|
|
|
|
|
|
"SkillIllusion", "SkillConjuration", "SkillMysticism", "SkillRestoration",
|
|
|
|
|
|
|
|
"SkillAlchemy", "SkillUnarmored", "SkillSecurity", "SkillSneak",
|
|
|
|
|
|
|
|
"SkillAcrobatics", "SkillLightArmor", "SkillShortBlade", "SkillMarksman",
|
|
|
|
|
|
|
|
"SkillMercantile", "SkillSpeechcraft", "SkillHandToHand",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0; i<8; ++i)
|
|
|
|
for (int i=0; i<8; ++i)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (stats.mAttributes[i]!=mWatchedCreature.mAttributes[i])
|
|
|
|
if (stats.mAttributes[i]!=mWatchedCreature.mAttributes[i])
|
|
|
@ -168,6 +182,24 @@ namespace MWMechanics
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool update = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0; i<27; ++i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (npcStats.mSkill[i]!=mWatchedNpc.mSkill[i])
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
update = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mWatchedNpc.mSkill[i] = npcStats.mSkill[i];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mEnvironment.mWindowManager->setValue (skillNames[i], npcStats.mSkill[i]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (update)
|
|
|
|
|
|
|
|
mEnvironment.mWindowManager->updateSkillArea();
|
|
|
|
|
|
|
|
|
|
|
|
mEnvironment.mWindowManager->setValue ("level", stats.mLevel);
|
|
|
|
mEnvironment.mWindowManager->setValue ("level", stats.mLevel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -181,6 +213,17 @@ namespace MWMechanics
|
|
|
|
mEnvironment.mWindowManager->setValue ("class",
|
|
|
|
mEnvironment.mWindowManager->setValue ("class",
|
|
|
|
mEnvironment.mWorld->getPlayerPos().getClass().name);
|
|
|
|
mEnvironment.mWorld->getPlayerPos().getClass().name);
|
|
|
|
mUpdatePlayer = false;
|
|
|
|
mUpdatePlayer = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MWGui::WindowManager::SkillList majorSkills (5);
|
|
|
|
|
|
|
|
MWGui::WindowManager::SkillList minorSkills (5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0; i<5; ++i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
minorSkills[i] = mEnvironment.mWorld->getPlayerPos().getClass().data.skills[i][0];
|
|
|
|
|
|
|
|
majorSkills[i] = mEnvironment.mWorld->getPlayerPos().getClass().data.skills[i][1];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mEnvironment.mWindowManager->configureSkills (majorSkills, minorSkills);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|