Merge branch 'master' into 310

Conflicts:
	src/game/Level2.cpp
	src/game/PetHandler.cpp
	src/game/Player.cpp
	src/game/Player.h
	src/game/SkillHandler.cpp
This commit is contained in:
tomrus88 2009-03-11 12:22:58 +03:00
commit 31b3ee95ad
163 changed files with 5278 additions and 3233 deletions

View file

@ -75,6 +75,7 @@ DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore(GtOCTRegenHPfmt);
//DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore(GtOCTRegenMPfmt); -- not used currently
DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore(GtRegenHPPerSptfmt);
DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
DBCStorage <HolidaysEntry> sHolidaysStore(Holidaysfmt);
DBCStorage <ItemEntry> sItemStore(Itemfmt);
//DBCStorage <ItemCondExtCostsEntry> sItemCondExtCostsStore(ItemCondExtCostsEntryfmt);
//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently
@ -190,7 +191,7 @@ void LoadDBCStores(const std::string& dataPath)
{
std::string dbcPath = dataPath+"dbc/";
const uint32 DBCFilesCount = 72;
const uint32 DBCFilesCount = 73;
barGoLink bar( DBCFilesCount );
@ -263,6 +264,7 @@ void LoadDBCStores(const std::string& dataPath)
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenHPPerSptStore, dbcPath,"gtRegenHPPerSpt.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenMPPerSptStore, dbcPath,"gtRegenMPPerSpt.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sHolidaysStore, dbcPath,"Holidays.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemStore, dbcPath,"Item.dbc");
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc");

View file

@ -165,6 +165,7 @@ extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
//extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
extern DBCStorage <HolidaysEntry> sHolidaysStore;
extern DBCStorage <ItemEntry> sItemStore;
//extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;

View file

@ -356,7 +356,8 @@ struct AchievementCriteriaEntry
// TODO: where is the information about the target stored?
struct
{
uint32 emoteID; // 3
uint32 emoteID; // 3 enum TextEmotes
uint32 count; // 4 count of emotes, always required special target or requirements
} do_emote;
// ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13
// ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55
@ -854,6 +855,40 @@ struct GtRegenMPPerSptEntry
float ratio;
};
/* no used
struct HolidayDescriptionsEntry
{
uint32 ID; // 0, this is NOT holiday id
//char* name[16] // 1-16 m_name_lang
// 17 name flags
};
*/
/* no used
struct HolidayNamesEntry
{
uint32 ID; // 0, this is NOT holiday id
//char* name[16] // 1-16 m_name_lang
// 17 name flags
};
*/
struct HolidaysEntry
{
uint32 ID; // 0, holiday id
//uint32 unk1; // 1
//uint32 unk2; // 2
//uint32 unk3[8] // 3-10, empty fields
//uint32 unk11[13] // 11-23, some unknown data (bit strings?)
//uint32 unk11[13] // 24-36, some empty fields (continue prev?)
//uint32 unk11[12] // 37-48, counters?
//uint32 holidayNameId; // 49, id for HolidayNames.dbc
//uint32 holidayDescriptionId; // 50, id for HolidayDescriptions.dbc
//uint32 unk51; // 51
//uint32 unk52; // 52
//uint32 unk53; // 53
};
struct ItemEntry
{
uint32 ID; // 0

View file

@ -53,6 +53,7 @@ const char GtOCTRegenHPfmt[]="f";
//const char GtOCTRegenMPfmt[]="f";
const char GtRegenHPPerSptfmt[]="f";
const char GtRegenMPPerSptfmt[]="f";
const char Holidaysfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char Itemfmt[]="nixiiiii";
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
//const char ItemCondExtCostsEntryfmt[]="xiii";

View file

@ -37,23 +37,35 @@ bool DBCFile::Load(const char *filename, const char *fmt)
delete [] data;
data=NULL;
}
FILE * f=fopen(filename,"rb");
if(!f)return false;
fread(&header,4,1,f); // Number of records
if(fread(&header,4,1,f)!=1) // Number of records
return false;
EndianConvert(header);
if(header!=0x43424457)
{
//printf("not dbc file");
return false; //'WDBC'
}
fread(&recordCount,4,1,f); // Number of records
if(fread(&recordCount,4,1,f)!=1) // Number of records
return false;
EndianConvert(recordCount);
fread(&fieldCount,4,1,f); // Number of fields
if(fread(&fieldCount,4,1,f)!=1) // Number of fields
return false;
EndianConvert(fieldCount);
fread(&recordSize,4,1,f); // Size of a record
if(fread(&recordSize,4,1,f)!=1) // Size of a record
return false;
EndianConvert(recordSize);
fread(&stringSize,4,1,f); // String size
if(fread(&stringSize,4,1,f)!=1) // String size
return false;
EndianConvert(stringSize);
fieldsOffset = new uint32[fieldCount];
@ -69,7 +81,10 @@ bool DBCFile::Load(const char *filename, const char *fmt)
data = new unsigned char[recordSize*recordCount+stringSize];
stringTable = data + recordSize*recordCount;
fread(data,recordSize*recordCount+stringSize,1,f);
if(fread(data,recordSize*recordCount+stringSize,1,f)!=1)
return false;
fclose(f);
return true;
}