mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
chore(Core/Shared): restyle shared lib with astyle (#3462)
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
|
||||
DBCDatabaseLoader::DBCDatabaseLoader(char const* tableName, char const* dbcFormatString, std::vector<char*>& stringPool)
|
||||
: _sqlTableName(tableName),
|
||||
_dbcFormat(dbcFormatString),
|
||||
_sqlIndexPos(0),
|
||||
_recordSize(0),
|
||||
_stringPool(stringPool)
|
||||
_dbcFormat(dbcFormatString),
|
||||
_sqlIndexPos(0),
|
||||
_recordSize(0),
|
||||
_stringPool(stringPool)
|
||||
{
|
||||
// Get sql index position
|
||||
int32 indexPos = -1;
|
||||
@@ -47,7 +47,7 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable)
|
||||
uint32 indexTableSize = std::max(records, (*result)[_sqlIndexPos].GetUInt32() + 1);
|
||||
if (indexTableSize > records)
|
||||
{
|
||||
char** tmpIdxTable = new char*[indexTableSize];
|
||||
char** tmpIdxTable = new char* [indexTableSize];
|
||||
memset(tmpIdxTable, 0, indexTableSize * sizeof(char*));
|
||||
memcpy(tmpIdxTable, indexTable, records * sizeof(char*));
|
||||
delete[] indexTable;
|
||||
@@ -77,29 +77,29 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable)
|
||||
{
|
||||
switch (*dbcFormat)
|
||||
{
|
||||
case FT_FLOAT:
|
||||
*reinterpret_cast<float*>(&dataValue[dataOffset]) = fields[sqlColumnNumber].GetFloat();
|
||||
dataOffset += sizeof(float);
|
||||
break;
|
||||
case FT_IND:
|
||||
case FT_INT:
|
||||
*reinterpret_cast<uint32*>(&dataValue[dataOffset]) = fields[sqlColumnNumber].GetUInt32();
|
||||
dataOffset += sizeof(uint32);
|
||||
break;
|
||||
case FT_BYTE:
|
||||
*reinterpret_cast<uint8*>(&dataValue[dataOffset]) = fields[sqlColumnNumber].GetUInt8();
|
||||
dataOffset += sizeof(uint8);
|
||||
break;
|
||||
case FT_STRING:
|
||||
*reinterpret_cast<char**>(&dataValue[dataOffset]) = CloneStringToPool(fields[sqlColumnNumber].GetString());
|
||||
dataOffset += sizeof(char*);
|
||||
break;
|
||||
case FT_SORT:
|
||||
case FT_NA:
|
||||
break;
|
||||
default:
|
||||
ASSERT(false, "Unsupported data type '%c' in table '%s'", *dbcFormat, _sqlTableName);
|
||||
return nullptr;
|
||||
case FT_FLOAT:
|
||||
*reinterpret_cast<float*>(&dataValue[dataOffset]) = fields[sqlColumnNumber].GetFloat();
|
||||
dataOffset += sizeof(float);
|
||||
break;
|
||||
case FT_IND:
|
||||
case FT_INT:
|
||||
*reinterpret_cast<uint32*>(&dataValue[dataOffset]) = fields[sqlColumnNumber].GetUInt32();
|
||||
dataOffset += sizeof(uint32);
|
||||
break;
|
||||
case FT_BYTE:
|
||||
*reinterpret_cast<uint8*>(&dataValue[dataOffset]) = fields[sqlColumnNumber].GetUInt8();
|
||||
dataOffset += sizeof(uint8);
|
||||
break;
|
||||
case FT_STRING:
|
||||
*reinterpret_cast<char**>(&dataValue[dataOffset]) = CloneStringToPool(fields[sqlColumnNumber].GetString());
|
||||
dataOffset += sizeof(char*);
|
||||
break;
|
||||
case FT_SORT:
|
||||
case FT_NA:
|
||||
break;
|
||||
default:
|
||||
ASSERT(false, "Unsupported data type '%c' in table '%s'", *dbcFormat, _sqlTableName);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
++sqlColumnNumber;
|
||||
|
||||
@@ -282,7 +282,7 @@ enum FactionTemplateFlags
|
||||
{
|
||||
FACTION_TEMPLATE_FLAG_PVP = 0x00000800, // flagged for PvP
|
||||
FACTION_TEMPLATE_FLAG_CONTESTED_GUARD = 0x00001000, // faction will attack players that were involved in PvP combats
|
||||
FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT= 0x00002000,
|
||||
FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT = 0x00002000,
|
||||
};
|
||||
|
||||
enum FactionMasks
|
||||
@@ -291,7 +291,7 @@ enum FactionMasks
|
||||
FACTION_MASK_ALLIANCE = 2, // player or creature from alliance team
|
||||
FACTION_MASK_HORDE = 4, // player or creature from horde team
|
||||
FACTION_MASK_MONSTER = 8 // aggressive creature from monster team
|
||||
// if none flags set then non-aggressive creature
|
||||
// if none flags set then non-aggressive creature
|
||||
};
|
||||
|
||||
enum MapTypes // Lua_IsInInstance
|
||||
|
||||
@@ -13,46 +13,46 @@
|
||||
template <class T>
|
||||
class DBCStorageIterator : public std::iterator<std::forward_iterator_tag, T>
|
||||
{
|
||||
public:
|
||||
DBCStorageIterator() : _index(nullptr), _pos(0), _end(0) { }
|
||||
DBCStorageIterator(T** index, uint32 size, uint32 pos = 0) : _index(index), _pos(pos), _end(size)
|
||||
public:
|
||||
DBCStorageIterator() : _index(nullptr), _pos(0), _end(0) { }
|
||||
DBCStorageIterator(T** index, uint32 size, uint32 pos = 0) : _index(index), _pos(pos), _end(size)
|
||||
{
|
||||
if (_pos < _end)
|
||||
{
|
||||
if (_pos < _end)
|
||||
{
|
||||
while (_pos < _end && !_index[_pos])
|
||||
++_pos;
|
||||
}
|
||||
while (_pos < _end && !_index[_pos])
|
||||
++_pos;
|
||||
}
|
||||
}
|
||||
|
||||
T const* operator->() { return _index[_pos]; }
|
||||
T const* operator*() { return _index[_pos]; }
|
||||
|
||||
bool operator==(DBCStorageIterator const& right) const { /*ASSERT(_index == right._index, "Iterator belongs to a different container")*/ return _pos == right._pos; }
|
||||
bool operator!=(DBCStorageIterator const& right) const { return !(*this == right); }
|
||||
|
||||
DBCStorageIterator& operator++()
|
||||
{
|
||||
if (_pos < _end)
|
||||
{
|
||||
do
|
||||
++_pos;
|
||||
while (_pos < _end && !_index[_pos]);
|
||||
}
|
||||
|
||||
T const* operator->() { return _index[_pos]; }
|
||||
T const* operator*() { return _index[_pos]; }
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(DBCStorageIterator const& right) const { /*ASSERT(_index == right._index, "Iterator belongs to a different container")*/ return _pos == right._pos; }
|
||||
bool operator!=(DBCStorageIterator const& right) const { return !(*this == right); }
|
||||
DBCStorageIterator operator++(int)
|
||||
{
|
||||
DBCStorageIterator tmp = *this;
|
||||
++*this;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
DBCStorageIterator& operator++()
|
||||
{
|
||||
if (_pos < _end)
|
||||
{
|
||||
do
|
||||
++_pos;
|
||||
while (_pos < _end && !_index[_pos]);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
DBCStorageIterator operator++(int)
|
||||
{
|
||||
DBCStorageIterator tmp = *this;
|
||||
++*this;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
private:
|
||||
T** _index;
|
||||
uint32 _pos;
|
||||
uint32 _end;
|
||||
private:
|
||||
T** _index;
|
||||
uint32 _pos;
|
||||
uint32 _end;
|
||||
};
|
||||
|
||||
#endif // DBCStorageIterator_h__
|
||||
|
||||
@@ -23,7 +23,7 @@ bool DBCStorageBase::Load(char const* path, char**& indexTable)
|
||||
indexTable = nullptr;
|
||||
|
||||
DBCFileLoader dbc;
|
||||
|
||||
|
||||
// Check if load was sucessful, only then continue
|
||||
if (!dbc.Load(path, _fileFormat))
|
||||
return false;
|
||||
@@ -48,7 +48,7 @@ bool DBCStorageBase::LoadStringsFrom(char const* path, char** indexTable)
|
||||
return false;
|
||||
|
||||
DBCFileLoader dbc;
|
||||
|
||||
|
||||
// Check if load was successful, only then continue
|
||||
if (!dbc.Load(path, _fileFormat))
|
||||
return false;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "Errors.h"
|
||||
#include <vector>
|
||||
|
||||
/// Interface class for common access
|
||||
/// Interface class for common access
|
||||
class DBCStorageBase
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -28,7 +28,7 @@ struct AchievementEntry
|
||||
int32 requiredFaction; // 1 -1=all, 0=horde, 1=alliance
|
||||
int32 mapID; // 2 -1=none
|
||||
//uint32 parentAchievement; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
|
||||
char *name[16]; // 4-19
|
||||
char* name[16]; // 4-19
|
||||
//uint32 name_flags; // 20
|
||||
//char *description[16]; // 21-36
|
||||
//uint32 desc_flags; // 37
|
||||
@@ -325,7 +325,7 @@ struct AchievementCriteriaEntry
|
||||
uint32 rollValue; // 3
|
||||
uint32 count; // 4
|
||||
} roll_need_on_loot;
|
||||
// ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
|
||||
// ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
|
||||
struct
|
||||
{
|
||||
uint32 rollValue; // 3
|
||||
@@ -495,8 +495,8 @@ struct AchievementCriteriaEntry
|
||||
uint32 flags; // 26
|
||||
uint32 timedType; // 27
|
||||
uint32 timerStartEvent; // 28 Alway appears with timed events
|
||||
// for timed spells it is spell id for
|
||||
// timed kills it is creature id
|
||||
// for timed spells it is spell id for
|
||||
// timed kills it is creature id
|
||||
uint32 timeLimit; // 29 time limit in seconds
|
||||
//uint32 showOrder; // 30 show order
|
||||
};
|
||||
@@ -508,10 +508,10 @@ struct AreaTableEntry
|
||||
uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
|
||||
uint32 exploreFlag; // 3, main index
|
||||
uint32 flags; // 4, unknown value but 312 for all cities
|
||||
// 5-9 unused
|
||||
// 5-9 unused
|
||||
int32 area_level; // 10
|
||||
char* area_name[16]; // 11-26
|
||||
// 27, string flags, unused
|
||||
// 27, string flags, unused
|
||||
uint32 team; // 28
|
||||
uint32 LiquidTypeOverride[4]; // 29-32 liquid override by type
|
||||
|
||||
@@ -568,7 +568,7 @@ struct AuctionHouseEntry
|
||||
uint32 depositPercent; // 2 1/3 from real
|
||||
uint32 cutPercent; // 3
|
||||
//char* name[16]; // 4-19
|
||||
// 20 string flag, unused
|
||||
// 20 string flag, unused
|
||||
};
|
||||
|
||||
struct BankBagSlotPricesEntry
|
||||
@@ -624,9 +624,9 @@ struct CharTitlesEntry
|
||||
uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
|
||||
//uint32 unk1; // 1 flags?
|
||||
char* nameMale[16]; // 2-17
|
||||
// 18 string flag, unused
|
||||
// 18 string flag, unused
|
||||
char* nameFemale[16]; // 19-34
|
||||
// 35 string flag, unused
|
||||
// 35 string flag, unused
|
||||
uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
|
||||
};
|
||||
|
||||
@@ -635,26 +635,26 @@ struct ChatChannelsEntry
|
||||
uint32 ChannelID; // 0
|
||||
uint32 flags; // 1
|
||||
char* pattern[16]; // 3-18
|
||||
// 19 string flags, unused
|
||||
// 19 string flags, unused
|
||||
//char* name[16]; // 20-35 unused
|
||||
// 36 string flag, unused
|
||||
// 36 string flag, unused
|
||||
};
|
||||
|
||||
struct ChrClassesEntry
|
||||
{
|
||||
uint32 ClassID; // 0
|
||||
// 1, unused
|
||||
// 1, unused
|
||||
uint32 powerType; // 2
|
||||
// 3-4, unused
|
||||
// 3-4, unused
|
||||
char* name[16]; // 5-20 unused
|
||||
// 21 string flag, unused
|
||||
// 21 string flag, unused
|
||||
//char* nameFemale[16]; // 21-36 unused, if different from base (male) case
|
||||
// 37 string flag, unused
|
||||
// 37 string flag, unused
|
||||
//char* nameNeutralGender[16]; // 38-53 unused, if different from base (male) case
|
||||
// 54 string flag, unused
|
||||
// 55, unused
|
||||
// 54 string flag, unused
|
||||
// 55, unused
|
||||
uint32 spellfamily; // 56
|
||||
// 57, unused
|
||||
// 57, unused
|
||||
uint32 CinematicSequence; // 58 id from CinematicSequences.dbc
|
||||
uint32 expansion; // 59 (0 - original race, 1 - tbc addon, ...)
|
||||
};
|
||||
@@ -662,23 +662,23 @@ struct ChrClassesEntry
|
||||
struct ChrRacesEntry
|
||||
{
|
||||
uint32 RaceID; // 0
|
||||
// 1 unused
|
||||
// 1 unused
|
||||
uint32 FactionID; // 2 facton template id
|
||||
// 3 unused
|
||||
// 3 unused
|
||||
uint32 model_m; // 4
|
||||
uint32 model_f; // 5
|
||||
// 6 unused
|
||||
// 6 unused
|
||||
uint32 TeamID; // 7 (7-Alliance 1-Horde)
|
||||
// 8-11 unused
|
||||
// 8-11 unused
|
||||
uint32 CinematicSequence; // 12 id from CinematicSequences.dbc
|
||||
//uint32 unk_322; // 13 faction (0 alliance, 1 horde, 2 not available?)
|
||||
char* name[16]; // 14-29 used for DBC language detection/selection
|
||||
// 30 string flags, unused
|
||||
// 30 string flags, unused
|
||||
//char* nameFemale[16]; // 31-46, if different from base (male) case
|
||||
// 47 string flags, unused
|
||||
// 47 string flags, unused
|
||||
//char* nameNeutralGender[16]; // 48-63, if different from base (male) case
|
||||
// 64 string flags, unused
|
||||
// 65-67 unused
|
||||
// 64 string flags, unused
|
||||
// 65-67 unused
|
||||
uint32 expansion; // 68 (0 - original race, 1 - tbc addon, ...)
|
||||
};
|
||||
|
||||
@@ -700,25 +700,25 @@ struct CinematicSequencesEntry
|
||||
uint32 Id; // 0 index
|
||||
//uint32 unk1; // 1 always 0
|
||||
//uint32 cinematicCamera; // 2 id in CinematicCamera.dbc
|
||||
// 3-9 always 0
|
||||
// 3-9 always 0
|
||||
};
|
||||
|
||||
struct CreatureDisplayInfoEntry
|
||||
{
|
||||
uint32 Displayid; // 0 m_ID
|
||||
uint32 ModelId; // 1 m_modelID
|
||||
// 2 m_soundID
|
||||
// 3 m_extendedDisplayInfoID
|
||||
// 2 m_soundID
|
||||
// 3 m_extendedDisplayInfoID
|
||||
float scale; // 4 m_creatureModelScale
|
||||
// 5 m_creatureModelAlpha
|
||||
// 6-8 m_textureVariation[3]
|
||||
// 9 m_portraitTextureName
|
||||
// 10 m_sizeClass
|
||||
// 11 m_bloodID
|
||||
// 12 m_NPCSoundID
|
||||
// 13 m_particleColorID
|
||||
// 14 m_creatureGeosetData
|
||||
// 15 m_objectEffectPackageID
|
||||
// 5 m_creatureModelAlpha
|
||||
// 6-8 m_textureVariation[3]
|
||||
// 9 m_portraitTextureName
|
||||
// 10 m_sizeClass
|
||||
// 11 m_bloodID
|
||||
// 12 m_NPCSoundID
|
||||
// 13 m_particleColorID
|
||||
// 14 m_creatureGeosetData
|
||||
// 15 m_objectEffectPackageID
|
||||
};
|
||||
|
||||
struct CreatureFamilyEntry
|
||||
@@ -731,10 +731,10 @@ struct CreatureFamilyEntry
|
||||
uint32 skillLine[2]; // 5-6 m_skillLine
|
||||
uint32 petFoodMask; // 7 m_petFoodMask
|
||||
int32 petTalentType; // 8 m_petTalentType
|
||||
// 9 m_categoryEnumID
|
||||
// 9 m_categoryEnumID
|
||||
char* Name[16]; // 10-25 m_name_lang
|
||||
// 26 string flags
|
||||
// 27 m_iconFile
|
||||
// 26 string flags
|
||||
// 27 m_iconFile
|
||||
};
|
||||
|
||||
struct CreatureModelDataEntry
|
||||
@@ -772,7 +772,7 @@ struct CreatureTypeEntry
|
||||
{
|
||||
uint32 ID; // 0 m_ID
|
||||
//char* Name[16]; // 1-16 name
|
||||
// 17 string flags
|
||||
// 17 string flags
|
||||
//uint32 no_expirience; // 18 no exp? critters, non-combat pets, gas cloud.
|
||||
};
|
||||
|
||||
@@ -872,9 +872,9 @@ struct FactionEntry
|
||||
uint32 spilloverMaxRankIn; // 21 The highest rank the faction will profit from incoming spillover
|
||||
//uint32 spilloverRank_unk; // 22 It does not seem to be the max standing at which a faction outputs spillover ...so no idea
|
||||
char* name[16]; // 23-38 m_name_lang
|
||||
// 39 string flags
|
||||
// 39 string flags
|
||||
//char* description[16]; // 40-55 m_description_lang
|
||||
// 56 string flags
|
||||
// 56 string flags
|
||||
|
||||
// helpers
|
||||
bool CanHaveReputation() const
|
||||
@@ -928,7 +928,7 @@ struct FactionTemplateEntry
|
||||
}
|
||||
return (hostileMask & entry.ourMask) != 0;
|
||||
}
|
||||
bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; }
|
||||
bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) != 0; }
|
||||
bool IsNeutralToAll() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_FACTION_RELATIONS; ++i)
|
||||
@@ -1089,17 +1089,17 @@ struct ItemBagFamilyEntry
|
||||
struct ItemDisplayInfoEntry
|
||||
{
|
||||
uint32 ID; // 0 m_ID
|
||||
// 1 m_modelName[2]
|
||||
// 2 m_modelTexture[2]
|
||||
// 1 m_modelName[2]
|
||||
// 2 m_modelTexture[2]
|
||||
char* inventoryIcon; // 3 m_inventoryIcon
|
||||
// 4 m_geosetGroup[3]
|
||||
// 5 m_flags
|
||||
// 6 m_spellVisualID
|
||||
// 7 m_groupSoundIndex
|
||||
// 8 m_helmetGeosetVis[2]
|
||||
// 9 m_texture[2]
|
||||
// 10 m_itemVisual[8]
|
||||
// 11 m_particleColorID
|
||||
// 4 m_geosetGroup[3]
|
||||
// 5 m_flags
|
||||
// 6 m_spellVisualID
|
||||
// 7 m_groupSoundIndex
|
||||
// 8 m_helmetGeosetVis[2]
|
||||
// 9 m_texture[2]
|
||||
// 10 m_itemVisual[8]
|
||||
// 11 m_particleColorID
|
||||
};
|
||||
|
||||
//struct ItemCondExtCostsEntry
|
||||
@@ -1127,7 +1127,7 @@ struct ItemLimitCategoryEntry
|
||||
{
|
||||
uint32 ID; // 0 Id
|
||||
//char* name[16] // 1-16 m_name_lang
|
||||
// 17 name flags
|
||||
// 17 name flags
|
||||
uint32 maxCount; // 18, max allowed equipped as item or in gem slot
|
||||
uint32 mode; // 19, 0 = have, 1 = equip (enum ItemLimitCategoryMode)
|
||||
};
|
||||
@@ -1140,15 +1140,15 @@ struct ItemRandomPropertiesEntry
|
||||
//char* internalName // 1 m_Name
|
||||
uint32 enchant_id[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-6 m_Enchantment
|
||||
char* nameSuffix[16]; // 7-22 m_name_lang
|
||||
// 23 name flags
|
||||
// 23 name flags
|
||||
};
|
||||
|
||||
struct ItemRandomSuffixEntry
|
||||
{
|
||||
uint32 ID; // 0 m_ID
|
||||
char* nameSuffix[16]; // 1-16 m_name_lang
|
||||
// 17, name flags
|
||||
// 18 m_internalName
|
||||
// 17, name flags
|
||||
// 18 m_internalName
|
||||
uint32 enchant_id[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 19-23 m_enchantment
|
||||
uint32 prefix[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 24-28 m_allocationPct
|
||||
};
|
||||
@@ -1160,7 +1160,7 @@ struct ItemSetEntry
|
||||
{
|
||||
//uint32 id // 0 m_ID
|
||||
char* name[16]; // 1-16 m_name_lang
|
||||
// 17 string flags, unused
|
||||
// 17 string flags, unused
|
||||
uint32 itemId[MAX_ITEM_SET_ITEMS]; // 18-27 m_itemID
|
||||
//uint32 unknown[7]; // 28-34 unk, all 0
|
||||
uint32 spells[MAX_ITEM_SET_SPELLS]; // 35-42 m_setSpellID
|
||||
@@ -1249,7 +1249,7 @@ struct MailTemplateEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
//char* subject[16]; // 1-16
|
||||
// 17 name flags, unused
|
||||
// 17 name flags, unused
|
||||
char* content[16]; // 18-33
|
||||
};
|
||||
|
||||
@@ -1259,14 +1259,14 @@ struct MapEntry
|
||||
//char* internalname; // 1 unused
|
||||
uint32 map_type; // 2
|
||||
uint32 Flags; // 3
|
||||
// 4 0 or 1 for battlegrounds (not arenas)
|
||||
// 4 0 or 1 for battlegrounds (not arenas)
|
||||
char* name[16]; // 5-20
|
||||
// 21 name flags, unused
|
||||
// 21 name flags, unused
|
||||
uint32 linked_zone; // 22 common zone for instance and continent map
|
||||
//char* hordeIntro[16]; // 23-38 text for PvP Zones
|
||||
// 39 intro text flags
|
||||
// 39 intro text flags
|
||||
//char* allianceIntro[16]; // 40-55 text for PvP Zones
|
||||
// 56 intro text flags
|
||||
// 56 intro text flags
|
||||
uint32 multimap_id; // 57
|
||||
//float BattlefieldMapIconScale; // 58
|
||||
int32 entrance_map; // 59 map_id of entrance map
|
||||
@@ -1289,7 +1289,7 @@ struct MapEntry
|
||||
bool IsBattlegroundOrArena() const { return map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA; }
|
||||
bool IsWorldMap() const { return map_type == MAP_COMMON; }
|
||||
|
||||
bool GetEntrancePos(int32 &mapid, float &x, float &y) const
|
||||
bool GetEntrancePos(int32& mapid, float& x, float& y) const
|
||||
{
|
||||
if (entrance_map < 0)
|
||||
return false;
|
||||
@@ -1363,19 +1363,19 @@ struct QuestSortEntry
|
||||
{
|
||||
uint32 id; // 0 m_ID
|
||||
//char* name[16]; // 1-16 m_SortName_lang
|
||||
// 17 name flags
|
||||
// 17 name flags
|
||||
};
|
||||
|
||||
struct QuestXPEntry
|
||||
{
|
||||
uint32 id;
|
||||
uint32 Exp[10];
|
||||
uint32 id;
|
||||
uint32 Exp[10];
|
||||
};
|
||||
|
||||
struct QuestFactionRewEntry
|
||||
{
|
||||
uint32 id;
|
||||
int32 QuestRewFactionValue[10];
|
||||
uint32 id;
|
||||
int32 QuestRewFactionValue[10];
|
||||
};
|
||||
|
||||
struct RandomPropertiesPointsEntry
|
||||
@@ -1496,12 +1496,12 @@ struct SkillLineEntry
|
||||
int32 categoryId; // 1 m_categoryID
|
||||
//uint32 skillCostID; // 2 m_skillCostsID
|
||||
char* name[16]; // 3-18 m_displayName_lang
|
||||
// 19 string flags
|
||||
// 19 string flags
|
||||
//char* description[16]; // 20-35 m_description_lang
|
||||
// 36 string flags
|
||||
// 36 string flags
|
||||
uint32 spellIcon; // 37 m_spellIconID
|
||||
//char* alternateVerb[16]; // 38-53 m_alternateVerb_lang
|
||||
// 54 string flags
|
||||
// 54 string flags
|
||||
uint32 canLink; // 55 m_canLink (prof. with recipes
|
||||
};
|
||||
|
||||
@@ -1530,12 +1530,12 @@ struct SoundEntriesEntry
|
||||
//char* FileName[10]; // 3-12 m_File[10]
|
||||
//uint32 Unk13[10]; // 13-22 m_Freq[10]
|
||||
//char* Path; // 23 m_DirectoryBase
|
||||
// 24 m_volumeFloat
|
||||
// 25 m_flags
|
||||
// 26 m_minDistance
|
||||
// 27 m_distanceCutoff
|
||||
// 28 m_EAXDef
|
||||
// 29 new in 3.1
|
||||
// 24 m_volumeFloat
|
||||
// 25 m_flags
|
||||
// 26 m_minDistance
|
||||
// 27 m_distanceCutoff
|
||||
// 28 m_EAXDef
|
||||
// 29 new in 3.1
|
||||
};
|
||||
|
||||
#define MAX_SPELL_EFFECTS 3
|
||||
@@ -1684,7 +1684,7 @@ struct SpellFocusObjectEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
//char* Name[16]; // 1-15 unused
|
||||
// 16 string flags, unused
|
||||
// 16 string flags, unused
|
||||
};
|
||||
|
||||
struct SpellRadiusEntry
|
||||
@@ -1704,9 +1704,9 @@ struct SpellRangeEntry
|
||||
float maxRangeFriend;
|
||||
uint32 type;
|
||||
//char* Name[16]; // 7-23 unused
|
||||
// 24 string flags, unused
|
||||
// 24 string flags, unused
|
||||
//char* Name2[16]; // 25-40 unused
|
||||
// 41 string flags, unused
|
||||
// 41 string flags, unused
|
||||
};
|
||||
|
||||
struct SpellRuneCostEntry
|
||||
@@ -1803,11 +1803,11 @@ struct TalentEntry
|
||||
uint32 Row; // 2
|
||||
uint32 Col; // 3
|
||||
uint32 RankID[MAX_TALENT_RANK]; // 4-8
|
||||
// 9-12 not used, always 0, maybe not used high ranks
|
||||
// 9-12 not used, always 0, maybe not used high ranks
|
||||
uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
|
||||
// 14-15 not used
|
||||
// 14-15 not used
|
||||
uint32 DependsOnRank; // 16
|
||||
// 17-18 not used
|
||||
// 17-18 not used
|
||||
uint32 addToSpellBook; // 19 also need disable higest ranks on reset talent tree
|
||||
//uint32 unk2; // 20, all 0
|
||||
//uint64 allowForPet; // 21-22 its a 64 bit mask for pet 1<<m_categoryEnumID in CreatureFamily.dbc
|
||||
@@ -1819,7 +1819,7 @@ struct TalentTabEntry
|
||||
//char* name[16]; // 1-16, unused
|
||||
//uint32 nameFlags; // 17, unused
|
||||
//unit32 spellicon; // 18
|
||||
// 19 not used
|
||||
// 19 not used
|
||||
uint32 ClassMask; // 20
|
||||
uint32 petTalentMask; // 21
|
||||
uint32 tabpage; // 22
|
||||
@@ -1834,7 +1834,7 @@ struct TaxiNodesEntry
|
||||
float y; // 3 m_y
|
||||
float z; // 4 m_z
|
||||
char* name[16]; // 5-21 m_Name_lang
|
||||
// 22 string flags
|
||||
// 22 string flags
|
||||
uint32 MountCreatureID[2]; // 23-24 m_MountCreatureID[2]
|
||||
};
|
||||
|
||||
@@ -1848,7 +1848,7 @@ struct TaxiPathEntry
|
||||
|
||||
struct TaxiPathNodeEntry
|
||||
{
|
||||
// 0 m_ID
|
||||
// 0 m_ID
|
||||
uint32 path; // 1 m_PathID
|
||||
uint32 index; // 2 m_NodeIndex
|
||||
uint32 mapid; // 3 m_ContinentID
|
||||
@@ -1871,7 +1871,7 @@ struct TotemCategoryEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
//char* name[16]; // 1-16
|
||||
// 17 string flags, unused
|
||||
// 17 string flags, unused
|
||||
uint32 categoryType; // 18 (one for specialization)
|
||||
uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
|
||||
};
|
||||
@@ -1933,8 +1933,8 @@ struct VehicleEntry
|
||||
float m_msslTrgtImpactTexRadius; // 35
|
||||
uint32 m_uiSeatIndicatorType; // 36
|
||||
uint32 m_powerDisplayId; // 37, new in 3.1
|
||||
// 38, new in 3.1
|
||||
// 39, new in 3.1
|
||||
// 38, new in 3.1
|
||||
// 39, new in 3.1
|
||||
};
|
||||
|
||||
struct VehicleSeatEntry
|
||||
@@ -1985,7 +1985,7 @@ struct VehicleSeatEntry
|
||||
uint32 m_exitUISoundID; // 43
|
||||
int32 m_uiSkin; // 44
|
||||
uint32 m_flagsB; // 45
|
||||
// 46-57 added in 3.1, floats mostly
|
||||
// 46-57 added in 3.1, floats mostly
|
||||
|
||||
bool CanEnterOrExit() const
|
||||
{
|
||||
@@ -1994,9 +1994,12 @@ struct VehicleSeatEntry
|
||||
(m_flags & (VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER | VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE)) != 0);
|
||||
}
|
||||
bool CanSwitchFromSeat() const { return m_flags & VEHICLE_SEAT_FLAG_CAN_SWITCH; }
|
||||
bool IsUsableByOverride() const { return (m_flags & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18)
|
||||
|| (m_flagsB & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 |
|
||||
VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3 | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4))); }
|
||||
bool IsUsableByOverride() const
|
||||
{
|
||||
return (m_flags & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18)
|
||||
|| (m_flagsB & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 |
|
||||
VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3 | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4)));
|
||||
}
|
||||
bool IsEjectable() const { return m_flagsB & VEHICLE_SEAT_FLAG_B_EJECTABLE; }
|
||||
};
|
||||
|
||||
@@ -2039,9 +2042,9 @@ struct WorldMapOverlayEntry
|
||||
uint32 ID; // 0
|
||||
//uint32 worldMapAreaId; // 1 idx in WorldMapArea.dbc
|
||||
uint32 areatableID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; // 2-5
|
||||
// 6-7 always 0, possible part of areatableID[]
|
||||
// 6-7 always 0, possible part of areatableID[]
|
||||
//char* internal_name // 8
|
||||
// 9-16 some ints
|
||||
// 9-16 some ints
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user