aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-09-27 20:05:36 +0200
committerOvahlord <dreadkiller@gmx.de>2024-09-30 21:37:07 +0200
commitdfd224931aa0366045aba2b7c50539a7b53e3c66 (patch)
tree28cbce3e6d6b711859536df37ba8a2d078c388f2 /src
parent2b748dcf51a95656734d72937f6e7ecc18a6910f (diff)
Core/DataStores: Removed overriding field sign type based on db2 column compression
(cherry picked from commit 89f490bdcdf88c2576c17218926e89b1082ae682) # Conflicts: # sql/updates/auth/cata_classic/2024_09_27_00_hotfixes.sql # src/server/game/Achievements/CriteriaHandler.cpp # src/server/game/DataStores/DB2LoadInfo.h # src/server/game/DataStores/DB2Stores.cpp # src/server/game/DataStores/DB2Stores.h # src/server/game/DataStores/DB2Structure.h # src/server/game/DataStores/DBCEnums.h # src/server/game/Entities/Item/AzeriteItem/AzeriteEmpoweredItem.cpp # src/server/game/Entities/Item/ItemBonusMgr.cpp # src/server/game/Entities/Player/Player.cpp # src/server/game/Spells/TraitMgr.cpp
Diffstat (limited to 'src')
-rw-r--r--src/common/DataStores/DB2FileLoader.cpp104
-rw-r--r--src/server/game/Achievements/CriteriaHandler.cpp4
-rw-r--r--src/server/game/DataStores/DB2LoadInfo.h32
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp10
-rw-r--r--src/server/game/DataStores/DB2Stores.h4
-rw-r--r--src/server/game/DataStores/DB2Structure.h32
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
-rw-r--r--src/server/game/Entities/Taxi/TaxiPathGraph.cpp4
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
-rw-r--r--src/server/game/Spells/SpellInfo.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp2
11 files changed, 61 insertions, 137 deletions
diff --git a/src/common/DataStores/DB2FileLoader.cpp b/src/common/DataStores/DB2FileLoader.cpp
index 7a586178794..a0cc609250e 100644
--- a/src/common/DataStores/DB2FileLoader.cpp
+++ b/src/common/DataStores/DB2FileLoader.cpp
@@ -20,6 +20,7 @@
#include "DB2Meta.h"
#include "Errors.h"
#include "Log.h"
+#include <fmt/ranges.h>
#include <limits>
#include <sstream>
#include <system_error>
@@ -182,8 +183,6 @@ public:
virtual uint32 GetMaxId() const = 0;
virtual DB2FileLoadInfo const* GetLoadInfo() const = 0;
virtual DB2SectionHeader& GetSection(uint32 section) const = 0;
- virtual bool IsSignedField(uint32 field) const = 0;
- virtual char const* GetExpectedSignMismatchReason(uint32 field) const = 0;
private:
friend class DB2Record;
@@ -229,8 +228,6 @@ public:
uint32 GetMaxId() const override;
DB2FileLoadInfo const* GetLoadInfo() const override;
DB2SectionHeader& GetSection(uint32 section) const override;
- bool IsSignedField(uint32 field) const override;
- char const* GetExpectedSignMismatchReason(uint32 field) const override;
private:
void FillParentLookup(char* dataTable);
@@ -295,8 +292,6 @@ public:
uint32 GetMaxId() const override;
DB2FileLoadInfo const* GetLoadInfo() const override;
DB2SectionHeader& GetSection(uint32 section) const override;
- bool IsSignedField(uint32 field) const override;
- char const* GetExpectedSignMismatchReason(uint32 field) const override;
private:
void FillParentLookup(char* dataTable);
@@ -982,68 +977,6 @@ DB2SectionHeader& DB2FileLoaderRegularImpl::GetSection(uint32 section) const
return _sections[section];
}
-bool DB2FileLoaderRegularImpl::IsSignedField(uint32 field) const
-{
- if (field >= _header->TotalFieldCount)
- {
- ASSERT(field == _header->TotalFieldCount);
- ASSERT(int32(field) == _loadInfo->Meta->ParentIndexField);
- return _loadInfo->Meta->IsSignedField(field);
- }
-
- DB2ColumnCompression compressionType = _columnMeta ? _columnMeta[field].CompressionType : DB2ColumnCompression::None;
- switch (compressionType)
- {
- case DB2ColumnCompression::None:
- case DB2ColumnCompression::CommonData:
- case DB2ColumnCompression::Pallet:
- case DB2ColumnCompression::PalletArray:
- return _loadInfo->Meta->IsSignedField(field);
- case DB2ColumnCompression::SignedImmediate:
- return field != uint32(_loadInfo->Meta->IndexField);
- case DB2ColumnCompression::Immediate:
- return false;
- default:
- ABORT_MSG("Unhandled compression type %u in %s", uint32(_columnMeta[field].CompressionType), _fileName);
- break;
- }
-
- return false;
-}
-
-char const* DB2FileLoaderRegularImpl::GetExpectedSignMismatchReason(uint32 field) const
-{
- if (field >= _header->TotalFieldCount)
- {
- ASSERT(field == _header->TotalFieldCount);
- ASSERT(int32(field) == _loadInfo->Meta->ParentIndexField);
- return " (ParentIndexField must always be unsigned)";
- }
-
- DB2ColumnCompression compressionType = _columnMeta ? _columnMeta[field].CompressionType : DB2ColumnCompression::None;
- switch (compressionType)
- {
- case DB2ColumnCompression::None:
- case DB2ColumnCompression::CommonData:
- case DB2ColumnCompression::Pallet:
- case DB2ColumnCompression::PalletArray:
- if (int32(field) == _loadInfo->Meta->IndexField)
- return " (IndexField must always be unsigned)";
- if (int32(field) == _loadInfo->Meta->ParentIndexField)
- return " (ParentIndexField must always be unsigned)";
- return "";
- case DB2ColumnCompression::SignedImmediate:
- return " (CompressionType is SignedImmediate)";
- case DB2ColumnCompression::Immediate:
- return " (CompressionType is Immediate)";
- default:
- ABORT_MSG("Unhandled compression type %u in %s", uint32(_columnMeta[field].CompressionType), _fileName);
- break;
- }
-
- return "";
-}
-
DB2FileLoaderSparseImpl::DB2FileLoaderSparseImpl(char const* fileName, DB2FileLoadInfo const* loadInfo, DB2Header const* header, DB2FileSource* source) :
_fileName(fileName),
_loadInfo(loadInfo),
@@ -1657,22 +1590,6 @@ DB2SectionHeader& DB2FileLoaderSparseImpl::GetSection(uint32 section) const
return _sections[section];
}
-bool DB2FileLoaderSparseImpl::IsSignedField(uint32 field) const
-{
- ASSERT(field < _header->FieldCount);
- return _loadInfo->Meta->IsSignedField(field);
-}
-
-char const* DB2FileLoaderSparseImpl::GetExpectedSignMismatchReason(uint32 field) const
-{
- ASSERT(field < _header->FieldCount);
- if (int32(field) == _loadInfo->Meta->IndexField)
- return " (IndexField must always be unsigned)";
- if (int32(field) == _loadInfo->Meta->ParentIndexField)
- return " (ParentIndexField must always be unsigned)";
- return "";
-}
-
DB2Record::DB2Record(DB2FileLoaderImpl const& db2, uint32 recordIndex, std::size_t* fieldOffsets)
: _db2(db2), _recordIndex(recordIndex), _recordData(db2.GetRawRecordData(recordIndex, nullptr)), _fieldOffsets(fieldOffsets)
{
@@ -2076,23 +1993,30 @@ void DB2FileLoader::Load(DB2FileSource* source, DB2FileLoadInfo const* loadInfo)
if (loadInfo)
{
uint32 fieldIndex = 0;
- std::string signValidationResult;
+ std::vector<std::string> signValidationResult;
if (!loadInfo->Meta->HasIndexFieldInData())
{
if (loadInfo->Fields[0].IsSigned)
- signValidationResult += Trinity::StringFormat("ID must be unsigned in {}", source->GetFileName());
+ signValidationResult.emplace_back(Trinity::StringFormat("ID must be unsigned in {}", source->GetFileName()));
++fieldIndex;
}
for (uint32 f = 0; f < loadInfo->Meta->FieldCount; ++f)
{
- if (loadInfo->Fields[fieldIndex].IsSigned != _impl->IsSignedField(f))
- signValidationResult += Trinity::StringFormat("Field {} in {} must be {}{}", loadInfo->Fields[fieldIndex].Name,
- source->GetFileName(), _impl->IsSignedField(f) ? "signed" : "unsigned", _impl->GetExpectedSignMismatchReason(f));
+ if (loadInfo->Fields[fieldIndex].IsSigned != loadInfo->Meta->IsSignedField(f))
+ {
+ signValidationResult.emplace_back(Trinity::StringFormat("Field {} in {} must be {}", loadInfo->Fields[fieldIndex].Name,
+ source->GetFileName(), loadInfo->Meta->IsSignedField(f) ? "signed" : "unsigned"));
+
+ if (int32(f) == loadInfo->Meta->IndexField)
+ signValidationResult.back() += " (IndexField must always be unsigned)";
+ if (int32(f) == loadInfo->Meta->ParentIndexField)
+ signValidationResult.back() += " (ParentIndexField must always be unsigned)";
+ }
fieldIndex += loadInfo->Meta->Fields[f].ArraySize;
}
if (!signValidationResult.empty())
- throw DB2FileLoadException(std::move(signValidationResult));
+ throw DB2FileLoadException(Trinity::StringFormat("{}", fmt::join(signValidationResult, "\n")));
}
}
diff --git a/src/server/game/Achievements/CriteriaHandler.cpp b/src/server/game/Achievements/CriteriaHandler.cpp
index bc3418a6fa3..afb53ef3c99 100644
--- a/src/server/game/Achievements/CriteriaHandler.cpp
+++ b/src/server/game/Achievements/CriteriaHandler.cpp
@@ -710,7 +710,7 @@ void CriteriaHandler::UpdateCriteria(CriteriaType type, uint64 miscValue1 /*= 0*
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId);
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
{
- if (skillIter->second->SkillLine == int32(criteria->Entry->Asset.SkillID))
+ if (skillIter->second->SkillLine == uint32(criteria->Entry->Asset.SkillID))
{
// do not add couter twice if by any chance skill is listed twice in dbc (eg. skill 777 and spell 22717)
++spellCount;
@@ -3347,7 +3347,7 @@ bool CriteriaHandler::ModifierSatisfied(ModifierTreeEntry const* modifier, uint6
if (item->GetVisibleAppearanceModId(referencePlayer) == itemModifiedAppearance->ID)
return ItemSearchCallbackResult::Stop;
- if (int32(item->GetEntry()) == itemModifiedAppearance->ItemID)
+ if (item->GetEntry() == itemModifiedAppearance->ItemID)
return ItemSearchCallbackResult::Stop;
return ItemSearchCallbackResult::Continue;
diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h
index 90229afcbf3..42a092b90d9 100644
--- a/src/server/game/DataStores/DB2LoadInfo.h
+++ b/src/server/game/DataStores/DB2LoadInfo.h
@@ -39,7 +39,7 @@ struct AchievementLoadInfo
{ true, FT_BYTE, "MinimumCriteria" },
{ true, FT_BYTE, "Points" },
{ true, FT_INT, "Flags" },
- { true, FT_SHORT, "UiOrder" },
+ { false, FT_SHORT, "UiOrder" },
{ true, FT_INT, "IconFileID" },
{ false, FT_INT, "CriteriaTree" },
{ true, FT_SHORT, "SharesCriteria" },
@@ -55,7 +55,7 @@ struct AchievementCategoryLoadInfo
{ false, FT_STRING, "Name" },
{ false, FT_INT, "ID" },
{ true, FT_SHORT, "Parent" },
- { true, FT_BYTE, "UiOrder" },
+ { false, FT_BYTE, "UiOrder" },
};
static constexpr DB2LoadInfo Instance{ Fields, 4, &Achievement_CategoryMeta::Instance, HOTFIX_SEL_ACHIEVEMENT_CATEGORY };
@@ -147,7 +147,7 @@ struct AreaTriggerLoadInfo
{ false, FT_FLOAT, "PosY" },
{ false, FT_FLOAT, "PosZ" },
{ false, FT_INT, "ID" },
- { true, FT_SHORT, "ContinentID" },
+ { false, FT_SHORT, "ContinentID" },
{ true, FT_INT, "PhaseUseFlags" },
{ true, FT_SHORT, "PhaseID" },
{ true, FT_SHORT, "PhaseGroupID" },
@@ -542,7 +542,7 @@ struct ChrCustomizationChoiceLoadInfo
{
{ false, FT_STRING, "Name" },
{ false, FT_INT, "ID" },
- { true, FT_INT, "ChrCustomizationOptionID" },
+ { false, FT_INT, "ChrCustomizationOptionID" },
{ true, FT_INT, "ChrCustomizationReqID" },
{ true, FT_INT, "ChrCustomizationVisReqID" },
{ false, FT_SHORT, "SortOrder" },
@@ -660,7 +660,7 @@ struct ChrModelLoadInfo
{ false, FT_FLOAT, "CustomizeOffset3" },
{ false, FT_INT, "ID" },
{ true, FT_BYTE, "Sex" },
- { true, FT_INT, "DisplayID" },
+ { false, FT_INT, "DisplayID" },
{ true, FT_INT, "CharComponentTextureLayoutID" },
{ true, FT_INT, "Flags" },
{ true, FT_INT, "SkeletonFileDataID" },
@@ -683,7 +683,7 @@ struct ChrRaceXChrModelLoadInfo
static constexpr DB2FieldMeta Fields[5] =
{
{ false, FT_INT, "ID" },
- { true, FT_INT, "ChrRacesID" },
+ { false, FT_INT, "ChrRacesID" },
{ true, FT_INT, "ChrModelID" },
{ true, FT_INT, "Sex" },
{ true, FT_INT, "AllowedTransmogSlots" },
@@ -1172,7 +1172,7 @@ struct DungeonEncounterLoadInfo
{
{ false, FT_STRING, "Name" },
{ false, FT_INT, "ID" },
- { true, FT_SHORT, "MapID" },
+ { false, FT_SHORT, "MapID" },
{ true, FT_INT, "DifficultyID" },
{ true, FT_INT, "OrderIndex" },
{ true, FT_INT, "CompleteWorldStateID" },
@@ -1977,7 +1977,7 @@ struct ItemCurrencyCostLoadInfo
static constexpr DB2FieldMeta Fields[2] =
{
{ false, FT_INT, "ID" },
- { true, FT_INT, "ItemID" },
+ { false, FT_INT, "ItemID" },
};
static constexpr DB2LoadInfo Instance{ Fields, 2, &ItemCurrencyCostMeta::Instance, HOTFIX_SEL_ITEM_CURRENCY_COST };
@@ -2213,7 +2213,7 @@ struct ItemModifiedAppearanceLoadInfo
static constexpr DB2FieldMeta Fields[6] =
{
{ false, FT_INT, "ID" },
- { true, FT_INT, "ItemID" },
+ { false, FT_INT, "ItemID" },
{ true, FT_INT, "ItemAppearanceModifierID" },
{ true, FT_INT, "ItemAppearanceID" },
{ true, FT_INT, "OrderIndex" },
@@ -2544,7 +2544,7 @@ struct JournalEncounterSectionLoadInfo
{ false, FT_SHORT, "ParentSectionID" },
{ false, FT_SHORT, "FirstChildSectionID" },
{ false, FT_SHORT, "NextSiblingSectionID" },
- { true, FT_BYTE, "Type" },
+ { false, FT_BYTE, "Type" },
{ false, FT_INT, "IconCreatureDisplayInfoID" },
{ true, FT_INT, "UiModelSceneID" },
{ true, FT_INT, "SpellID" },
@@ -3807,7 +3807,7 @@ struct SkillLineAbilityLoadInfo
{
{ true, FT_LONG, "RaceMask" },
{ false, FT_INT, "ID" },
- { true, FT_SHORT, "SkillLine" },
+ { false, FT_SHORT, "SkillLine" },
{ true, FT_INT, "Spell" },
{ true, FT_SHORT, "MinSkillLineRank" },
{ true, FT_INT, "ClassMask" },
@@ -3833,7 +3833,7 @@ struct SkillRaceClassInfoLoadInfo
{
{ false, FT_INT, "ID" },
{ true, FT_LONG, "RaceMask" },
- { true, FT_SHORT, "SkillID" },
+ { false, FT_SHORT, "SkillID" },
{ true, FT_INT, "ClassMask" },
{ false, FT_SHORT, "Flags" },
{ true, FT_BYTE, "Availability" },
@@ -4942,9 +4942,9 @@ struct UiMapLoadInfo
{
{ false, FT_STRING, "Name" },
{ false, FT_INT, "ID" },
- { true, FT_INT, "ParentUiMapID" },
+ { false, FT_INT, "ParentUiMapID" },
{ true, FT_INT, "Flags" },
- { true, FT_BYTE, "System" },
+ { false, FT_BYTE, "System" },
{ false, FT_BYTE, "Type" },
{ true, FT_INT, "BountySetID" },
{ false, FT_INT, "BountyDisplayLocation" },
@@ -4974,7 +4974,7 @@ struct UiMapAssignmentLoadInfo
{ false, FT_FLOAT, "Region2Y" },
{ false, FT_FLOAT, "Region2Z" },
{ false, FT_INT, "ID" },
- { true, FT_INT, "UiMapID" },
+ { false, FT_INT, "UiMapID" },
{ true, FT_INT, "OrderIndex" },
{ true, FT_INT, "MapID" },
{ true, FT_INT, "AreaID" },
@@ -4994,7 +4994,7 @@ struct UiMapLinkLoadInfo
{ false, FT_FLOAT, "UiMaxX" },
{ false, FT_FLOAT, "UiMaxY" },
{ false, FT_INT, "ID" },
- { true, FT_INT, "ParentUiMapID" },
+ { false, FT_INT, "ParentUiMapID" },
{ true, FT_INT, "OrderIndex" },
{ true, FT_INT, "ChildUiMapID" },
{ true, FT_INT, "OverrideHighlightFileDataID" },
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index 3a12c8fd540..8b4a753f9f7 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -911,7 +911,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
std::vector<uint32>* choices = nullptr;
for (std::pair<uint32, std::vector<uint32>>& choicesForOption : requiredChoicesForReq)
{
- if (int32(choicesForOption.first) == customizationChoice->ChrCustomizationOptionID)
+ if (choicesForOption.first == customizationChoice->ChrCustomizationOptionID)
{
choices = &choicesForOption.second;
break;
@@ -1276,7 +1276,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
}
}
- std::unordered_map<std::pair<int32, uint32>, UiMapLinkEntry const*> uiMapLinks;
+ std::unordered_map<std::pair<uint32, uint32>, UiMapLinkEntry const*> uiMapLinks;
for (UiMapLinkEntry const* uiMapLink : sUiMapLinkStore)
uiMapLinks[std::make_pair(uiMapLink->ParentUiMapID, uint32(uiMapLink->ChildUiMapID))] = uiMapLink;
@@ -1379,7 +1379,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
if (node->GetFlags().HasFlag(TaxiNodeFlags::ShowOnAllianceMap))
sAllianceTaxiNodesMask[field] |= submask;
- int32 uiMapId = -1;
+ uint32 uiMapId = uint32(-1);;
if (!GetUiMapPosition(node->Pos.X, node->Pos.Y, node->Pos.Z, node->ContinentID, 0, 0, 0, UI_MAP_SYSTEM_ADVENTURE, false, &uiMapId))
GetUiMapPosition(node->Pos.X, node->Pos.Y, node->Pos.Z, node->ContinentID, 0, 0, 0, UI_MAP_SYSTEM_TAXI, false, &uiMapId);
@@ -1691,7 +1691,7 @@ char const* DB2Manager::GetBroadcastTextValue(BroadcastTextEntry const* broadcas
return broadcastText->Text[DEFAULT_LOCALE];
}
-int32 const* DB2Manager::GetBroadcastTextDuration(int32 /*broadcastTextId*/, LocaleConstant /*locale*/ /*= DEFAULT_LOCALE*/) const
+int32 const* DB2Manager::GetBroadcastTextDuration(uint32 /*broadcastTextId*/, LocaleConstant /*locale*/ /*= DEFAULT_LOCALE*/) const
{
return nullptr;
}
@@ -2728,7 +2728,7 @@ static DBCPosition2D CalculateGlobalUiMapPosition(int32 uiMapID, DBCPosition2D u
}
bool DB2Manager::GetUiMapPosition(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system, bool local,
- int32* uiMapId /*= nullptr*/, DBCPosition2D* newPos /*= nullptr*/)
+ uint32* uiMapId /*= nullptr*/, DBCPosition2D* newPos /*= nullptr*/)
{
if (uiMapId)
*uiMapId = -1;
diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h
index 6570913ffdf..047bee89a5c 100644
--- a/src/server/game/DataStores/DB2Stores.h
+++ b/src/server/game/DataStores/DB2Stores.h
@@ -371,7 +371,7 @@ public:
static bool IsInArea(uint32 objectAreaId, uint32 areaId);
static ContentTuningEntry const* GetContentTuningForArea(AreaTableEntry const* areaEntry);
static char const* GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false);
- int32 const* GetBroadcastTextDuration(int32 broadcastTextId, LocaleConstant locale = DEFAULT_LOCALE) const;
+ int32 const* GetBroadcastTextDuration(uint32 broadcastTextId, LocaleConstant locale = DEFAULT_LOCALE) const;
ChrClassUIDisplayEntry const* GetUiDisplayForClass(Classes unitClass) const;
static char const* GetClassName(uint8 class_, LocaleConstant locale = DEFAULT_LOCALE);
uint32 GetPowerIndexByClass(Powers power, uint32 classId) const;
@@ -450,7 +450,7 @@ public:
std::vector<TransmogSetEntry const*> const* GetTransmogSetsForItemModifiedAppearance(uint32 itemModifiedAppearanceId) const;
std::vector<TransmogSetItemEntry const*> const* GetTransmogSetItems(uint32 transmogSetId) const;
static bool GetUiMapPosition(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system, bool local,
- int32* uiMapId = nullptr, DBCPosition2D* newPos = nullptr);
+ uint32* uiMapId = nullptr, DBCPosition2D* newPos = nullptr);
bool Zone2MapCoordinates(uint32 areaId, float& x, float& y) const;
void Map2ZoneCoordinates(uint32 areaId, float& x, float& y) const;
bool IsUiMapPhase(uint32 phaseId) const;
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index f6f1df07abd..01285f7fd0f 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -38,7 +38,7 @@ struct AchievementEntry
int8 MinimumCriteria; // need this count of completed criterias (own or referenced achievement criterias)
int8 Points;
int32 Flags;
- int16 UiOrder;
+ uint16 UiOrder;
int32 IconFileID;
uint32 CriteriaTree;
int16 SharesCriteria; // referenced achievement (counting of all completed criterias)
@@ -49,7 +49,7 @@ struct Achievement_CategoryEntry
LocalizedString Name;
uint32 ID;
int16 Parent;
- int8 UiOrder;
+ uint8 UiOrder;
};
struct AnimationDataEntry
@@ -119,7 +119,7 @@ struct AreaTriggerEntry
LocalizedString Message;
DBCPosition3D Pos;
uint32 ID;
- int16 ContinentID;
+ uint16 ContinentID;
int32 PhaseUseFlags;
int16 PhaseID;
int16 PhaseGroupID;
@@ -398,7 +398,7 @@ struct ChrCustomizationChoiceEntry
{
LocalizedString Name;
uint32 ID;
- int32 ChrCustomizationOptionID;
+ uint32 ChrCustomizationOptionID;
int32 ChrCustomizationReqID;
int32 ChrCustomizationVisReqID;
uint16 SortOrder;
@@ -483,7 +483,7 @@ struct ChrModelEntry
std::array<float, 3> CustomizeOffset;
uint32 ID;
int8 Sex;
- int32 DisplayID;
+ uint32 DisplayID;
int32 CharComponentTextureLayoutID;
int32 Flags;
int32 SkeletonFileDataID;
@@ -501,7 +501,7 @@ struct ChrModelEntry
struct ChrRaceXChrModelEntry
{
uint32 ID;
- int32 ChrRacesID;
+ uint32 ChrRacesID;
int32 ChrModelID;
int32 Sex;
int32 AllowedTransmogSlots;
@@ -1137,7 +1137,7 @@ struct DungeonEncounterEntry
{
LocalizedString Name;
uint32 ID;
- int16 MapID;
+ uint16 MapID;
int32 DifficultyID;
int32 OrderIndex;
int32 CompleteWorldStateID;
@@ -1628,7 +1628,7 @@ struct ItemContextPickerEntryEntry
struct ItemCurrencyCostEntry
{
uint32 ID;
- int32 ItemID;
+ uint32 ItemID;
};
struct ItemDamageAmmoEntry
@@ -1751,7 +1751,7 @@ struct ItemLimitCategoryConditionEntry
struct ItemModifiedAppearanceEntry
{
uint32 ID;
- int32 ItemID;
+ uint32 ItemID;
int32 ItemAppearanceModifierID;
int32 ItemAppearanceID;
int32 OrderIndex;
@@ -1944,7 +1944,7 @@ struct JournalEncounterSectionEntry
uint16 ParentSectionID;
uint16 FirstChildSectionID;
uint16 NextSiblingSectionID;
- int8 Type;
+ uint8 Type;
uint32 IconCreatureDisplayInfoID;
int32 UiModelSceneID;
int32 SpellID;
@@ -2769,7 +2769,7 @@ struct SkillLineAbilityEntry
{
Trinity::RaceMask<int64> RaceMask;
uint32 ID;
- int16 SkillLine;
+ uint16 SkillLine;
int32 Spell;
int16 MinSkillLineRank;
int32 ClassMask;
@@ -2791,7 +2791,7 @@ struct SkillRaceClassInfoEntry
{
uint32 ID;
Trinity::RaceMask<int64> RaceMask;
- int16 SkillID;
+ uint16 SkillID;
int32 ClassMask;
uint16 Flags;
int8 Availability;
@@ -3512,9 +3512,9 @@ struct UiMapEntry
{
LocalizedString Name;
uint32 ID;
- int32 ParentUiMapID;
+ uint32 ParentUiMapID;
int32 Flags;
- int8 System;
+ uint8 System;
uint8 Type;
int32 BountySetID;
uint32 BountyDisplayLocation;
@@ -3534,7 +3534,7 @@ struct UiMapAssignmentEntry
DBCPosition2D UiMax;
std::array<DBCPosition3D, 2> Region;
uint32 ID;
- int32 UiMapID;
+ uint32 UiMapID;
int32 OrderIndex;
int32 MapID;
int32 AreaID;
@@ -3547,7 +3547,7 @@ struct UiMapLinkEntry
DBCPosition2D UiMin;
DBCPosition2D UiMax;
uint32 ID;
- int32 ParentUiMapID;
+ uint32 ParentUiMapID;
int32 OrderIndex;
int32 ChildUiMapID;
int32 OverrideHighlightFileDataID;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index d5833f16074..84d737a4909 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1825,7 +1825,7 @@ bool Player::IsInAreaTrigger(AreaTriggerEntry const* areaTrigger) const
if (!areaTrigger)
return false;
- if (int32(GetMapId()) != areaTrigger->ContinentID && !GetPhaseShift().HasVisibleMapId(areaTrigger->ContinentID))
+ if (GetMapId() != areaTrigger->ContinentID && !GetPhaseShift().HasVisibleMapId(areaTrigger->ContinentID))
return false;
if (areaTrigger->PhaseID || areaTrigger->PhaseGroupID || areaTrigger->PhaseUseFlags)
diff --git a/src/server/game/Entities/Taxi/TaxiPathGraph.cpp b/src/server/game/Entities/Taxi/TaxiPathGraph.cpp
index 2885a4341ac..2754591bcf2 100644
--- a/src/server/game/Entities/Taxi/TaxiPathGraph.cpp
+++ b/src/server/game/Entities/Taxi/TaxiPathGraph.cpp
@@ -63,7 +63,7 @@ Graph m_graph;
std::vector<TaxiNodesEntry const*> m_nodesByVertex;
std::unordered_map<uint32, vertex_descriptor> m_verticesByNode;
-void GetTaxiMapPosition(DBCPosition3D const& position, int32 mapId, DBCPosition2D* uiMapPosition, int32* uiMapId)
+void GetTaxiMapPosition(DBCPosition3D const& position, int32 mapId, DBCPosition2D* uiMapPosition, uint32* uiMapId)
{
if (!DB2Manager::GetUiMapPosition(position.X, position.Y, position.Z, mapId, 0, 0, 0, UI_MAP_SYSTEM_ADVENTURE, false, uiMapId, uiMapPosition))
DB2Manager::GetUiMapPosition(position.X, position.Y, position.Z, mapId, 0, 0, 0, UI_MAP_SYSTEM_TAXI, false, uiMapId, uiMapPosition);
@@ -109,7 +109,7 @@ void AddVerticeAndEdgeFromNodeInfo(TaxiNodesEntry const* from, TaxiNodesEntry co
if (nodes[i - 1]->Flags & TAXI_PATH_NODE_FLAG_TELEPORT)
continue;
- int32 uiMap1, uiMap2;
+ uint32 uiMap1, uiMap2;
DBCPosition2D pos1, pos2;
GetTaxiMapPosition(nodes[i - 1]->Loc, nodes[i - 1]->ContinentID, &pos1, &uiMap1);
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index ab9e82c147f..63d9403a77e 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -7094,7 +7094,7 @@ AreaTriggerStruct const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
if (itr->second.target_mapId == entrance_map)
{
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
- if (atEntry && atEntry->ContinentID == int32(Map))
+ if (atEntry && atEntry->ContinentID == Map)
return &itr->second;
}
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 76e557892e6..3be44128034 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1505,7 +1505,7 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
- if (_spell_idx->second->SkillLine == int32(skillType))
+ if (_spell_idx->second->SkillLine == skillType)
return true;
return false;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index ba212cb04b8..e488ba8e611 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -119,7 +119,7 @@ bool IsPartOfSkillLine(uint32 skillId, uint32 spellId)
{
SkillLineAbilityMapBounds skillBounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId);
for (SkillLineAbilityMap::const_iterator itr = skillBounds.first; itr != skillBounds.second; ++itr)
- if (itr->second->SkillLine == int32(skillId))
+ if (itr->second->SkillLine == skillId)
return true;
return false;