Replace some misplaced DirectExecute´s with delayed Execute calls. DirectExecute at this moment should only be used for transaction control and not for dynamic content.
--HG-- branch : trunk
This commit is contained in:
@@ -1173,14 +1173,14 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid)
|
||||
if (!linkedGuid) // we're removing the linking
|
||||
{
|
||||
mCreatureLinkedRespawnMap.erase(guid);
|
||||
WorldDatabase.DirectPExecute("DELETE FROM creature_linked_respawn WHERE guid = '%u'",guid);
|
||||
WorldDatabase.PExecute("DELETE FROM creature_linked_respawn WHERE guid = '%u'",guid);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CheckCreatureLinkedRespawn(guid,linkedGuid)) // we add/change linking
|
||||
{
|
||||
mCreatureLinkedRespawnMap[guid] = linkedGuid;
|
||||
WorldDatabase.DirectPExecute("REPLACE INTO creature_linked_respawn (guid,linkedGuid) VALUES ('%u','%u')",guid,linkedGuid);
|
||||
WorldDatabase.PExecute("REPLACE INTO creature_linked_respawn (guid,linkedGuid) VALUES ('%u','%u')",guid,linkedGuid);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user