mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
sep 25 fixes (#9075)
* on class change: remove owned gear from pinned items * move dragging item-info closer to the cursor (food / hatching potion) * remove v-once at attributesPopover (if the parent component is recycled the old data stays active) * prevent popover to show data of an item that was removed - but the popover stays opened
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
NotAuthorized,
|
||||
BadRequest,
|
||||
} from '../libs/errors';
|
||||
import { removePinnedGearByClass, addPinnedGearByClass } from './pinnedGearUtils';
|
||||
import { removePinnedGearByClass, removePinnedItemsByOwnedGear, addPinnedGearByClass } from './pinnedGearUtils';
|
||||
|
||||
function resetClass (user, req = {}) {
|
||||
removePinnedGearByClass(user);
|
||||
@@ -49,6 +49,8 @@ module.exports = function changeClass (user, req = {}, analytics) {
|
||||
user.items.gear.owned[`weapon_${klass}_0`] = true;
|
||||
if (klass === 'rogue') user.items.gear.owned[`shield_${klass}_0`] = true;
|
||||
|
||||
removePinnedItemsByOwnedGear(user);
|
||||
|
||||
if (analytics) {
|
||||
analytics.track('change class', {
|
||||
uuid: user._id,
|
||||
|
||||
Reference in New Issue
Block a user