mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Misc: assert -> ASSERT
This commit is contained in:
@@ -119,7 +119,7 @@ DBCFileLoader::~DBCFileLoader()
|
||||
|
||||
DBCFileLoader::Record DBCFileLoader::getRecord(size_t id)
|
||||
{
|
||||
assert(data);
|
||||
ASSERT(data);
|
||||
return Record(*this, data + id * recordSize);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "Utilities/ByteConverter.h"
|
||||
#include <cassert>
|
||||
|
||||
enum DbcFieldFormat
|
||||
{
|
||||
@@ -51,29 +50,29 @@ class TC_COMMON_API DBCFileLoader
|
||||
public:
|
||||
float getFloat(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
ASSERT(field < file.fieldCount);
|
||||
float val = *reinterpret_cast<float*>(offset+file.GetOffset(field));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
uint32 getUInt(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
ASSERT(field < file.fieldCount);
|
||||
uint32 val = *reinterpret_cast<uint32*>(offset+file.GetOffset(field));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
uint8 getUInt8(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
ASSERT(field < file.fieldCount);
|
||||
return *reinterpret_cast<uint8*>(offset+file.GetOffset(field));
|
||||
}
|
||||
|
||||
const char *getString(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
ASSERT(field < file.fieldCount);
|
||||
size_t stringOffset = getUInt(field);
|
||||
assert(stringOffset < file.stringSize);
|
||||
ASSERT(stringOffset < file.stringSize);
|
||||
return reinterpret_cast<char*>(file.stringTable + stringOffset);
|
||||
}
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ void ThreatManager::AddThreat(Unit* target, float amount, SpellInfo const* spell
|
||||
target->GetThreatManager().PutThreatenedByMeRef(_owner->GetGUID(), ref);
|
||||
|
||||
Creature* cOwner = _owner->ToCreature();
|
||||
assert(cOwner); // if we got here the owner can have a threat list, and must be a creature!
|
||||
ASSERT(cOwner); // if we got here the owner can have a threat list, and must be a creature!
|
||||
if (!_ownerEngaged && (cOwner->HasReactState(REACT_PASSIVE) || !ref->IsOffline()))
|
||||
{
|
||||
_ownerEngaged = true;
|
||||
|
||||
@@ -1786,7 +1786,7 @@ public:
|
||||
for (auto const& pair : store)
|
||||
{
|
||||
SpawnGroupTemplateData const* groupData = sObjectMgr->GetSpawnGroupData(pair.first);
|
||||
assert(groupData); // checked by objectmgr on load
|
||||
ASSERT(groupData); // checked by objectmgr on load
|
||||
if (explain)
|
||||
{
|
||||
handler->PSendSysMessage(" |-- '%s' (%u)", groupData->name, pair.first);
|
||||
|
||||
Reference in New Issue
Block a user