new client misc fixes (#9033)
* show quests and open quest dialog on click * extract questDialogContent/Drops to separate components & use those in startQuestModal & buyQuestModal * fix market search * remove & readd pinned gear on revive * remove listener once destroyed
This commit is contained in:
@@ -9,6 +9,8 @@ import {
|
||||
import randomVal from '../libs/randomVal';
|
||||
import predictableRandom from '../fns/predictableRandom';
|
||||
|
||||
import { removePinnedGearByClass, addPinnedGearByClass } from './pinnedGearUtils';
|
||||
|
||||
module.exports = function revive (user, req = {}, analytics) {
|
||||
if (user.stats.hp > 0) {
|
||||
throw new NotAuthorized(i18n.t('cannotRevive', req.language));
|
||||
@@ -81,8 +83,12 @@ module.exports = function revive (user, req = {}, analytics) {
|
||||
let item = content.gear.flat[lostItem];
|
||||
|
||||
if (item) {
|
||||
removePinnedGearByClass(user);
|
||||
|
||||
user.items.gear.owned[lostItem] = false;
|
||||
|
||||
addPinnedGearByClass(user);
|
||||
|
||||
if (user.items.gear.equipped[item.type] === lostItem) {
|
||||
user.items.gear.equipped[item.type] = `${item.type}_base_0`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user