* fixed stuffextract generation of file charsections.scp
* added to stuffextract extraction of texture files referenced by CreatureDisplayInfo * fixed project file for VC9
This commit is contained in:
parent
23cb869665
commit
e06eb019d0
Binary file not shown.
@ -620,6 +620,10 @@
|
|||||||
RelativePath=".\Client\Gui\Scene.h"
|
RelativePath=".\Client\Gui\Scene.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Client\GUI\SceneData.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Client\Gui\SceneGuiStart.cpp"
|
RelativePath=".\Client\Gui\SceneGuiStart.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -446,16 +446,38 @@ bool ConvertDBC(void)
|
|||||||
for(DBCFile::Iterator it = CreatureDisplayInfo.begin(); it != CreatureDisplayInfo.end(); ++it)
|
for(DBCFile::Iterator it = CreatureDisplayInfo.begin(); it != CreatureDisplayInfo.end(); ++it)
|
||||||
{
|
{
|
||||||
uint32 id = it->getUInt(CREATUREDISPLAYINFO_ID);
|
uint32 id = it->getUInt(CREATUREDISPLAYINFO_ID);
|
||||||
|
uint32 modelid = it->getUInt(CREATUREDISPLAYINFO_MODEL);
|
||||||
|
|
||||||
for(uint32 field=CREATUREDISPLAYINFO_ID; field < CREATUREDISPLAYINFO_END; field++)
|
for(uint32 field=CREATUREDISPLAYINFO_ID; field < CREATUREDISPLAYINFO_END; field++)
|
||||||
{
|
{
|
||||||
if(strlen(CreatureDisplayInfoFieldNames[field]))
|
if(strlen(CreatureDisplayInfoFieldNames[field]))
|
||||||
{
|
{
|
||||||
std::string value = AutoGetDataString(it,CreatureDisplayInfoFormat,field);
|
std::string value = AutoGetDataString(it,CreatureDisplayInfoFormat,field);
|
||||||
if(value.size()) // only store if not null
|
if(value.size()) // only store if not null
|
||||||
|
{
|
||||||
|
if(doTextures && field >= CREATUREDISPLAYINFO_NAME1 && field <= CREATUREDISPLAYINFO_NAME3)
|
||||||
|
{
|
||||||
|
// lookup for model path
|
||||||
|
DBCFile::Iterator itm = CreatureModelData.begin();
|
||||||
|
for(; itm != CreatureDisplayInfo.end() && itm->getInt(CREATUREMODELDATA_ID) != modelid;) ++itm;
|
||||||
|
|
||||||
|
std::string str = itm->getString(CREATUREMODELDATA_FILE);
|
||||||
|
uint32 pathend = str.find_last_of("/\\");
|
||||||
|
if(pathend != std::string::npos) // replace model with texture name
|
||||||
|
str = str.substr(0, pathend);
|
||||||
|
str += "\\";
|
||||||
|
str += value;
|
||||||
|
str += ".blp";
|
||||||
|
texNames.insert(NameAndAlt(str));
|
||||||
|
|
||||||
|
value = NormalizeFilename(str);
|
||||||
|
}
|
||||||
|
|
||||||
CreatureDisplayInfoStorage[id].push_back(std::string(CreatureDisplayInfoFieldNames[field]) + "=" + value);
|
CreatureDisplayInfoStorage[id].push_back(std::string(CreatureDisplayInfoFieldNames[field]) + "=" + value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf("npcsounds..");
|
printf("npcsounds..");
|
||||||
for(DBCFile::Iterator it = NPCSounds.begin(); it != NPCSounds.end(); ++it)
|
for(DBCFile::Iterator it = NPCSounds.begin(); it != NPCSounds.end(); ++it)
|
||||||
@ -489,19 +511,17 @@ bool ConvertDBC(void)
|
|||||||
// so we have to use good names to store all textures without overwriting each other
|
// so we have to use good names to store all textures without overwriting each other
|
||||||
if(field >= CHARSECTIONS_TEXTURE1 && field <= CHARSECTIONS_TEXTURE3)
|
if(field >= CHARSECTIONS_TEXTURE1 && field <= CHARSECTIONS_TEXTURE3)
|
||||||
{
|
{
|
||||||
char buf[100];
|
/*char buf[100];
|
||||||
sprintf(buf,"charsection_%u_%u_%u_%u_%u_%u.blp",
|
sprintf(buf,"charsection_%u_%u_%u_%u_%u_%u.blp",
|
||||||
it->getUInt(CHARSECTIONS_RACE_ID),
|
it->getUInt(CHARSECTIONS_RACE_ID),
|
||||||
it->getUInt(CHARSECTIONS_GENDER),
|
it->getUInt(CHARSECTIONS_GENDER),
|
||||||
it->getUInt(CHARSECTIONS_TYPE),
|
it->getUInt(CHARSECTIONS_TYPE),
|
||||||
it->getUInt(CHARSECTIONS_SECTION),
|
it->getUInt(CHARSECTIONS_SECTION),
|
||||||
it->getUInt(CHARSECTIONS_COLOR),
|
it->getUInt(CHARSECTIONS_COLOR),
|
||||||
field - CHARSECTIONS_TEXTURE1); // texture ID
|
field - CHARSECTIONS_TEXTURE1); // texture ID */
|
||||||
texNames.insert(NameAndAlt(value,buf));
|
texNames.insert(NameAndAlt(value));
|
||||||
value = buf;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
CharSectionStorage[id].push_back(std::string(CharSectionsFieldNames[field]) + "=" + value);
|
CharSectionStorage[id].push_back(std::string(CharSectionsFieldNames[field]) + "=" + NormalizeFilename(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user