mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10118] Check gameobject scale at loading (strict DB error filter)
This let avoid check scale value at it
This commit is contained in:
parent
969986a596
commit
cd0bbabf9a
3 changed files with 9 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10117"
|
||||
#define REVISION_NR "10118"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue