⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 creaturedb.cpp

📁 wowmodelview魔兽世界的模型查看工具。下了看看吧
💻 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 + -