Some build errors fixed

Some build errors fixed
This commit is contained in:
Charles A Edwards 2016-01-30 16:31:19 +00:00 committed by Antz
parent 85cd456287
commit 3abc31c429
7 changed files with 107 additions and 5 deletions

View file

@ -829,6 +829,14 @@ void Object::SetUInt32Value(uint16 index, uint32 value)
}
}
void Object::UpdateUInt32Value(uint16 index, uint32 value)
{
MANGOS_ASSERT(index < m_valuesCount || PrintIndexError(index, true));
m_uint32Values[index] = value;
m_changedValues[index] = true;
}
void Object::SetUInt64Value(uint16 index, const uint64& value)
{
MANGOS_ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true));
@ -1757,6 +1765,28 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa
return pCreature;
}
GameObject* WorldObject::SummonGameObject(uint32 id, float x, float y, float z, float angle, uint32 despwtime)
{
GameObject* pGameObj = new GameObject;
Map *map = GetMap();
if (!map)
return NULL;
if (!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), id, map, x, y, z, angle))
{
delete pGameObj;
return NULL;
}
pGameObj->SetRespawnTime(despwtime / IN_MILLISECONDS);
map->Add(pGameObj);
return pGameObj;
}
// how much space should be left in front of/ behind a mob that already uses a space
#define OCCUPY_POS_DEPTH_FACTOR 1.8f