Clean up item loading from XDT.

This commit is contained in:
Gent S
2020-12-04 13:57:08 -05:00
parent 856a90abcf
commit 794856a63c
4 changed files with 32 additions and 18 deletions

View File

@@ -3,10 +3,6 @@
#include "CNShardServer.hpp"
#include "Player.hpp"
struct Item {
bool tradeable, sellable;
int buyPrice, sellPrice, stackSize, level, rarity, pointDamage, groupDamage, defense, gender; // TODO: implement more as needed
};
struct VendorListing {
int sort, type, iID;
};
@@ -25,6 +21,10 @@ namespace ItemManager {
INVENTORY = 1,
BANK = 3
};
struct Item {
bool tradeable, sellable;
int buyPrice, sellPrice, stackSize, level, rarity, pointDamage, groupDamage, defense, gender; // TODO: implement more as needed
};
// hopefully this is fine since it's never modified after load
extern std::map<std::pair<int32_t, int32_t>, Item> ItemData; // <id, type> -> data
extern std::map<int32_t, std::vector<VendorListing>> VendorTables;