WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
database.h
Go to the documentation of this file.
1#pragma once
2
3// Combined the previous 5 various "db" files into one.
4// trying to cut down on excess files.
5// Also instead of declaring the db objects inside various classes
6// may aswell declare them as globals since pretty much most the
7// different objects need to access them at one point or another.
8
9// STL
10#include <vector>
11#include <map>
12
13#include <string>
14
15// wmv database
16class ItemDatabase;
17struct NPCRecord;
18
19class ItemDatabase;
20
21extern ItemDatabase items;
22extern std::vector<NPCRecord> npcs;
23
26{
27 std::string name;
29
30 ItemRecord(const std::vector<std::string>&);
31
32 ItemRecord(): id(0), itemclass(-1), subclass(-1), type(0), model(0), sheath(0), quality(0)
33 {
34 }
35
36 int slot();
37};
38
41{
42public:
44
45 std::vector<ItemRecord> items;
46 std::map<int, int> itemLookup;
47
48 const ItemRecord& getById(int id) const;
49};
50
53{
54 std::string name;
55 int id, model, type;
56
57 NPCRecord(const std::string& line);
58 NPCRecord(const std::vector<std::string>&);
59
60 NPCRecord(): id(0), model(0), type(0)
61 {
62 }
63};
In-memory item database loaded from the CSV item list.
Definition database.h:41
std::map< int, int > itemLookup
Definition database.h:46
std::vector< ItemRecord > items
Definition database.h:45
const ItemRecord & getById(int id) const
Definition database.cpp:97
std::vector< NPCRecord > npcs
Definition database.cpp:8
ItemDatabase items
Definition database.cpp:7
A single equipment item record from the item database.
Definition database.h:26
int itemclass
Definition database.h:28
int quality
Definition database.h:28
int slot()
Definition database.cpp:37
int model
Definition database.h:28
std::string name
Display name of the item.
Definition database.h:27
int sheath
Definition database.h:28
int subclass
Definition database.h:28
A single NPC record (creature display info).
Definition database.h:53
std::string name
Display name of the NPC.
Definition database.h:54
int type
Creature ID, display model ID, and type.
Definition database.h:55
int model
Definition database.h:55
NPCRecord()
Definition database.h:60