mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
EntityList::CreateDoor converted to xyz_heading
This commit is contained in:
parent
7ac9a5c5a6
commit
4f03ebb3af
@ -3848,19 +3848,20 @@ uint16 EntityList::CreateGroundObjectFromModel(const char *model, float x,
|
||||
return 0; // fell through everything, this is bad/incomplete from perl
|
||||
}
|
||||
|
||||
uint16 EntityList::CreateDoor(const char *model, float x, float y, float z,
|
||||
float heading, uint8 opentype, uint16 size)
|
||||
uint16 EntityList::CreateDoor(const char *model, const xyz_heading& position, uint8 opentype, uint16 size)
|
||||
{
|
||||
if (model) {
|
||||
Doors *door = new Doors(model, xyz_heading(x, y, z, heading), opentype, size);
|
||||
RemoveAllDoors();
|
||||
zone->LoadZoneDoors(zone->GetShortName(), zone->GetInstanceVersion());
|
||||
entity_list.AddDoor(door);
|
||||
entity_list.RespawnAllDoors();
|
||||
if (!model)
|
||||
return 0; // fell through everything, this is bad/incomplete from perl
|
||||
|
||||
Doors *door = new Doors(model, position, opentype, size);
|
||||
RemoveAllDoors();
|
||||
zone->LoadZoneDoors(zone->GetShortName(), zone->GetInstanceVersion());
|
||||
entity_list.AddDoor(door);
|
||||
entity_list.RespawnAllDoors();
|
||||
|
||||
if (door)
|
||||
return door->GetEntityID();
|
||||
|
||||
if (door)
|
||||
return door->GetEntityID();
|
||||
}
|
||||
return 0; // fell through everything, this is bad/incomplete from perl
|
||||
}
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#include "../common/bodytypes.h"
|
||||
#include "../common/eq_constants.h"
|
||||
|
||||
#include "position.h"
|
||||
#include "zonedb.h"
|
||||
#include "zonedump.h"
|
||||
#include "qglobals.h"
|
||||
@ -388,7 +389,7 @@ public:
|
||||
|
||||
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 CreateDoor(const char *model, float x, float y, float z, float heading, 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 UnMarkNPC(uint16 ID);
|
||||
|
||||
|
||||
@ -2878,7 +2878,7 @@ void QuestManager::SendMail(const char *to, const char *from, const char *subjec
|
||||
uint16 QuestManager::CreateDoor(const char* model, float x, float y, float z, float heading, uint8 opentype, uint16 size)
|
||||
{
|
||||
uint16 entid = 0; //safety check
|
||||
entid = entity_list.CreateDoor(model, x, y, z, heading, opentype, size);
|
||||
entid = entity_list.CreateDoor(model, xyz_heading(x, y, z, heading), opentype, size);
|
||||
return entid;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user