mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Fixing unintended impact on last page and including special classes
This commit is contained in:
@@ -62,12 +62,17 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
|
|
||||||
var item = Content.gear.flat[key];
|
var item = Content.gear.flat[key];
|
||||||
|
|
||||||
if (item.klass == User.user.stats.class)
|
if (item.klass == User.user.stats.class || item.specialClass == User.user.stats.class) {
|
||||||
{
|
item._effectiveStr = item.str * 1.5;
|
||||||
item.str = item.str * 1.5;
|
item._effectiveCon = item.con * 1.5;
|
||||||
item.con = item.con * 1.5;
|
item._effectivePer = item.per * 1.5;
|
||||||
item.per = item.per * 1.5;
|
item._effectiveInt = item.int * 1.5;
|
||||||
item.int = item.int * 1.5;
|
}
|
||||||
|
else {
|
||||||
|
item._effectiveStr = item.str;
|
||||||
|
item._effectiveCon = item.con;
|
||||||
|
item._effectivePer = item.per;
|
||||||
|
item._effectiveInt = item.int;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$scope.gearByClass[item.klass]) {
|
if (!$scope.gearByClass[item.klass]) {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
habitrpg.controller('SortableInventoryController', ['$scope',
|
habitrpg.controller('SortableInventoryController', ['$scope',
|
||||||
function ($scope) {
|
function ($scope) {
|
||||||
var attributeSort = {
|
var attributeSort = {
|
||||||
constitution: ['-con', '-(con+int+per+str)'],
|
constitution: ['-(_effectiveCon)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||||
intelligence: ['-int', '-(con+int+per+str)'],
|
intelligence: ['-(_effectiveInt)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||||
perception: ['-per', '-(con+int+per+str)'],
|
perception: ['-(_effectivePer)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||||
strength: ['-str', '-(con+int+per+str)'],
|
strength: ['-(_effectiveStr)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||||
set: 'set'
|
set: 'set'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user