mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
QuestManager::unique_spawn converted to xyz_heading
This commit is contained in:
parent
2e0cfa86bf
commit
4daf4ab507
@ -269,7 +269,8 @@ XS(XS__unique_spawn)
|
|||||||
if(items == 7)
|
if(items == 7)
|
||||||
heading = (float)SvNV(ST(6));
|
heading = (float)SvNV(ST(6));
|
||||||
|
|
||||||
Mob *r = quest_manager.unique_spawn(npc_type, grid, unused, x, y, z, heading);
|
|
||||||
|
Mob *r = quest_manager.unique_spawn(npc_type, grid, unused, xyz_heading(x, y, z, heading));
|
||||||
RETVAL = (r != nullptr) ? r->GetID() : 0;
|
RETVAL = (r != nullptr) ? r->GetID() : 0;
|
||||||
|
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH; PUSHu((UV)RETVAL);
|
||||||
|
|||||||
@ -256,8 +256,8 @@ Lua_Mob lua_spawn2(int npc_type, int grid, int unused, double x, double y, doubl
|
|||||||
}
|
}
|
||||||
|
|
||||||
Lua_Mob lua_unique_spawn(int npc_type, int grid, int unused, double x, double y, double z, double heading = 0.0) {
|
Lua_Mob lua_unique_spawn(int npc_type, int grid, int unused, double x, double y, double z, double heading = 0.0) {
|
||||||
return Lua_Mob(quest_manager.unique_spawn(npc_type, grid, unused,
|
auto position = xyz_heading(x,y,z,heading);
|
||||||
static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(heading)));
|
return Lua_Mob(quest_manager.unique_spawn(npc_type, grid, unused, position));
|
||||||
}
|
}
|
||||||
|
|
||||||
Lua_Mob lua_spawn_from_spawn2(uint32 spawn2_id) {
|
Lua_Mob lua_spawn_from_spawn2(uint32 spawn2_id) {
|
||||||
|
|||||||
@ -258,7 +258,7 @@ Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const xyz_heading&
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, float x, float y, float z, float heading) {
|
Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const xyz_heading& position) {
|
||||||
Mob *other = entity_list.GetMobByNpcTypeID(npc_type);
|
Mob *other = entity_list.GetMobByNpcTypeID(npc_type);
|
||||||
if(other != nullptr) {
|
if(other != nullptr) {
|
||||||
return other;
|
return other;
|
||||||
@ -267,7 +267,7 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, float x, flo
|
|||||||
const NPCType* tmp = 0;
|
const NPCType* tmp = 0;
|
||||||
if (tmp = database.GetNPCType(npc_type))
|
if (tmp = database.GetNPCType(npc_type))
|
||||||
{
|
{
|
||||||
NPC* npc = new NPC(tmp, nullptr, xyz_heading(x, y, z, heading), FlyMode3);
|
NPC* npc = new NPC(tmp, nullptr, position, FlyMode3);
|
||||||
npc->AddLootTable();
|
npc->AddLootTable();
|
||||||
entity_list.AddNPC(npc,true,true);
|
entity_list.AddNPC(npc,true,true);
|
||||||
if(grid > 0)
|
if(grid > 0)
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public:
|
|||||||
void summonitem(uint32 itemid, int16 charges = -1);
|
void summonitem(uint32 itemid, int16 charges = -1);
|
||||||
void write(const char *file, const char *str);
|
void write(const char *file, const char *str);
|
||||||
Mob* spawn2(int npc_type, int grid, int unused, const xyz_heading& position);
|
Mob* spawn2(int npc_type, int grid, int unused, const xyz_heading& position);
|
||||||
Mob* unique_spawn(int npc_type, int grid, int unused, float x, float y, float z, float heading = 0);
|
Mob* unique_spawn(int npc_type, int grid, int unused, const xyz_heading& position);
|
||||||
Mob* spawn_from_spawn2(uint32 spawn2_id);
|
Mob* spawn_from_spawn2(uint32 spawn2_id);
|
||||||
void enable_spawn2(uint32 spawn2_id);
|
void enable_spawn2(uint32 spawn2_id);
|
||||||
void disable_spawn2(uint32 spawn2_id);
|
void disable_spawn2(uint32 spawn2_id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user