diff options
| author | joschiwald <joschiwald.trinity@gmail.com> | 2014-10-19 15:12:20 +0200 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2014-10-19 16:18:54 +0200 |
| commit | 53725517a029ee3c40d851cab687e1726b09fde0 (patch) | |
| tree | 928b7f097204a862e7a0ba53d40afc291e550f1f /src/server/scripts/Commands | |
| parent | 5b08387792dae0afbf91ab74808dc978bf418bca (diff) | |
Core/Misc: fixed a scenario when character factionchange create unexpected results, also moved packet generating code into unique methods
(Packet structure not verificated to 6.0.2)
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_account.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_battlenet_account.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 7 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_tele.cpp | 14 |
4 files changed, 13 insertions, 12 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index e398e54ad19..b89048eb70d 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -132,7 +132,7 @@ public: handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName); if (handler->GetSession()) { - TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')", + TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), accountName, email.c_str()); diff --git a/src/server/scripts/Commands/cs_battlenet_account.cpp b/src/server/scripts/Commands/cs_battlenet_account.cpp index dfbff501144..823fa6ab6a1 100644 --- a/src/server/scripts/Commands/cs_battlenet_account.cpp +++ b/src/server/scripts/Commands/cs_battlenet_account.cpp @@ -87,7 +87,7 @@ public: handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName); if (handler->GetSession()) { - TC_LOG_INFO("entities.player.character", "Battle.net account: %d (IP: %s) Character:[%s] (GUID: %u) created Account %s", + TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (GUID: %u) created Account %s", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), accountName); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 42040df8ed0..055f0aa8914 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -511,13 +511,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; |
