Permalink
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...
1 parent c1bdd66 commit c10d5fb49617354f13948d83fa09ef8fa0ad0d2a @Exxenoz Exxenoz committed with Schmoozerd Aug 21, 2012
@@ -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
@@ -4330,15 +4330,15 @@ 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);
}
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);
@@ -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;
+}
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "12108"
+ #define REVISION_NR "12109"
#endif // __REVISION_NR_H__
@@ -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" />
@@ -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>
@@ -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
rsa commented on c10d5fb Aug 22, 2012

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
rsa commented on c10d5fb Aug 22, 2012

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
rsa commented on c10d5fb Aug 22, 2012

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
rsa commented on c10d5fb Aug 23, 2012

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

@VladimirMangos

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

@rsa
rsa commented on c10d5fb Aug 23, 2012

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

@rsa
rsa commented on c10d5fb Aug 23, 2012

@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
rsa commented on c10d5fb Aug 23, 2012

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.