[10118] Check gameobject scale at loading (strict DB error filter)

This let avoid check scale value at it
This commit is contained in:
VladimirMangos 2010-06-29 10:55:19 +04:00
parent 969986a596
commit cd0bbabf9a
3 changed files with 9 additions and 4 deletions

View file

@ -124,9 +124,6 @@ void Object::_Create( uint32 guidlow, uint32 entry, HighGuid guidhigh )
void Object::SetObjectScale(float newScale)
{
if (newScale <= 0.0f)
newScale = DEFAULT_OBJECT_SCALE;
SetFloatValue(OBJECT_FIELD_SCALE_X, newScale);
}

View file

@ -6000,6 +6000,14 @@ void ObjectMgr::LoadGameobjectInfo()
if (!goInfo)
continue;
if (goInfo->size <= 0.0f) // prevent use too small scales
{
ERROR_DB_STRICT_LOG("Gameobject (Entry: %u GoType: %u) have too small size=%f",
goInfo->id, goInfo->type, goInfo->size);
const_cast<GameObjectInfo*>(goInfo)->size = DEFAULT_OBJECT_SCALE;
}
// some GO types have unused go template, check goInfo->displayId at GO spawn data loading or ignore
switch(goInfo->type)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10117"
#define REVISION_NR "10118"
#endif // __REVISION_NR_H__