📄 creaturedb.cpp
字号:
#include "creaturedb.h"
CreatureModelDB::CreatureModelDB(): DBCFile("DBFilesClient\\CreatureModelData.dbc")
{
}
CreatureModelDB::~CreatureModelDB()
{
}
CreatureModelDB::Record CreatureModelDB::getByFilename(std::string fn)
{
/// Brute force search for now
for(Iterator i=begin(); i!=end(); ++i)
{
wxString str(i->getString(Filename));
if(str.IsSameAs(fn.c_str(), false) == true)
return (*i);
}
throw NotFound();
}
CreatureSkinDB::CreatureSkinDB(): DBCFile("DBFilesClient\\CreatureDisplayInfo.dbc")
{
}
CreatureSkinDB::~CreatureSkinDB()
{
}
CreatureSkinDB::Record CreatureSkinDB::getByModelID(unsigned int id)
{
/// Brute force search for now
for(Iterator i=begin(); i!=end(); ++i)
{
if(i->getUInt(ModelID) == id)
return (*i);
}
throw NotFound();
}
CreatureSkinDB::Record CreatureSkinDB::getBySkinID(unsigned int id)
{
/// Brute force search for now
for(Iterator i=begin(); i!=end(); ++i)
{
if(i->getUInt(SkinID) == id)
return (*i);
}
throw NotFound();
}
NPCDB::NPCDB(): DBCFile("DBFilesClient\\CreatureDisplayInfoExtra.dbc")
{
}
NPCDB::~NPCDB()
{
}
NPCDB::Record NPCDB::getByFilename(std::string fn)
{
/// Brute force search for now
for(Iterator i=begin(); i!=end(); ++i)
{
if(i->getString(Filename) == fn) {
std::cout << i->getString(Filename) << "\n";
return (*i);
}
}
throw NotFound();
}
NPCDB::Record NPCDB::getByNPCID(unsigned int id)
{
/// Brute force search for now
for(Iterator i=begin(); i!=end(); ++i)
{
if(i->getUInt(NPCID) == id)
return (*i);
}
throw NotFound();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -