EntityList::CreateGroundObjectFromModel converted to to xyz_heading

This commit is contained in:
Arthur Ice 2014-11-30 21:20:46 -08:00
parent 4f03ebb3af
commit d54215ea18
3 changed files with 12 additions and 11 deletions

View File

@ -3835,17 +3835,18 @@ uint16 EntityList::CreateGroundObject(uint32 itemid, float x, float y, float z,
return 0; // fell through everything, this is bad/incomplete from perl
}
uint16 EntityList::CreateGroundObjectFromModel(const char *model, float x,
float y, float z, float heading, uint8 type, uint32 decay_time)
uint16 EntityList::CreateGroundObjectFromModel(const char *model, const xyz_heading& position, uint8 type, uint32 decay_time)
{
if (model) {
Object *object = new Object(model, x, y, z, heading, type);
entity_list.AddObject(object, true);
if (!model)
return 0;
if (object)
return object->GetID();
}
return 0; // fell through everything, this is bad/incomplete from perl
Object *object = new Object(model, position.m_X, position.m_Y, position.m_Z, position.m_Heading, type);
entity_list.AddObject(object, true);
if (!object)
return 0;
return object->GetID();
}
uint16 EntityList::CreateDoor(const char *model, const xyz_heading& position, uint8 opentype, uint16 size)

View File

@ -388,7 +388,7 @@ public:
void ReloadAllClientsTaskState(int TaskID=0);
uint16 CreateGroundObject(uint32 itemid, float x, float y, float z, float heading, uint32 decay_time = 300000);
uint16 CreateGroundObjectFromModel(const char *model, float x, float y, float z, float heading, uint8 type = 0x00, uint32 decay_time = 0);
uint16 CreateGroundObjectFromModel(const char *model, const xyz_heading& position, uint8 type = 0x00, uint32 decay_time = 0);
uint16 CreateDoor(const char *model, const xyz_heading& position, uint8 type = 0, uint16 size = 100);
void ZoneWho(Client *c, Who_All_Struct* Who);
void UnMarkNPC(uint16 ID);

View File

@ -2352,7 +2352,7 @@ uint16 QuestManager::CreateGroundObject(uint32 itemid, float x, float y, float z
uint16 QuestManager::CreateGroundObjectFromModel(const char *model, float x, float y, float z, float heading, uint8 type, uint32 decay_time)
{
uint16 entid = 0; //safety check
entid = entity_list.CreateGroundObjectFromModel(model, x, y, z, heading, type, decay_time);
entid = entity_list.CreateGroundObjectFromModel(model, xyz_heading(x, y, z, heading), type, decay_time);
return entid;
}