*Improvements in map managing.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-01 00:20:32 +02:00
parent 0db1fd6c26
commit 1d96091d2a
24 changed files with 276 additions and 305 deletions

View File

@@ -137,16 +137,17 @@ void GameObject::RemoveFromWorld()
bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 ArtKit)
{
ASSERT(map);
Relocate(x,y,z,ang);
SetMap(map);
SetPhaseMask(phaseMask,false);
Relocate(x,y,z,ang);
if(!IsPositionValid())
{
sLog.outError("Gameobject (GUID: %u Entry: %u ) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y);
return false;
}
SetPhaseMask(phaseMask,false);
GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(name_id);
if (!goinfo)
{