diff options
| author | Azcobu <81782124+Azcobu@users.noreply.github.com> | 2021-07-25 00:39:54 +0930 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-24 17:09:54 +0200 |
| commit | c7e1fbd4c4a00e80b0bcec21efcb5980044a48cb (patch) | |
| tree | 09b4e6e1e2d7d3a8451091537b441180b1cdea37 /docs/useful-sql.md | |
| parent | 09dd8d979974609ba40cbc3354ce1850fd4a3c6a (diff) | |
| download | wiki-c7e1fbd4c4a00e80b0bcec21efcb5980044a48cb.tar.gz wiki-c7e1fbd4c4a00e80b0bcec21efcb5980044a48cb.tar.bz2 wiki-c7e1fbd4c4a00e80b0bcec21efcb5980044a48cb.zip | |
chore: Add respawn timer query to sql queries(#611)
Diffstat (limited to 'docs/useful-sql.md')
| -rw-r--r-- | docs/useful-sql.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/useful-sql.md b/docs/useful-sql.md index 13eca54..a15e3c4 100644 --- a/docs/useful-sql.md +++ b/docs/useful-sql.md @@ -15,7 +15,8 @@ + [Find all static creatures given a name](#find-all-static-creatures-given-a-name) + [Find creatures that use a certain spell](#find-creatures-that-use-a-certain-spell) + [Find average wander distance for a creature](#find-average-wander-distance-for-a-creature) - + [Find other members of a node pool](#find-other-members-of-a node-pool) + + [Find other members of a node pool](#find-other-members-of-a-node-pool) + + [Find respawn timers for a class of object](#find-respawn-timers-for-a-class-of-object) ### Introduction These SQL queries are intended to be fast and easy-to-use tools that can help identify and troubleshoot problems in the AzerothCore database. They're here to be a quick reference to help when looking at DB-related problems. If anyone else has any similar useful queries, let me know and I'll add them. Similarly, if you have a common problem for which you'd like a query written, feel free to get in touch. @@ -130,3 +131,13 @@ Given a node GUID, find if it belongs to a node pool and list the other members. SELECT * FROM `pool_gameobject` WHERE `pool_entry` IN ( SELECT `pool_entry` from `pool_gameobject` WHERE guid = XXXX); ``` + +#### Find respawn timers for a class of object +Given a object's name, find the respawn timers for all spawns that match that name string. +```SQL +SELECT got.name, go.guid, go.spawntimesecs +FROM `gameobject_template` got +JOIN `gameobject` go ON got.entry = go.id +WHERE name LIKE '%name-of-object%' +ORDER BY go.spawntimesecs +``` |
