mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 23:58:25 +00:00
AddWPForSpawn converted to xyz_heading
This commit is contained in:
+6
-5
@@ -5635,8 +5635,7 @@ void command_wpadd(Client *c, const Seperator *sep)
|
||||
{
|
||||
int type1=0,
|
||||
type2=0,
|
||||
pause=0,
|
||||
heading=-1; // Defaults for a new grid
|
||||
pause=0; // Defaults for a new grid
|
||||
|
||||
Mob *t=c->GetTarget();
|
||||
if (t && t->IsNPC())
|
||||
@@ -5659,9 +5658,11 @@ void command_wpadd(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (strcmp("-h",sep->arg[2]) == 0)
|
||||
heading = c->GetHeading();
|
||||
uint32 tmp_grid = database.AddWPForSpawn(c, s2info->GetID(), c->GetX(),c->GetY(),c->GetZ(), pause, type1, type2, zone->GetZoneID(), heading);
|
||||
auto position = c->GetPosition();
|
||||
if (strcmp("-h",sep->arg[2]) != 0)
|
||||
position.m_Heading = -1;
|
||||
|
||||
uint32 tmp_grid = database.AddWPForSpawn(c, s2info->GetID(), position, pause, type1, type2, zone->GetZoneID());
|
||||
if (tmp_grid)
|
||||
t->CastToNPC()->SetGrid(tmp_grid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user