This commit is contained in:
Machiavelli committed 2011-11-20 13:46:53 +01:00
1 parent 831f2f4a9d
commit 682c3289c7
1 file changed
+4 -4
+4 -4
View File
@@ -125,15 +125,15 @@ public:
if (!handler->extractPlayerTarget(nameStr, &target, &target_guid, &target_name))
return false;
if (strcmp(teleStr, "$home") == 0) // References target's homebind
{
if (strcmp(teleStr, "$home") == 0) // References target's homebind
{
if (target)
target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation());
else
{
{
QueryResult resultDB = CharacterDatabase.PQuery("SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = %u", target_guid);
if (resultDB)
{
{
Field* fieldsDB = resultDB->Fetch();
uint32 mapId = fieldsDB[0].GetUInt32();
uint32 zoneId = fieldsDB[1].GetUInt32();