AddWPForSpawn converted to xyz_heading

This commit is contained in:
Arthur Ice
2014-12-02 18:15:51 -08:00
parent 6206133729
commit e58dc94b2c
3 changed files with 9 additions and 8 deletions
+6 -5
View File
@@ -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);