mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Adjust value for several item types as according to wiki
This commit is contained in:
parent
b6c22ad5d9
commit
6451b687d9
@ -169,7 +169,10 @@ namespace MWClass
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->mBase->mData.mValue;
|
||||
if (ptr.getCellRef().mCharge == -1)
|
||||
return ref->mBase->mData.mValue;
|
||||
else
|
||||
return ref->mBase->mData.mValue * (ptr.getCellRef().mCharge / getItemMaxHealth(ptr));
|
||||
}
|
||||
|
||||
void Armor::registerSelf()
|
||||
|
@ -86,7 +86,10 @@ namespace MWClass
|
||||
MWWorld::LiveCellRef<ESM::Lockpick> *ref =
|
||||
ptr.get<ESM::Lockpick>();
|
||||
|
||||
return ref->mBase->mData.mValue;
|
||||
if (ptr.getCellRef().mCharge == -1)
|
||||
return ref->mBase->mData.mValue;
|
||||
else
|
||||
return ref->mBase->mData.mValue * (ptr.getCellRef().mCharge / getItemMaxHealth(ptr));
|
||||
}
|
||||
|
||||
void Lockpick::registerSelf()
|
||||
|
@ -85,7 +85,10 @@ namespace MWClass
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->mBase->mData.mValue;
|
||||
if (ptr.getCellRef().mCharge == -1)
|
||||
return ref->mBase->mData.mValue;
|
||||
else
|
||||
return ref->mBase->mData.mValue * (ptr.getCellRef().mCharge / getItemMaxHealth(ptr));
|
||||
}
|
||||
|
||||
void Probe::registerSelf()
|
||||
|
@ -76,7 +76,10 @@ namespace MWClass
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->mBase->mData.mValue;
|
||||
if (ptr.getCellRef().mCharge == -1)
|
||||
return ref->mBase->mData.mValue;
|
||||
else
|
||||
return ref->mBase->mData.mValue * (ptr.getCellRef().mCharge / getItemMaxHealth(ptr));
|
||||
}
|
||||
|
||||
void Repair::registerSelf()
|
||||
|
@ -154,7 +154,10 @@ namespace MWClass
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->mBase->mData.mValue;
|
||||
if (ptr.getCellRef().mCharge == -1)
|
||||
return ref->mBase->mData.mValue;
|
||||
else
|
||||
return ref->mBase->mData.mValue * (ptr.getCellRef().mCharge / getItemMaxHealth(ptr));
|
||||
}
|
||||
|
||||
void Weapon::registerSelf()
|
||||
|
Loading…
x
Reference in New Issue
Block a user