*Load gobject display info from dbc to check go boundaries.
--HG-- branch : trunk
This commit is contained in:
@@ -66,6 +66,8 @@ static FactionTeamMap sFactionTeamMap;
|
|||||||
DBCStorage <FactionEntry> sFactionStore(FactionEntryfmt);
|
DBCStorage <FactionEntry> sFactionStore(FactionEntryfmt);
|
||||||
DBCStorage <FactionTemplateEntry> sFactionTemplateStore(FactionTemplateEntryfmt);
|
DBCStorage <FactionTemplateEntry> sFactionTemplateStore(FactionTemplateEntryfmt);
|
||||||
|
|
||||||
|
DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt);
|
||||||
|
|
||||||
DBCStorage <GemPropertiesEntry> sGemPropertiesStore(GemPropertiesEntryfmt);
|
DBCStorage <GemPropertiesEntry> sGemPropertiesStore(GemPropertiesEntryfmt);
|
||||||
DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt);
|
DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt);
|
||||||
DBCStorage <GlyphSlotEntry> sGlyphSlotStore(GlyphSlotfmt);
|
DBCStorage <GlyphSlotEntry> sGlyphSlotStore(GlyphSlotfmt);
|
||||||
@@ -263,6 +265,20 @@ void LoadDBCStores(const std::string& dataPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc");
|
||||||
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGameObjectDisplayInfoStore, dbcPath,"GameObjectDisplayInfo.dbc");
|
||||||
|
for(uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
|
||||||
|
{
|
||||||
|
if(GameObjectDisplayInfoEntry const * info = sGameObjectDisplayInfoStore.LookupEntry(i))
|
||||||
|
{
|
||||||
|
if(info->maxX < info->minX)
|
||||||
|
std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
|
||||||
|
if(info->maxY < info->minY)
|
||||||
|
std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
|
||||||
|
if(info->maxZ < info->minZ)
|
||||||
|
std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGemPropertiesStore, dbcPath,"GemProperties.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGemPropertiesStore, dbcPath,"GemProperties.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphPropertiesStore, dbcPath,"GlyphProperties.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphPropertiesStore, dbcPath,"GlyphProperties.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphSlotStore, dbcPath,"GlyphSlot.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphSlotStore, dbcPath,"GlyphSlot.dbc");
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ extern DBCStorage <EmotesEntry> sEmotesStore;
|
|||||||
extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
|
extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
|
||||||
extern DBCStorage <FactionEntry> sFactionStore;
|
extern DBCStorage <FactionEntry> sFactionStore;
|
||||||
extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore;
|
extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore;
|
||||||
|
extern DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore;
|
||||||
extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore;
|
extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore;
|
||||||
extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
|
extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
|
||||||
extern DBCStorage <GlyphSlotEntry> sGlyphSlotStore;
|
extern DBCStorage <GlyphSlotEntry> sGlyphSlotStore;
|
||||||
|
|||||||
@@ -837,6 +837,20 @@ struct FactionTemplateEntry
|
|||||||
bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD)!=0; }
|
bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD)!=0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GameObjectDisplayInfoEntry
|
||||||
|
{
|
||||||
|
uint32 ID; //0
|
||||||
|
//char* mdx; //1
|
||||||
|
//uint32 unk1[10]; //2-11
|
||||||
|
float minX;
|
||||||
|
float minY;
|
||||||
|
float minZ;
|
||||||
|
float maxX;
|
||||||
|
float maxY;
|
||||||
|
float maxZ;
|
||||||
|
//uint32 transport; //18
|
||||||
|
};
|
||||||
|
|
||||||
struct GemPropertiesEntry
|
struct GemPropertiesEntry
|
||||||
{
|
{
|
||||||
uint32 ID;
|
uint32 ID;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ const char EmotesEntryfmt[]="nxxiiix";
|
|||||||
const char EmotesTextEntryfmt[]="nxixxxxxxxxxxxxxxxx";
|
const char EmotesTextEntryfmt[]="nxixxxxxxxxxxxxxxxx";
|
||||||
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiissssssssssssssssxxxxxxxxxxxxxxxxxx";
|
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiissssssssssssssssxxxxxxxxxxxxxxxxxx";
|
||||||
const char FactionTemplateEntryfmt[]="niiiiiiiiiiiii";
|
const char FactionTemplateEntryfmt[]="niiiiiiiiiiiii";
|
||||||
|
const char GameObjectDisplayInfofmt[]="nxxxxxxxxxxxffffffx";
|
||||||
const char GemPropertiesEntryfmt[]="nixxi";
|
const char GemPropertiesEntryfmt[]="nixxi";
|
||||||
const char GlyphPropertiesfmt[]="niii";
|
const char GlyphPropertiesfmt[]="niii";
|
||||||
const char GlyphSlotfmt[]="nii";
|
const char GlyphSlotfmt[]="nii";
|
||||||
|
|||||||
Reference in New Issue
Block a user