update notifications lib

This commit is contained in:
Matteo Pagliazzi 2017-10-02 09:26:41 +02:00
parent d0bd62bf02
commit 7045b5c214

View file

@ -1,15 +1,17 @@
export function getDropClass (item) {
export function getDropClass ({type, key}) {
let dropClass = '';
if (item) {
switch (item.type) {
if (type) {
switch (type) {
case 'Egg':
dropClass = `Pet_Egg_${item.key}`;
dropClass = `Pet_Egg_${key}`;
break;
case 'HatchingPotion':
dropClass = `Pet_HatchingPotion_${item.key}`;
dropClass = `Pet_HatchingPotion_${key}`;
break;
case 'Food':
dropClass = `Pet_Food_${item.key}`;
case 'food':
dropClass = `Pet_Food_${key}`;
break;
case 'armor':
case 'back':
@ -19,11 +21,13 @@ export function getDropClass (item) {
case 'headAccessory':
case 'shield':
case 'weapon':
dropClass = `shop_${item.key}`;
case 'gear':
dropClass = `shop_${key}`;
break;
default:
dropClass = 'glyphicon glyphicon-gift';
}
}
return dropClass;
}
}