From 7445ddad0520fd9a55234a0c22dca56e4e7c00d0 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 10 Jun 2009 19:41:53 +0200 Subject: Minor code cleanup: * Fix possible crash in OPvPCapturePoint::AddCapturePoint due to using null pointer in log output * Correct damage for Gore (arithmetic operator has precedence over question operator) * Correct SQL query that WaypointManager uses to count record number * Declare Aura *aur in OPvPWintergrasp::HandleKill only once and then evaluate value instead of declaring twice and then evaluating --HG-- branch : trunk --- src/game/WaypointManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/WaypointManager.cpp') diff --git a/src/game/WaypointManager.cpp b/src/game/WaypointManager.cpp index 26be14d89fa..382f70a19ad 100644 --- a/src/game/WaypointManager.cpp +++ b/src/game/WaypointManager.cpp @@ -34,7 +34,7 @@ void WaypointStore::Free() void WaypointStore::Load() { - QueryResult *result = WorldDatabase.PQuery("SELECT MAX(`id`) FROM `waypoint_data`"); + QueryResult *result = WorldDatabase.PQuery("SELECT COUNT(`id`) FROM `waypoint_data`"); if(!result) { sLog.outError("an error occured while loading the table `waypoint_data` (maybe it doesn't exist ?)"); -- cgit v1.2.3