Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[12109] Add file to handle vehicle related opcodes

Also fixed a stupid typo from recent commit. Thx to dbauz for pointing

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
  • Loading branch information...
commit c10d5fb49617354f13948d83fa09ef8fa0ad0d2a 1 parent c1bdd66
@Exxenoz Exxenoz authored Schmoozerd committed
View
18 src/game/MovementHandler.cpp
@@ -404,24 +404,6 @@ void WorldSession::HandleMoveNotActiveMoverOpcode(WorldPacket& recv_data)
_player->m_movementInfo = mi;
}
-void WorldSession::HandleDismissControlledVehicle(WorldPacket& recv_data)
-{
- DEBUG_LOG("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
- recv_data.hexlike();
-
- ObjectGuid guid;
- MovementInfo mi;
-
- recv_data >> guid.ReadAsPacked();
- recv_data >> mi;
-
- ObjectGuid vehicleGUID = _player->GetCharmGuid();
- if (!vehicleGUID) // something wrong here...
- return;
-
- _player->m_movementInfo = mi;
-}
-
void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
{
// DEBUG_LOG("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM");
View
4 src/game/Player.cpp
@@ -4330,7 +4330,7 @@ void Player::DeleteOldCharacters(uint32 keepDays)
void Player::SetRoot(bool enable)
{
- WorldPacket data(enable ? SMSG_FORCE_MOVE_ROOT : SMSG_FORCE_MOVE_UNROOT, GetPackGUID().size() + 4));
+ WorldPacket data(enable ? SMSG_FORCE_MOVE_ROOT : SMSG_FORCE_MOVE_UNROOT, GetPackGUID().size() + 4);
data << GetPackGUID();
data << uint32(0);
GetSession()->SendPacket(&data);
@@ -4338,7 +4338,7 @@ void Player::SetRoot(bool enable)
void Player::SetWaterWalk(bool enable)
{
- WorldPacket data(enable ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4));
+ WorldPacket data(enable ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4);
data << GetPackGUID();
data << uint32(0);
GetSession()->SendPacket(&data);
View
45 src/game/VehicleHandler.cpp
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2005-2012 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "Common.h"
+#include "WorldPacket.h"
+#include "WorldSession.h"
+#include "Opcodes.h"
+#include "ObjectGuid.h"
+#include "Log.h"
+#include "Player.h"
+#include "Vehicle.h"
+#include "ObjectMgr.h"
+
+void WorldSession::HandleDismissControlledVehicle(WorldPacket& recv_data)
+{
+ DEBUG_LOG("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
+ recv_data.hexlike();
+
+ ObjectGuid guid;
+ MovementInfo mi;
+
+ recv_data >> guid.ReadAsPacked();
+ recv_data >> mi;
+
+ ObjectGuid vehicleGUID = _player->GetCharmGuid();
+ if (!vehicleGUID) // something wrong here...
+ return;
+
+ _player->m_movementInfo = mi;
+}
View
2  src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "12108"
+ #define REVISION_NR "12109"
#endif // __REVISION_NR_H__
View
1  win/VC100/game.vcxproj
@@ -498,6 +498,7 @@
<ClCompile Include="..\..\src\game\Unit.cpp" />
<ClCompile Include="..\..\src\game\UpdateData.cpp" />
<ClCompile Include="..\..\src\game\Vehicle.cpp" />
+ <ClCompile Include="..\..\src\game\VehicleHandler.cpp" />
<ClCompile Include="..\..\src\game\VoiceChatHandler.cpp" />
<ClCompile Include="..\..\src\game\WaypointManager.cpp" />
<ClCompile Include="..\..\src\game\WaypointMovementGenerator.cpp" />
View
3  win/VC100/game.vcxproj.filters
@@ -249,6 +249,9 @@
<ClCompile Include="..\..\src\game\UpdateData.cpp">
<Filter>World/Handlers</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\game\VehicleHandler.cpp">
+ <Filter>World/Handlers</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\game\VoiceChatHandler.cpp">
<Filter>World/Handlers</Filter>
</ClCompile>
View
4 win/VC90/game.vcproj
@@ -1035,6 +1035,10 @@
>
</File>
<File
+ RelativePath="..\..\src\game\VehicleHandler.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\src\game\VoiceChatHandler.cpp"
>
</File>

14 comments on commit c10d5fb

@rsa

author - zergtmn, 2,5 year ago...
PS this also has similate errors, as source patch...

@zergtmn

it's just moving code from one place to another. how errors are possible there?

@rsa

received guid not used, but must. his may be not equal current charmGuid (different reactions), also some events must be resulted of this opcode...

@Schmoozerd

obviously this comment was about creating a placeholder and fix some stupid typos.

So there never was any intention at all to implement any opcode with this commit

@rsa

Very original method for creating placeholder - move wrong and bugged code from one place to another :) Please forgive my stupidity, I did not think that you are so joking :)

@Schmoozerd

You are aleays free to keep your notions to yourself.

@VladimirMangos

rsa, from good style work with git repo this is good commit. If part file moved to new file then better code move do without changes as possible. Also this let add project files updates independent from code changes. That is also good for clear changes view.

@rsa

Владимир, не берите на душу. Мне уже довольно давно надоело воевать с мельницами, поэтому я больше прикалываюсь. (сейчас так вообще вся энергия ушла в -tree. возможно это и хорошо. хотя и втыкивание патчей с трехлетней историей тоже наверное плюс... хз...) Хотя логика тут сильно хромает - уж делать плейсхолдер, так чистый, а не с дремучими ошибками тянущимися ХЗ сколько времени...

@VladimirMangos

Создание плейсхолдера - часто техническая операция переноса того что туда должно уйти - причем тут ошибки - главное некий критерий сортировки что к нему относиться и все. Исправление ошибок для других коммитов. Не вижу повода для приколов. Он например нужен в том числе как подготовительный шаг добавления одно из реализаций.

@rsa

Вот и надо было бы добавить чистый плейсхолдер, без кода и без ошибок. Именно как плейсхолдер для дальнейшей работы. Не было бы повода прикалываться. Насчет добавления реализаций - я не вижу что можно добавить рабочего из бранча kid10, там все настолько замшелое (как этот плейсхолдер :) что жуть. Впрочем это все равно не мое дело...

@rsa

@Schmoozerd , something told that you leave the project. Pity, can hardly now be somewhere to find another leader ... I'm a long time did not take you too seriously, perhaps it was not too good behavior. If something offended - I apologize. Good luck!

@cyberium

I confirm you can be rude :). But i don't think you have any responsability here.

@rsa

I do not expect an answer. As for the rudeness - I agree, but this is just a reflection of the real character (I'm pretty much over all of mangos members, I have quite unintelligent profession and into the bargain too quiet places of work in the past).

@Schmoozerd

@rsa Do not worry at all :)
Though I didn't enjoy all of your comments you did usually comment about content which I respected and often considered important feedback.
Me not continuouing here has nothing to do with you nor your actions at all.

Please sign in to comment.
Something went wrong with that request. Please try again.