[6922] Whitespace and newline fixes
[getmangos.git] / src / game / MovementHandler.cpp
blob849e3a88d6d5314615241b6015a07a3f1926e57c
1 /*
2 * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #include "Common.h"
20 #include "WorldPacket.h"
21 #include "WorldSession.h"
22 #include "Opcodes.h"
23 #include "Log.h"
24 #include "World.h"
25 #include "Corpse.h"
26 #include "Player.h"
27 #include "MapManager.h"
28 #include "Transports.h"
29 #include "BattleGround.h"
30 #include "WaypointMovementGenerator.h"
31 #include "InstanceSaveMgr.h"
33 void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & /*recv_data*/ )
35 sLog.outDebug( "WORLD: got MSG_MOVE_WORLDPORT_ACK." );
36 HandleMoveWorldportAckOpcode();
39 void WorldSession::HandleMoveWorldportAckOpcode()
41 // get the teleport destination
42 WorldLocation &loc = GetPlayer()->GetTeleportDest();
44 // possible errors in the coordinate validity check
45 if(!MapManager::IsValidMapCoord(loc.mapid,loc.x,loc.y,loc.z,loc.o))
47 LogoutPlayer(false);
48 return;
51 // get the destination map entry, not the current one, this will fix homebind and reset greeting
52 MapEntry const* mEntry = sMapStore.LookupEntry(loc.mapid);
53 InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(loc.mapid);
55 // reset instance validity, except if going to an instance inside an instance
56 if(GetPlayer()->m_InstanceValid == false && !mInstance)
57 GetPlayer()->m_InstanceValid = true;
59 GetPlayer()->SetSemaphoreTeleport(false);
61 // relocate the player to the teleport destination
62 GetPlayer()->SetMapId(loc.mapid);
63 GetPlayer()->Relocate(loc.x, loc.y, loc.z, loc.o);
65 // since the MapId is set before the GetInstance call, the InstanceId must be set to 0
66 // to let GetInstance() determine the proper InstanceId based on the player's binds
67 GetPlayer()->SetInstanceId(0);
69 // check this before Map::Add(player), because that will create the instance save!
70 bool reset_notify = (GetPlayer()->GetBoundInstance(GetPlayer()->GetMapId(), GetPlayer()->GetDifficulty()) == NULL);
72 GetPlayer()->SendInitialPacketsBeforeAddToMap();
73 // the CanEnter checks are done in TeleporTo but conditions may change
74 // while the player is in transit, for example the map may get full
75 if(!GetPlayer()->GetMap()->Add(GetPlayer()))
77 sLog.outDebug("WORLD: teleport of player %s (%d) to location %d,%f,%f,%f,%f failed", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid, loc.x, loc.y, loc.z, loc.o);
78 // teleport the player home
79 GetPlayer()->SetDontMove(false);
80 if(!GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()))
82 // the player must always be able to teleport home
83 sLog.outError("WORLD: failed to teleport player %s (%d) to homebind location %d,%f,%f,%f,%f!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
84 assert(false);
86 return;
88 GetPlayer()->SendInitialPacketsAfterAddToMap();
90 // flight fast teleport case
91 if(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE)
93 if(!_player->InBattleGround())
95 // short preparations to continue flight
96 GetPlayer()->SetDontMove(false);
97 FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
98 flight->Initialize(*GetPlayer());
99 return;
102 // battleground state prepare, stop flight
103 GetPlayer()->GetMotionMaster()->MovementExpired();
104 GetPlayer()->m_taxi.ClearTaxiDestinations();
107 // resurrect character at enter into instance where his corpse exist after add to map
108 Corpse *corpse = GetPlayer()->GetCorpse();
109 if (corpse && corpse->GetType() != CORPSE_BONES && corpse->GetMapId() == GetPlayer()->GetMapId())
111 if( mEntry->IsDungeon() )
113 GetPlayer()->ResurrectPlayer(0.5f);
114 GetPlayer()->SpawnCorpseBones();
115 GetPlayer()->SaveToDB();
119 if(mEntry->IsRaid() && mInstance)
121 if(reset_notify)
123 uint32 timeleft = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId()) - time(NULL);
124 GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), timeleft); // greeting at the entrance of the resort raid instance
128 // mount allow check
129 if(!mEntry->IsMountAllowed())
130 _player->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
132 // battleground state prepare
133 // only add to bg group and object, if the player was invited (else he entered through command)
134 if(_player->InBattleGround() && _player->IsInvitedForBattleGroundInstance(_player->GetBattleGroundId()))
136 BattleGround *bg = _player->GetBattleGround();
137 if(bg)
139 bg->AddPlayer(_player);
140 if(bg->GetMapId() == _player->GetMapId()) // we teleported to bg
142 // get the team this way, because arenas might 'override' the teams.
143 uint32 team = bg->GetPlayerTeam(_player->GetGUID());
144 if(!team)
145 team = _player->GetTeam();
146 if(!bg->GetBgRaid(team)) // first player joined
148 Group *group = new Group;
149 bg->SetBgRaid(team, group);
150 group->Create(_player->GetGUIDLow(), _player->GetName());
152 else // raid already exist
154 bg->GetBgRaid(team)->AddMember(_player->GetGUID(), _player->GetName());
160 // honorless target
161 if(GetPlayer()->pvpInfo.inHostileArea)
162 GetPlayer()->CastSpell(GetPlayer(), 2479, true);
164 // resummon pet
165 if(GetPlayer()->m_temporaryUnsummonedPetNumber)
167 Pet* NewPet = new Pet;
168 if(!NewPet->LoadPetFromDB(GetPlayer(), 0, GetPlayer()->m_temporaryUnsummonedPetNumber, true))
169 delete NewPet;
171 GetPlayer()->m_temporaryUnsummonedPetNumber = 0;
174 GetPlayer()->SetDontMove(false);
177 void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
179 CHECK_PACKET_SIZE(recv_data, 4+1+4+4+4+4+4);
181 if(GetPlayer()->GetDontMove())
182 return;
184 /* extract packet */
185 MovementInfo movementInfo;
186 uint32 MovementFlags;
188 recv_data >> MovementFlags;
189 recv_data >> movementInfo.unk1;
190 recv_data >> movementInfo.time;
191 recv_data >> movementInfo.x;
192 recv_data >> movementInfo.y;
193 recv_data >> movementInfo.z;
194 recv_data >> movementInfo.o;
196 //Save movement flags
197 _player->SetUnitMovementFlags(MovementFlags);
199 if(MovementFlags & MOVEMENTFLAG_ONTRANSPORT)
201 // recheck
202 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+8+4+4+4+4+4);
204 recv_data >> movementInfo.t_guid;
205 recv_data >> movementInfo.t_x;
206 recv_data >> movementInfo.t_y;
207 recv_data >> movementInfo.t_z;
208 recv_data >> movementInfo.t_o;
209 recv_data >> movementInfo.t_time;
212 if(MovementFlags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2))
214 // recheck
215 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
217 recv_data >> movementInfo.s_pitch; // pitch, -1.55=looking down, 0=looking straight forward, +1.55=looking up
220 // recheck
221 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
223 recv_data >> movementInfo.fallTime; // duration of last jump (when in jump duration from jump begin to now)
225 if(MovementFlags & MOVEMENTFLAG_JUMPING)
227 // recheck
228 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4+4+4+4);
230 recv_data >> movementInfo.j_unk; // constant, but different when jumping in water and on land?
231 recv_data >> movementInfo.j_sinAngle; // sin of angle between orientation0 and players orientation
232 recv_data >> movementInfo.j_cosAngle; // cos of angle between orientation0 and players orientation
233 recv_data >> movementInfo.j_xyspeed; // speed of xy movement
236 if(MovementFlags & MOVEMENTFLAG_SPLINE)
238 // recheck
239 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
241 recv_data >> movementInfo.u_unk1; // unknown
243 /*----------------*/
245 if(recv_data.size() != recv_data.rpos())
247 sLog.outError("MovementHandler: player %s (guid %d, account %u) sent a packet (opcode %u) that is %u bytes larger than it should be. Kicked as cheater.", _player->GetName(), _player->GetGUIDLow(), _player->GetSession()->GetAccountId(), recv_data.GetOpcode(), recv_data.size() - recv_data.rpos());
248 KickPlayer();
249 return;
252 if (!MaNGOS::IsValidMapCoord(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o))
253 return;
255 /* handle special cases */
256 if (MovementFlags & MOVEMENTFLAG_ONTRANSPORT)
258 // transports size limited
259 // (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
260 if( movementInfo.t_x > 50 || movementInfo.t_y > 50 || movementInfo.t_z > 50 )
261 return;
263 if( !MaNGOS::IsValidMapCoord(movementInfo.x+movementInfo.t_x, movementInfo.y+movementInfo.t_y,
264 movementInfo.z+movementInfo.t_z, movementInfo.o+movementInfo.t_o) )
265 return;
267 // if we boarded a transport, add us to it
268 if (!GetPlayer()->m_transport)
270 // elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
271 for (MapManager::TransportSet::iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
273 if ((*iter)->GetGUID() == movementInfo.t_guid)
275 // unmount before boarding
276 _player->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
278 GetPlayer()->m_transport = (*iter);
279 (*iter)->AddPassenger(GetPlayer());
280 break;
285 else if (GetPlayer()->m_transport) // if we were on a transport, leave
287 GetPlayer()->m_transport->RemovePassenger(GetPlayer());
288 GetPlayer()->m_transport = NULL;
289 movementInfo.t_x = 0.0f;
290 movementInfo.t_y = 0.0f;
291 movementInfo.t_z = 0.0f;
292 movementInfo.t_o = 0.0f;
293 movementInfo.t_time = 0;
296 // fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
297 if (recv_data.GetOpcode() == MSG_MOVE_FALL_LAND && !GetPlayer()->isInFlight())
299 // calculate total z distance of the fall
300 float z_diff = GetPlayer()->m_lastFallZ - movementInfo.z;
301 sLog.outDebug("zDiff = %f", z_diff);
302 Player *target = GetPlayer();
304 //Players with low fall distance, Feather Fall or physical immunity (charges used) are ignored
305 // 14.57 can be calculated by resolving damageperc formular below to 0
306 if (z_diff >= 14.57f && !target->isDead() && !target->isGameMaster() &&
307 !target->HasAuraType(SPELL_AURA_HOVER) && !target->HasAuraType(SPELL_AURA_FEATHER_FALL) &&
308 !target->HasAuraType(SPELL_AURA_FLY) && !target->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL,true) )
310 //Safe fall, fall height reduction
311 int32 safe_fall = target->GetTotalAuraModifier(SPELL_AURA_SAFE_FALL);
313 float damageperc = 0.018f*(z_diff-safe_fall)-0.2426f;
315 if(damageperc >0 )
317 uint32 damage = (uint32)(damageperc * target->GetMaxHealth()*sWorld.getRate(RATE_DAMAGE_FALL));
319 float height = movementInfo.z;
320 target->UpdateGroundPositionZ(movementInfo.x,movementInfo.y,height);
322 if (damage > 0)
324 //Prevent fall damage from being more than the player maximum health
325 if (damage > target->GetMaxHealth())
326 damage = target->GetMaxHealth();
328 // Gust of Wind
329 if (target->GetDummyAura(43621))
330 damage = target->GetMaxHealth()/2;
332 target->EnvironmentalDamage(target->GetGUID(), DAMAGE_FALL, damage);
335 //Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction
336 DEBUG_LOG("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.z, height, target->GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall);
340 //handle fall and logout at the same time (logout started before fall finished)
341 /* outdated and create problems with sit at stun sometime
342 if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_ROTATE))
344 target->SetStandState(PLAYER_STATE_SIT);
345 // Can't move
346 WorldPacket data( SMSG_FORCE_MOVE_ROOT, 12 );
347 data.append(target->GetPackGUID());
348 data << (uint32)2;
349 SendPacket( &data );
354 if(((MovementFlags & MOVEMENTFLAG_SWIMMING) != 0) != GetPlayer()->IsInWater())
356 // now client not include swimming flag in case jumping under water
357 GetPlayer()->SetInWater( !GetPlayer()->IsInWater() || GetPlayer()->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
360 /*----------------------*/
362 /* process position-change */
363 recv_data.put<uint32>(5, getMSTime()); // offset flags(4) + unk(1)
364 WorldPacket data(recv_data.GetOpcode(), (GetPlayer()->GetPackGUID().size()+recv_data.size()));
365 data.append(GetPlayer()->GetPackGUID());
366 data.append(recv_data.contents(), recv_data.size());
367 GetPlayer()->SendMessageToSet(&data, false);
369 GetPlayer()->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
370 GetPlayer()->m_movementInfo = movementInfo;
371 if (GetPlayer()->m_lastFallTime >= movementInfo.fallTime || GetPlayer()->m_lastFallZ <=movementInfo.z || recv_data.GetOpcode() == MSG_MOVE_FALL_LAND)
372 GetPlayer()->SetFallInformation(movementInfo.fallTime, movementInfo.z);
374 if(GetPlayer()->isMovingOrTurning())
375 GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
377 if(movementInfo.z < -500.0f)
379 if(GetPlayer()->InBattleGround()
380 && GetPlayer()->GetBattleGround()
381 && GetPlayer()->GetBattleGround()->HandlePlayerUnderMap(_player))
383 // do nothing, the handle already did if returned true
385 else
387 // NOTE: this is actually called many times while falling
388 // even after the player has been teleported away
389 // TODO: discard movement packets after the player is rooted
390 if(GetPlayer()->isAlive())
392 GetPlayer()->EnvironmentalDamage(GetPlayer()->GetGUID(),DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
393 // change the death state to CORPSE to prevent the death timer from
394 // starting in the next player update
395 GetPlayer()->KillPlayer();
396 GetPlayer()->BuildPlayerRepop();
399 // cancel the death timer here if started
400 GetPlayer()->RepopAtGraveyard();
405 void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
407 CHECK_PACKET_SIZE(recv_data, 8+4+4+1+4+4+4+4+4);
409 /* extract packet */
410 uint64 guid;
411 uint8 unkB;
412 uint32 unk1, flags, time, fallTime;
413 float x, y, z, orientation;
415 uint64 t_GUID;
416 float t_x, t_y, t_z, t_o;
417 uint32 t_time;
418 float s_pitch;
419 float j_unk1, j_sinAngle, j_cosAngle, j_xyspeed;
420 float u_unk1;
421 float newspeed;
423 recv_data >> guid;
425 // now can skip not our packet
426 if(_player->GetGUID() != guid)
427 return;
429 // continue parse packet
431 recv_data >> unk1;
432 recv_data >> flags >> unkB >> time;
433 recv_data >> x >> y >> z >> orientation;
434 if (flags & MOVEMENTFLAG_ONTRANSPORT)
436 // recheck
437 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+8+4+4+4+4+4);
439 recv_data >> t_GUID;
440 recv_data >> t_x >> t_y >> t_z >> t_o >> t_time;
442 if (flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2))
444 // recheck
445 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
447 recv_data >> s_pitch; // pitch, -1.55=looking down, 0=looking straight forward, +1.55=looking up
450 // recheck
451 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
453 recv_data >> fallTime; // duration of last jump (when in jump duration from jump begin to now)
455 if ((flags & MOVEMENTFLAG_JUMPING) || (flags & MOVEMENTFLAG_FALLING))
457 // recheck
458 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4+4+4+4);
460 recv_data >> j_unk1; // ?constant, but different when jumping in water and on land?
461 recv_data >> j_sinAngle >> j_cosAngle; // sin + cos of angle between orientation0 and players orientation
462 recv_data >> j_xyspeed; // speed of xy movement
465 if(flags & MOVEMENTFLAG_SPLINE)
467 // recheck
468 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
470 recv_data >> u_unk1; // unknown
473 // recheck
474 CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4);
476 recv_data >> newspeed;
477 /*----------------*/
479 // client ACK send one packet for mounted/run case and need skip all except last from its
480 // in other cases anti-cheat check can be fail in false case
481 UnitMoveType move_type;
482 UnitMoveType force_move_type;
484 static char const* move_type_name[MAX_MOVE_TYPE] = { "Walk", "Run", "RunBack", "Swim", "SwimBack", "TurnRate", "Flight", "FlightBack" };
486 uint16 opcode = recv_data.GetOpcode();
487 switch(opcode)
489 case CMSG_FORCE_WALK_SPEED_CHANGE_ACK: move_type = MOVE_WALK; force_move_type = MOVE_WALK; break;
490 case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: move_type = MOVE_RUN; force_move_type = MOVE_RUN; break;
491 case CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK: move_type = MOVE_RUN_BACK; force_move_type = MOVE_RUN_BACK; break;
492 case CMSG_FORCE_SWIM_SPEED_CHANGE_ACK: move_type = MOVE_SWIM; force_move_type = MOVE_SWIM; break;
493 case CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK: move_type = MOVE_SWIM_BACK; force_move_type = MOVE_SWIM_BACK; break;
494 case CMSG_FORCE_TURN_RATE_CHANGE_ACK: move_type = MOVE_TURN_RATE; force_move_type = MOVE_TURN_RATE; break;
495 case CMSG_FORCE_FLIGHT_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT; force_move_type = MOVE_FLIGHT; break;
496 case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; force_move_type = MOVE_FLIGHT_BACK; break;
497 default:
498 sLog.outError("WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
499 return;
502 // skip all forced speed changes except last and unexpected
503 // in run/mounted case used one ACK and it must be skipped.m_forced_speed_changes[MOVE_RUN} store both.
504 if(_player->m_forced_speed_changes[force_move_type] > 0)
506 --_player->m_forced_speed_changes[force_move_type];
507 if(_player->m_forced_speed_changes[force_move_type] > 0)
508 return;
511 if (!_player->GetTransport() && fabs(_player->GetSpeed(move_type) - newspeed) > 0.01f)
513 if(_player->GetSpeed(move_type) > newspeed) // must be greater - just correct
515 sLog.outError("%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
516 move_type_name[move_type], _player->GetName(), _player->GetSpeed(move_type), newspeed);
517 _player->SetSpeed(move_type,_player->GetSpeedRate(move_type),true);
519 else // must be lesser - cheating
521 sLog.outBasic("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
522 _player->GetName(),_player->GetSession()->GetAccountId(),_player->GetSpeed(move_type), newspeed);
523 _player->GetSession()->KickPlayer();
528 void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
530 sLog.outDebug("WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
532 CHECK_PACKET_SIZE(recv_data,8);
534 uint64 guid;
535 recv_data >> guid;
537 WorldPacket data(SMSG_TIME_SYNC_REQ, 4); // new 2.0.x, enable movement
538 data << uint32(0x00000000); // on blizz it increments periodically
539 SendPacket(&data);
542 void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
544 //sLog.outDebug("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM");
546 WorldPacket data(SMSG_MOUNTSPECIAL_ANIM, 8);
547 data << uint64(GetPlayer()->GetGUID());
549 GetPlayer()->SendMessageToSet(&data, false);
552 void WorldSession::HandleMoveKnockBackAck( WorldPacket & /*recv_data*/ )
554 // CHECK_PACKET_SIZE(recv_data,?);
555 sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
556 // Currently not used but maybe use later for recheck final player position
557 // (must be at call same as into "recv_data >> x >> y >> z >> orientation;"
560 uint32 flags, time;
561 float x, y, z, orientation;
562 uint64 guid;
563 uint32 sequence;
564 uint32 ukn1;
565 float xdirection,ydirection,hspeed,vspeed;
567 recv_data >> guid;
568 recv_data >> sequence;
569 recv_data >> flags >> time;
570 recv_data >> x >> y >> z >> orientation;
571 recv_data >> ukn1; //unknown
572 recv_data >> vspeed >> xdirection >> ydirection >> hspeed;
574 // skip not personal message;
575 if(GetPlayer()->GetGUID()!=guid)
576 return;
578 // check code
582 void WorldSession::HandleMoveHoverAck( WorldPacket& /*recv_data*/ )
584 sLog.outDebug("CMSG_MOVE_HOVER_ACK");
587 void WorldSession::HandleMoveWaterWalkAck(WorldPacket& /*recv_data*/)
589 sLog.outDebug("CMSG_MOVE_WATER_WALK_ACK");
592 void WorldSession::HandleSummonResponseOpcode(WorldPacket& recv_data)
594 CHECK_PACKET_SIZE(recv_data,8+1);
596 if(!_player->isAlive() || _player->isInCombat() )
597 return;
599 uint64 summoner_guid;
600 bool agree;
601 recv_data >> summoner_guid;
602 recv_data >> agree;
604 _player->SummonIfPossible(agree);