mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[6887] Position dead flying creatures on ground at creature loading.
Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
This commit is contained in:
parent
211f987aa9
commit
09c27ec667
2 changed files with 9 additions and 1 deletions
|
|
@ -1345,7 +1345,15 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
||||||
|
|
||||||
m_respawnTime = objmgr.GetCreatureRespawnTime(m_DBTableGuid,GetInstanceId());
|
m_respawnTime = objmgr.GetCreatureRespawnTime(m_DBTableGuid,GetInstanceId());
|
||||||
if(m_respawnTime > time(NULL)) // not ready to respawn
|
if(m_respawnTime > time(NULL)) // not ready to respawn
|
||||||
|
{
|
||||||
m_deathState = DEAD;
|
m_deathState = DEAD;
|
||||||
|
if(canFly())
|
||||||
|
{
|
||||||
|
float tz = GetMap()->GetHeight(data->posX,data->posY,data->posZ,false);
|
||||||
|
if(data->posZ - tz > 0.1)
|
||||||
|
Relocate(data->posX,data->posY,tz);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(m_respawnTime) // respawn time set but expired
|
else if(m_respawnTime) // respawn time set but expired
|
||||||
{
|
{
|
||||||
m_respawnTime = 0;
|
m_respawnTime = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6886"
|
#define REVISION_NR "6887"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue