mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 03:53:52 +00:00
adjust player's attributes according to class boni
This commit is contained in:
parent
de04ae0900
commit
d910baebe6
1 changed files with 13 additions and 1 deletions
|
@ -18,7 +18,7 @@ namespace MWMechanics
|
||||||
MWMechanics::CreatureStats& creatureStats = MWWorld::Class::get (ptr).getCreatureStats (ptr);
|
MWMechanics::CreatureStats& creatureStats = MWWorld::Class::get (ptr).getCreatureStats (ptr);
|
||||||
// MWMechanics::NpcStats& npcStats = MWWorld::Class::get (ptr).getNpcStats (ptr);
|
// MWMechanics::NpcStats& npcStats = MWWorld::Class::get (ptr).getNpcStats (ptr);
|
||||||
|
|
||||||
const ESM::NPC *player = ptr.get<ESM::NPC>()->base;
|
// const ESM::NPC *player = ptr.get<ESM::NPC>()->base;
|
||||||
|
|
||||||
// reset
|
// reset
|
||||||
|
|
||||||
|
@ -53,6 +53,18 @@ namespace MWMechanics
|
||||||
// birthsign
|
// birthsign
|
||||||
|
|
||||||
// class
|
// class
|
||||||
|
const ESM::Class& class_ = mEnvironment.mWorld->getPlayerPos().getClass();
|
||||||
|
|
||||||
|
for (int i=0; i<2; ++i)
|
||||||
|
{
|
||||||
|
int attribute = class_.data.attribute[i];
|
||||||
|
if (attribute>=0 && attribute<8)
|
||||||
|
{
|
||||||
|
creatureStats.mAttributes[attribute].setBase (
|
||||||
|
creatureStats.mAttributes[attribute].getBase() + 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// calculate dynamic stats
|
// calculate dynamic stats
|
||||||
int strength = creatureStats.mAttributes[0].getBase();
|
int strength = creatureStats.mAttributes[0].getBase();
|
||||||
|
|
Loading…
Reference in a new issue