mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8654] Allow loading some type gameobjects without diplay id set.
But make its always inviisble for client.
This commit is contained in:
parent
45c9c136ba
commit
bc1f6c7d3f
3 changed files with 16 additions and 5 deletions
|
|
@ -693,6 +693,10 @@ bool GameObject::isVisibleForInState(Player const* u, WorldObject const* viewPoi
|
||||||
if(!IsInWorld() || !u->IsInWorld())
|
if(!IsInWorld() || !u->IsInWorld())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// invisible at client always
|
||||||
|
if(!GetGOInfo()->displayId)
|
||||||
|
return false;
|
||||||
|
|
||||||
// Transport always visible at this step implementation
|
// Transport always visible at this step implementation
|
||||||
if(IsTransport() && IsInMap(u))
|
if(IsTransport() && IsInMap(u))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1228,11 +1228,18 @@ void ObjectMgr::LoadGameobjects()
|
||||||
|
|
||||||
if(!gInfo->displayId)
|
if(!gInfo->displayId)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) doesn't have displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
|
switch(gInfo->type)
|
||||||
continue;
|
{
|
||||||
|
// can be invisible always and then not req. display id in like case
|
||||||
|
case GAMEOBJECT_TYPE_TRAP:
|
||||||
|
case GAMEOBJECT_TYPE_SPELL_FOCUS:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) have displayId == 0 and then will always invisible in game.", guid, entry, gInfo->type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else if (!sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
|
||||||
if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
|
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) have invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
|
sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) have invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8653"
|
#define REVISION_NR "8654"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue