mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-19 03:05:48 +00:00
fix runes including non martial weapons
This commit is contained in:
@@ -78,20 +78,25 @@ export const WEAPON_ONE_HANDED = new Set([
|
||||
...WEAPON_ONE_HANDED_MELEE,
|
||||
]);
|
||||
|
||||
export const WEAPONE_TWO_HANDED_MELEE = new Set([
|
||||
export const WEAPON_TWO_HANDED_MELEE = new Set([
|
||||
ItemCategory.TwoHandedAxe,
|
||||
ItemCategory.TwoHandedMace,
|
||||
ItemCategory.TwoHandedSword,
|
||||
ItemCategory.Warstaff,
|
||||
]);
|
||||
|
||||
export const MARTIAL_WEAPON = new Set([
|
||||
ItemCategory.Bow,
|
||||
ItemCategory.Crossbow,
|
||||
...WEAPON_ONE_HANDED_MELEE,
|
||||
...WEAPON_TWO_HANDED_MELEE,
|
||||
]);
|
||||
|
||||
export const WEAPON = new Set([
|
||||
ItemCategory.Staff,
|
||||
ItemCategory.FishingRod,
|
||||
ItemCategory.Bow,
|
||||
ItemCategory.Crossbow,
|
||||
...WEAPON_ONE_HANDED,
|
||||
...WEAPONE_TWO_HANDED_MELEE,
|
||||
...MARTIAL_WEAPON,
|
||||
]);
|
||||
|
||||
export const ARMOUR = new Set([
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { ItemRarity, ParsedItem } from "@/parser";
|
||||
import { ARMOUR, ItemCategory, ItemEditorType, WEAPON } from "@/parser/meta";
|
||||
import {
|
||||
ARMOUR,
|
||||
ItemCategory,
|
||||
ItemEditorType,
|
||||
MARTIAL_WEAPON,
|
||||
} from "@/parser/meta";
|
||||
|
||||
function decimalPlaces(value: number, dp: number | boolean): number {
|
||||
if (typeof dp === "number") {
|
||||
@@ -47,7 +52,7 @@ export function getItemEditorType(item: ParsedItem): ItemEditorType {
|
||||
) {
|
||||
return ItemEditorType.Catalyst;
|
||||
} else if (
|
||||
(WEAPON.has(item.category) || ARMOUR.has(item.category)) &&
|
||||
(MARTIAL_WEAPON.has(item.category) || ARMOUR.has(item.category)) &&
|
||||
item.rarity &&
|
||||
item.rarity !== ItemRarity.Unique
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user