mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 08:18:27 +00:00
+28
-30
@@ -1839,14 +1839,7 @@ void command_itemtest(Client *c, const Seperator *sep)
|
||||
void command_gassign(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->IsNumber(1) && c->GetTarget() && c->GetTarget()->IsNPC())
|
||||
{
|
||||
database.AssignGrid(
|
||||
c,
|
||||
(c->GetTarget()->CastToNPC()->org_x),
|
||||
(c->GetTarget()->CastToNPC()->org_y),
|
||||
atoi(sep->arg[1])
|
||||
);
|
||||
}
|
||||
database.AssignGrid(c, c->GetTarget()->CastToNPC()->m_SpawnPoint, atoi(sep->arg[1]));
|
||||
else
|
||||
c->Message(0,"Usage: #gassign [num] - must have an npc target!");
|
||||
}
|
||||
@@ -2019,7 +2012,7 @@ void command_dbspawn2(Client *c, const Seperator *sep)
|
||||
if(sep->IsNumber(5))
|
||||
cond_min = atoi(sep->arg[5]);
|
||||
}
|
||||
database.CreateSpawn2(c, atoi(sep->arg[1]), zone->GetShortName(), c->GetHeading(), c->GetX(), c->GetY(), c->GetZ(), atoi(sep->arg[2]), atoi(sep->arg[3]), cond, cond_min);
|
||||
database.CreateSpawn2(c, atoi(sep->arg[1]), zone->GetShortName(), c->GetPosition(), atoi(sep->arg[2]), atoi(sep->arg[3]), cond, cond_min);
|
||||
}
|
||||
else {
|
||||
c->Message(0, "Usage: #dbspawn2 spawngroup respawn variance [condition_id] [condition_min]");
|
||||
@@ -2098,10 +2091,12 @@ void command_wp(Client *c, const Seperator *sep)
|
||||
if (wp == 0) //default to highest if it's left blank, or we enter 0
|
||||
wp = database.GetHighestWaypoint(zone->GetZoneID(), atoi(sep->arg[2])) + 1;
|
||||
if (strcasecmp("-h",sep->arg[5]) == 0) {
|
||||
database.AddWP(c, atoi(sep->arg[2]),wp, c->GetX(), c->GetY(), c->GetZ(), atoi(sep->arg[3]),zone->GetZoneID(), c->GetHeading());
|
||||
database.AddWP(c, atoi(sep->arg[2]),wp, c->GetPosition(), atoi(sep->arg[3]),zone->GetZoneID());
|
||||
}
|
||||
else {
|
||||
database.AddWP(c, atoi(sep->arg[2]),wp, c->GetX(), c->GetY(), c->GetZ(), atoi(sep->arg[3]),zone->GetZoneID(), -1);
|
||||
auto position = c->GetPosition();
|
||||
position.m_Heading = -1;
|
||||
database.AddWP(c, atoi(sep->arg[2]),wp, position, atoi(sep->arg[3]),zone->GetZoneID());
|
||||
}
|
||||
}
|
||||
else if (strcasecmp("delete",sep->arg[1]) == 0)
|
||||
@@ -2469,7 +2464,7 @@ void command_spawn(Client *c, const Seperator *sep)
|
||||
LogFile->write(EQEmuLog::Debug,"#spawn Spawning:");
|
||||
#endif
|
||||
|
||||
NPC* npc = NPC::SpawnNPC(sep->argplus[1], c->GetX(), c->GetY(), c->GetZ(), c->GetHeading(), c);
|
||||
NPC* npc = NPC::SpawnNPC(sep->argplus[1], c->GetPosition(), c);
|
||||
if (!npc) {
|
||||
c->Message(0, "Format: #spawn name race level material hp gender class priweapon secweapon merchantid bodytype - spawns a npc those parameters.");
|
||||
c->Message(0, "Name Format: NPCFirstname_NPCLastname - All numbers in a name are stripped and \"_\" characters become a space.");
|
||||
@@ -2528,7 +2523,7 @@ void command_npctypespawn(Client *c, const Seperator *sep)
|
||||
const NPCType* tmp = 0;
|
||||
if ((tmp = database.GetNPCType(atoi(sep->arg[1])))) {
|
||||
//tmp->fixedZ = 1;
|
||||
NPC* npc = new NPC(tmp, 0, c->GetX(), c->GetY(), c->GetZ(), c->GetHeading(), FlyMode3);
|
||||
NPC* npc = new NPC(tmp, 0, c->GetPosition(), FlyMode3);
|
||||
if (npc && sep->IsNumber(2))
|
||||
npc->SetNPCFactionID(atoi(sep->arg[2]));
|
||||
|
||||
@@ -2591,7 +2586,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
peekTrade = 0x20,
|
||||
peekWorld = 0x40
|
||||
} ;
|
||||
|
||||
|
||||
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
|
||||
c->Message(0, "You must have a PC target selected for this command");
|
||||
return;
|
||||
@@ -5420,8 +5415,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())
|
||||
@@ -5444,9 +5438,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);
|
||||
|
||||
@@ -5563,9 +5559,8 @@ void command_givemoney(Client *c, const Seperator *sep)
|
||||
|
||||
void command_itemsearch(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->arg[1][0] == 0) {
|
||||
if (sep->arg[1][0] == 0)
|
||||
c->Message(0, "Usage: #itemsearch [search string]");
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *search_criteria=sep->argplus[1];
|
||||
@@ -5620,6 +5615,7 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
c->Message(0, "50 items shown...too many results.");
|
||||
else
|
||||
c->Message(0, "%i items found", count);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7334,7 +7330,7 @@ void command_pf(Client *c, const Seperator *sep)
|
||||
{
|
||||
Mob *who = c->GetTarget();
|
||||
c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ());
|
||||
c->Message(0, "WP: (%.2f, %.2f, %.2f) (%d/%d)", who->GetCWPX(), who->GetCWPY(), who->GetCWPZ(), who->GetCWP(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1);
|
||||
c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1);
|
||||
c->Message(0, "TAR: (%.2f, %.2f, %.2f)", who->GetTarX(), who->GetTarY(), who->GetTarZ());
|
||||
c->Message(0, "TARV: (%.2f, %.2f, %.2f)", who->GetTarVX(), who->GetTarVY(), who->GetTarVZ());
|
||||
c->Message(0, "|TV|=%.2f index=%d", who->GetTarVector(), who->GetTarNDX());
|
||||
@@ -7376,16 +7372,18 @@ void command_bestz(Client *c, const Seperator *sep) {
|
||||
|
||||
if(c->GetTarget()) {
|
||||
z=c->GetTarget()->GetZ();
|
||||
RegionType = zone->watermap->ReturnRegionType(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z);
|
||||
c->Message(0,"InWater returns %d", zone->watermap->InWater(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z));
|
||||
c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z));
|
||||
auto position = xyz_location(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z);
|
||||
RegionType = zone->watermap->ReturnRegionType(position);
|
||||
c->Message(0,"InWater returns %d", zone->watermap->InWater(position));
|
||||
c->Message(0,"InLava returns %d", zone->watermap->InLava(position));
|
||||
|
||||
}
|
||||
else {
|
||||
z=c->GetZ();
|
||||
RegionType = zone->watermap->ReturnRegionType(c->GetX(), c->GetY(), z);
|
||||
c->Message(0,"InWater returns %d", zone->watermap->InWater(c->GetX(), c->GetY(), z));
|
||||
c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetX(), c->GetY(), z));
|
||||
auto position = xyz_location(c->GetX(), c->GetY(), z);
|
||||
RegionType = zone->watermap->ReturnRegionType(position);
|
||||
c->Message(0,"InWater returns %d", zone->watermap->InWater(position));
|
||||
c->Message(0,"InLava returns %d", zone->watermap->InLava(position));
|
||||
|
||||
}
|
||||
|
||||
@@ -8200,7 +8198,7 @@ void command_setgraveyard(Client *c, const Seperator *sep)
|
||||
zoneid = database.GetZoneID(sep->arg[1]);
|
||||
|
||||
if(zoneid > 0) {
|
||||
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetX(), t->GetY(), t->GetZ(), t->GetHeading());
|
||||
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetPosition());
|
||||
|
||||
if(graveyard_id > 0) {
|
||||
c->Message(0, "Successfuly added a new record for this graveyard!");
|
||||
@@ -8263,7 +8261,7 @@ void command_summonburriedplayercorpse(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
Corpse* PlayerCorpse = database.SummonBuriedCharacterCorpses(t->CharacterID(), t->GetZoneID(), zone->GetInstanceID(), t->GetX(), t->GetY(), t->GetZ(), t->GetHeading());
|
||||
Corpse* PlayerCorpse = database.SummonBuriedCharacterCorpses(t->CharacterID(), t->GetZoneID(), zone->GetInstanceID(), t->GetPosition());
|
||||
|
||||
if(!PlayerCorpse)
|
||||
c->Message(0, "Your target doesn't have any burried corpses.");
|
||||
|
||||
Reference in New Issue
Block a user