alclient
Advanced tools
Comparing version 0.19.30 to 0.19.31
@@ -39,3 +39,3 @@ import { ItemType, WeaponType } from "./definitions/adventureland.js"; | ||
G: GData; | ||
constructor(data: ItemData | ItemData, g: GData); | ||
constructor(itemData: ItemData | ItemData, g: GData); | ||
calculateGrade(): number; | ||
@@ -42,0 +42,0 @@ calculateMinimumCost(): number; |
@@ -36,13 +36,13 @@ export class Item { | ||
G; | ||
constructor(data, g) { | ||
constructor(itemData, g) { | ||
this.G = g; | ||
// Set soft properties | ||
// NOTE: If `data` contains different values, we will overwrite these later | ||
const gData = g.items[data.name]; | ||
const gData = g.items[itemData.name]; | ||
for (const gKey in gData) { | ||
this[gKey] = g.items[data.name][gKey]; | ||
this[gKey] = g.items[itemData.name][gKey]; | ||
} | ||
// Set everything else | ||
for (const key in data) | ||
this[key] = data[key]; | ||
for (const key in itemData) | ||
this[key] = itemData[key]; | ||
// Calculate additional stats from item level | ||
@@ -49,0 +49,0 @@ for (let i = 1; i <= this.level; i++) { |
{ | ||
"name": "alclient", | ||
"version": "0.19.30", | ||
"version": "0.19.31", | ||
"description": "A node client for interacting with Adventure Land - The Code MMORPG. This package extends the functionality of 'alclient' by managing a mongo database.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
1073207