aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/Implementation
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2013-03-09 23:05:27 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2013-03-09 23:05:27 +0100
commit4e789d4c5c83dd6f0f582fe24e9d49b39950fffe (patch)
treeea563fb7ad5985ec2a2b887901b74fb6ed288841 /src/server/shared/Database/Implementation
parent65b16a97bee09e9c5114a35be7b0122987d249e1 (diff)
Core/Commands: Optimize for command .npc near
Diffstat (limited to 'src/server/shared/Database/Implementation')
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.cpp1
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.h1
2 files changed, 0 insertions, 2 deletions
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp
index 89f3cf8fdce..94060330d82 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp
@@ -84,7 +84,6 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME, "SELECT entry FROM item_template WHERE name = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_CREATURE_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM creature WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_", CONNECTION_SYNCH);
PrepareStatement(WORLD_INS_CREATURE, "INSERT INTO creature (guid, id , map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, MovementType, npcflag, unit_flags, dynamicflags) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(WORLD_DEL_GAME_EVENT_CREATURE, "DELETE FROM game_event_creature WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_DEL_GAME_EVENT_MODEL_EQUIP, "DELETE FROM game_event_model_equip WHERE guid = ?", CONNECTION_ASYNC);
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h
index 032baf29dd9..f6fd92b11cd 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.h
+++ b/src/server/shared/Database/Implementation/WorldDatabase.h
@@ -104,7 +104,6 @@ enum WorldDatabaseStatements
WORLD_SEL_ITEM_TEMPLATE_BY_NAME,
WORLD_SEL_CREATURE_BY_ID,
WORLD_SEL_GAMEOBJECT_NEAREST,
- WORLD_SEL_CREATURE_NEAREST,
WORLD_SEL_GAMEOBJECT_TARGET,
WORLD_INS_CREATURE,
WORLD_DEL_GAME_EVENT_CREATURE,