mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Commands] Modify #grid and #wp. (#1399)
- #grid add will no longer let you put in a duplicate grid. - Grid nodes now spawn with invul/immune to damage. - Grid nodes now set an entity variable "grid_id" on spawn. - This allows grid nodes to be specifically despawned by "grid_id" entity variable, meaning you can view multiple grids at once and not despawn them all accidentally. - #grid hide will despawn your targeted NPC's Grid nodes. - #grid add, #grid show, #grid delete, and #grid hide send messages to let GM know what's going on. - #wp add and #wp delete now send messages to let the GM know what's going on. - #wpadd now send messages to let the GM know what's going on.
This commit is contained in:
@@ -1036,6 +1036,24 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type
|
||||
results = QueryDatabase(query);
|
||||
}
|
||||
|
||||
bool ZoneDatabase::GridExistsInZone(uint32 zone_id, uint32 grid_id) {
|
||||
bool grid_exists = false;
|
||||
std::string query = fmt::format(
|
||||
"SELECT * FROM `grid` WHERE `id` = {} AND `zoneid` = {}",
|
||||
grid_id,
|
||||
zone_id
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return grid_exists;
|
||||
}
|
||||
|
||||
if (results.RowCount() == 1) {
|
||||
grid_exists = true;
|
||||
}
|
||||
return grid_exists;
|
||||
}
|
||||
|
||||
/**************************************
|
||||
* AddWP - Adds a new waypoint to a specific grid for a specific zone.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user