aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp7
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp14
2 files changed, 11 insertions, 10 deletions
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 42627ec082f..ac7bb5f8a28 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -510,13 +510,14 @@ public:
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE));
// in point where GM stay
- Player::SavePositionInDB(handler->GetSession()->GetPlayer()->GetMapId(),
+ SQLTransaction dummy;
+ Player::SavePositionInDB(WorldLocation(handler->GetSession()->GetPlayer()->GetMapId(),
handler->GetSession()->GetPlayer()->GetPositionX(),
handler->GetSession()->GetPlayer()->GetPositionY(),
handler->GetSession()->GetPlayer()->GetPositionZ(),
- handler->GetSession()->GetPlayer()->GetOrientation(),
+ handler->GetSession()->GetPlayer()->GetOrientation()),
handler->GetSession()->GetPlayer()->GetZoneId(),
- targetGuid);
+ targetGuid, dummy);
}
return true;
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index 6b4fb7d104d..01b146b68c6 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -141,13 +141,11 @@ public:
if (resultDB)
{
Field* fieldsDB = resultDB->Fetch();
- uint32 mapId = fieldsDB[0].GetUInt16();
+ WorldLocation loc(fieldsDB[0].GetUInt16(), fieldsDB[2].GetFloat(), fieldsDB[3].GetFloat(), fieldsDB[4].GetFloat(), 0.0f);
uint32 zoneId = fieldsDB[1].GetUInt16();
- float posX = fieldsDB[2].GetFloat();
- float posY = fieldsDB[3].GetFloat();
- float posZ = fieldsDB[4].GetFloat();
- Player::SavePositionInDB(mapId, posX, posY, posZ, 0, zoneId, target_guid);
+ SQLTransaction dummy;
+ Player::SavePositionInDB(loc, zoneId, target_guid, dummy);
}
}
@@ -203,8 +201,10 @@ public:
std::string nameLink = handler->playerLink(target_name);
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE), tele->name.c_str());
- Player::SavePositionInDB(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation,
- sMapMgr->GetZoneId(tele->mapId, tele->position_x, tele->position_y, tele->position_z), target_guid);
+
+ SQLTransaction dummy;
+ Player::SavePositionInDB(WorldLocation(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation),
+ sMapMgr->GetZoneId(tele->mapId, tele->position_x, tele->position_y, tele->position_z), target_guid, dummy);
}
return true;