diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 365e76df0..87fd80ad9 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -2120,18 +2120,25 @@ void Creature::GetRespawnCoord( float &x, float &y, float &z, float* ori, float* *ori = data->orientation; if (dist) *dist = GetRespawnRadius(); + } + else + { + float orient; - return; + GetSummonPoint(x, y, z, orient); + + if (ori) + *ori = orient; + if (dist) + *dist = GetRespawnRadius(); } - float orient; - - GetSummonPoint(x, y, z, orient); - - if (ori) - *ori = orient; - if (dist) - *dist = GetRespawnRadius(); + //lets check if our creatures have valid spawn coordinates + if(!MaNGOS::IsValidMapCoord(x, y, z)) + { + sLog.outError("Creature with invalid respawn coordinates: mapid = %u, guid = %u, x = %f, y = %f, z = %f", GetMapId(), GetGUIDLow(), x, y, z); + MANGOS_ASSERT(false); + } } void Creature::AllLootRemovedFromCorpse() diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f4e71c72e..314c4ca35 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11319" + #define REVISION_NR "11320" #endif // __REVISION_NR_H__