mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Fixed nopch build and some leftover warnings
This commit is contained in:
@@ -614,7 +614,6 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
|
||||
for (ItemModifiedAppearanceEntry const* appearanceMod : sItemModifiedAppearanceStore)
|
||||
{
|
||||
ASSERT(appearanceMod->ItemID <= 0xFFFFFF);
|
||||
ASSERT(appearanceMod->AppearanceModID <= 0xFF);
|
||||
_itemModifiedAppearancesByItem[appearanceMod->ItemID | (appearanceMod->AppearanceModID << 24)] = appearanceMod;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "DB2Structure.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <boost/regex.hpp>
|
||||
#include <array>
|
||||
|
||||
TC_GAME_API extern DB2Storage<AchievementEntry> sAchievementStore;
|
||||
TC_GAME_API extern DB2Storage<AnimKitEntry> sAnimKitStore;
|
||||
@@ -191,9 +190,6 @@ typedef std::map<uint32, TaxiPathSetForSource> TaxiPathSetBySource;
|
||||
typedef std::vector<TaxiPathNodeEntry const*> TaxiPathNodeList;
|
||||
typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
|
||||
|
||||
#define TaxiMaskSize 236
|
||||
typedef std::array<uint8, TaxiMaskSize> TaxiMask;
|
||||
|
||||
TC_GAME_API extern TaxiMask sTaxiNodesMask;
|
||||
TC_GAME_API extern TaxiMask sOldContinentsNodesMask;
|
||||
TC_GAME_API extern TaxiMask sHordeTaxiNodesMask;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define DBCENUMS_H
|
||||
|
||||
#include "Define.h"
|
||||
#include <array>
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
@@ -710,6 +711,9 @@ enum SpellProcsPerMinuteModType
|
||||
SPELL_PPM_MOD_BATTLEGROUND = 7
|
||||
};
|
||||
|
||||
#define TaxiMaskSize 236
|
||||
typedef std::array<uint8, TaxiMaskSize> TaxiMask;
|
||||
|
||||
enum TotemCategoryType
|
||||
{
|
||||
TOTEM_CATEGORY_TYPE_KNIFE = 1,
|
||||
|
||||
@@ -2714,8 +2714,7 @@ bool Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target)
|
||||
|
||||
if ( // here we determine if the (relatively expensive) forced update is worth it, or whether we can afford to wait until the scheduled update tick
|
||||
( // only require instant update for spells that actually have a visual
|
||||
focusSpell->GetSpellInfo()->SpellVisual[0] ||
|
||||
focusSpell->GetSpellInfo()->SpellVisual[1]
|
||||
focusSpell->GetSpellInfo()->GetSpellVisual()
|
||||
) && (
|
||||
!focusSpell->GetCastTime() || // if the spell is instant cast
|
||||
focusSpell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_DONT_TURN_DURING_CAST) // client gets confused if we attempt to turn at the regularly scheduled update packet
|
||||
|
||||
@@ -1265,7 +1265,7 @@ void Item::BuildDynamicValuesUpdate(uint8 updateType, ByteBuffer* data, Player*
|
||||
{
|
||||
std::vector<uint32> const& values = _dynamicValues[index];
|
||||
if (_fieldNotifyFlags & flags[index] ||
|
||||
((updateType == UPDATETYPE_VALUES ? _dynamicChangesMask[index] : !values.empty()) && (flags[index] & visibleFlag)))
|
||||
((updateType == UPDATETYPE_VALUES ? _dynamicChangesMask[index] != UpdateMask::UNCHANGED : !values.empty()) && (flags[index] & visibleFlag)))
|
||||
{
|
||||
UpdateMask::SetUpdateBit(data->contents() + maskPos, index);
|
||||
|
||||
|
||||
@@ -802,7 +802,7 @@ void Object::BuildDynamicValuesUpdate(uint8 updateType, ByteBuffer* data, Player
|
||||
{
|
||||
std::vector<uint32> const& values = _dynamicValues[index];
|
||||
if (_fieldNotifyFlags & flags[index] ||
|
||||
((updateType == UPDATETYPE_VALUES ? _dynamicChangesMask[index] : !values.empty()) && (flags[index] & visibleFlag)))
|
||||
((updateType == UPDATETYPE_VALUES ? _dynamicChangesMask[index] != UpdateMask::UNCHANGED : !values.empty()) && (flags[index] & visibleFlag)))
|
||||
{
|
||||
UpdateMask::SetUpdateBit(data->contents() + maskPos, index);
|
||||
|
||||
@@ -837,7 +837,7 @@ void Object::AddToObjectUpdateIfNeeded()
|
||||
void Object::ClearUpdateMask(bool remove)
|
||||
{
|
||||
memset(_changesMask.data(), 0, _changesMask.size());
|
||||
memset(_dynamicChangesMask.data(), 0, _dynamicChangesMask.size());
|
||||
_dynamicChangesMask.assign(_dynamicChangesMask.size(), UpdateMask::UNCHANGED);
|
||||
for (uint32 i = 0; i < _dynamicValuesCount; ++i)
|
||||
memset(_dynamicChangesArrayMask[i].data(), 0, _dynamicChangesArrayMask[i].size());
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace UpdateMask
|
||||
|
||||
enum DynamicFieldChangeType : uint16
|
||||
{
|
||||
UNCHANGED = 0,
|
||||
VALUE_CHANGED = 0x7FFF,
|
||||
VALUE_AND_SIZE_CHANGED = 0x8000
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "World.h"
|
||||
|
||||
|
||||
@@ -45,6 +45,11 @@ ReputationRank ReputationMgr::ReputationToRank(int32 standing)
|
||||
return MIN_REPUTATION_RANK;
|
||||
}
|
||||
|
||||
FactionState const* ReputationMgr::GetState(FactionEntry const* factionEntry) const
|
||||
{
|
||||
return factionEntry->CanHaveReputation() ? GetState(factionEntry->ReputationIndex) : NULL;
|
||||
}
|
||||
|
||||
bool ReputationMgr::IsAtWar(uint32 faction_id) const
|
||||
{
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
|
||||
@@ -127,6 +132,11 @@ ReputationRank ReputationMgr::GetBaseRank(FactionEntry const* factionEntry) cons
|
||||
return ReputationToRank(reputation);
|
||||
}
|
||||
|
||||
ReputationRank const* ReputationMgr::GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const
|
||||
{
|
||||
return GetForcedRankIfAny(factionTemplateEntry->Faction);
|
||||
}
|
||||
|
||||
void ReputationMgr::ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
#include "QueryResult.h"
|
||||
#include <map>
|
||||
|
||||
struct FactionEntry;
|
||||
struct FactionTemplateEntry;
|
||||
|
||||
static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] =
|
||||
{
|
||||
LANG_REP_HATED, LANG_REP_HOSTILE, LANG_REP_UNFRIENDLY, LANG_REP_NEUTRAL,
|
||||
@@ -83,10 +86,7 @@ class TC_GAME_API ReputationMgr
|
||||
|
||||
FactionStateList const& GetStateList() const { return _factions; }
|
||||
|
||||
FactionState const* GetState(FactionEntry const* factionEntry) const
|
||||
{
|
||||
return factionEntry->CanHaveReputation() ? GetState(factionEntry->ReputationIndex) : NULL;
|
||||
}
|
||||
FactionState const* GetState(FactionEntry const* factionEntry) const;
|
||||
|
||||
FactionState const* GetState(RepListID id) const
|
||||
{
|
||||
@@ -108,10 +108,7 @@ class TC_GAME_API ReputationMgr
|
||||
return ReputationRankStrIndex[GetRank(factionEntry)];
|
||||
};
|
||||
|
||||
ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const
|
||||
{
|
||||
return GetForcedRankIfAny(factionTemplateEntry->Faction);
|
||||
}
|
||||
ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const;
|
||||
|
||||
ReputationRank const* GetForcedRankIfAny(uint32 factionId) const
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "DBCEnums.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define _SPELLINFO_H
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "DB2Structure.h"
|
||||
#include "Util.h"
|
||||
#include "Object.h"
|
||||
#include "SpellAuraDefines.h"
|
||||
@@ -31,14 +32,8 @@ class SpellInfo;
|
||||
class WorldObject;
|
||||
class AuraEffect;
|
||||
struct SpellChainNode;
|
||||
struct SpellTargetPosition;
|
||||
struct SpellDurationEntry;
|
||||
struct SpellModifier;
|
||||
struct SpellRangeEntry;
|
||||
struct SpellRadiusEntry;
|
||||
struct SpellEntry;
|
||||
struct SpellCastTimesEntry;
|
||||
struct SpellEffectScalingEntry;
|
||||
struct SpellTargetPosition;
|
||||
struct Condition;
|
||||
|
||||
enum SpellCastTargetFlags
|
||||
@@ -384,14 +379,13 @@ public:
|
||||
SpellRangeEntry const* RangeEntry;
|
||||
float Speed;
|
||||
uint32 StackAmount;
|
||||
uint32 Totem[2];
|
||||
uint32 Totem[MAX_SPELL_TOTEMS];
|
||||
int32 Reagent[MAX_SPELL_REAGENTS];
|
||||
uint32 ReagentCount[MAX_SPELL_REAGENTS];
|
||||
int32 EquippedItemClass;
|
||||
int32 EquippedItemSubClassMask;
|
||||
int32 EquippedItemInventoryTypeMask;
|
||||
uint32 TotemCategory[2];
|
||||
uint32 SpellVisual[2];
|
||||
uint32 TotemCategory[MAX_SPELL_TOTEMS];
|
||||
uint32 SpellIconID;
|
||||
uint32 ActiveIconID;
|
||||
LocalizedString const* SpellName;
|
||||
|
||||
@@ -206,7 +206,6 @@ static char const* const nullStr = "";
|
||||
|
||||
char* DB2SparseFileLoader::AutoProduceData(IndexTable const& indexTable, uint32 locale, std::vector<char*>& stringPool)
|
||||
{
|
||||
typedef char* ptr;
|
||||
if (meta->FieldCount != fieldCount)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ bool DB2FileLoader::Load(char const* filename, DB2Meta const* meta)
|
||||
EndianConvert(metaFlags);
|
||||
|
||||
ASSERT((metaFlags & 0x1) == 0, "%s is a sparse storage, use DB2SparseStorage!", filename);
|
||||
ASSERT((meta->IndexField == -1) || (meta->IndexField == (metaFlags >> 16)));
|
||||
ASSERT((meta->IndexField == -1) || (meta->IndexField == int32(metaFlags >> 16)));
|
||||
|
||||
fields = new FieldEntry[fieldCount];
|
||||
if (fread(fields, fieldCount * sizeof(FieldEntry), 1, f) != 1)
|
||||
|
||||
Reference in New Issue
Block a user