mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
EntityList::CreateGroundObject converted to xyz_heading
This commit is contained in:
parent
d54215ea18
commit
c3471ed88e
@ -3816,23 +3816,24 @@ void EntityList::GroupMessage(uint32 gid, const char *from, const char *message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 EntityList::CreateGroundObject(uint32 itemid, float x, float y, float z,
|
uint16 EntityList::CreateGroundObject(uint32 itemid, const xyz_heading& position, uint32 decay_time)
|
||||||
float heading, uint32 decay_time)
|
|
||||||
{
|
{
|
||||||
const Item_Struct *is = database.GetItem(itemid);
|
const Item_Struct *is = database.GetItem(itemid);
|
||||||
if (is) {
|
if (!is)
|
||||||
ItemInst *i = new ItemInst(is, is->MaxCharges);
|
return 0;
|
||||||
if (i) {
|
|
||||||
Object *object = new Object(i, x, y, z, heading,decay_time);
|
|
||||||
entity_list.AddObject(object, true);
|
|
||||||
|
|
||||||
safe_delete(i);
|
ItemInst *i = new ItemInst(is, is->MaxCharges);
|
||||||
if (object)
|
if (!i)
|
||||||
return object->GetID();
|
return 0;
|
||||||
}
|
|
||||||
return 0; // fell through itemstruct
|
Object *object = new Object(i, position.m_X, position.m_Y, position.m_Z, position.m_Heading,decay_time);
|
||||||
}
|
entity_list.AddObject(object, true);
|
||||||
return 0; // fell through everything, this is bad/incomplete from perl
|
|
||||||
|
safe_delete(i);
|
||||||
|
if (!object)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return object->GetID();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 EntityList::CreateGroundObjectFromModel(const char *model, const xyz_heading& position, uint8 type, uint32 decay_time)
|
uint16 EntityList::CreateGroundObjectFromModel(const char *model, const xyz_heading& position, uint8 type, uint32 decay_time)
|
||||||
|
|||||||
@ -387,7 +387,7 @@ public:
|
|||||||
void SaveAllClientsTaskState();
|
void SaveAllClientsTaskState();
|
||||||
void ReloadAllClientsTaskState(int TaskID=0);
|
void ReloadAllClientsTaskState(int TaskID=0);
|
||||||
|
|
||||||
uint16 CreateGroundObject(uint32 itemid, float x, float y, float z, float heading, uint32 decay_time = 300000);
|
uint16 CreateGroundObject(uint32 itemid, const xyz_heading& position, uint32 decay_time = 300000);
|
||||||
uint16 CreateGroundObjectFromModel(const char *model, const xyz_heading& position, 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);
|
uint16 CreateDoor(const char *model, const xyz_heading& position, uint8 type = 0, uint16 size = 100);
|
||||||
void ZoneWho(Client *c, Who_All_Struct* Who);
|
void ZoneWho(Client *c, Who_All_Struct* Who);
|
||||||
|
|||||||
@ -2345,7 +2345,7 @@ int QuestManager::getlevel(uint8 type)
|
|||||||
uint16 QuestManager::CreateGroundObject(uint32 itemid, float x, float y, float z, float heading, uint32 decay_time)
|
uint16 QuestManager::CreateGroundObject(uint32 itemid, float x, float y, float z, float heading, uint32 decay_time)
|
||||||
{
|
{
|
||||||
uint16 entid = 0; //safety check
|
uint16 entid = 0; //safety check
|
||||||
entid = entity_list.CreateGroundObject(itemid, x, y, z, heading, decay_time);
|
entid = entity_list.CreateGroundObject(itemid, xyz_heading(x, y, z, heading), decay_time);
|
||||||
return entid;
|
return entid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user