Fixed MSG_MOVE packets and SMSG_NAME_QUERY_RESPONSE
This commit is contained in:
parent
7bf8a4e899
commit
8f0b67daf0
@ -1040,13 +1040,19 @@ void WorldSession::_HandleNotificationOpcode(WorldPacket& recvPacket)
|
|||||||
void WorldSession::_HandleNameQueryResponseOpcode(WorldPacket& recvPacket)
|
void WorldSession::_HandleNameQueryResponseOpcode(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
uint64 pguid;
|
uint64 pguid;
|
||||||
uint8 unk;
|
uint8 realm;
|
||||||
std::string pname;
|
std::string pname;
|
||||||
|
uint32 prace, pgender, pclass;
|
||||||
pguid = recvPacket.GetPackedGuid();
|
if(GetInstance()->GetConf()->clientbuild>6005)
|
||||||
recvPacket >> unk >> pname;
|
pguid = recvPacket.GetPackedGuid();
|
||||||
|
else
|
||||||
|
recvPacket >> pguid;
|
||||||
|
recvPacket >> pname >> realm >> prace >> pgender >> pclass;
|
||||||
if(pname.length()>MAX_PLAYERNAME_LENGTH || pname.length()<MIN_PLAYERNAME_LENGTH)
|
if(pname.length()>MAX_PLAYERNAME_LENGTH || pname.length()<MIN_PLAYERNAME_LENGTH)
|
||||||
|
{
|
||||||
|
logerror("Playername Length outside bounds: %u",pname.length());
|
||||||
return; // playernames maxlen=12, minlen=2
|
return; // playernames maxlen=12, minlen=2
|
||||||
|
}
|
||||||
// rest of the packet is not interesting for now
|
// rest of the packet is not interesting for now
|
||||||
plrNameCache.Add(pguid,pname);
|
plrNameCache.Add(pguid,pname);
|
||||||
logdetail("CACHE: Assigned new player name: '%s' = " I64FMTD ,pname.c_str(),pguid);
|
logdetail("CACHE: Assigned new player name: '%s' = " I64FMTD ,pname.c_str(),pguid);
|
||||||
@ -1093,13 +1099,19 @@ void WorldSession::_HandleMovementOpcode(WorldPacket& recvPacket)
|
|||||||
uint64 guid;
|
uint64 guid;
|
||||||
uint16 flags2;
|
uint16 flags2;
|
||||||
guid = recvPacket.GetPackedGuid();
|
guid = recvPacket.GetPackedGuid();
|
||||||
recvPacket >> flags >> flags2 >> time >> x >> y >> z >> o >> unk32;
|
recvPacket >> flags;
|
||||||
|
if(GetInstance()->GetConf()->clientbuild>6005)
|
||||||
|
{
|
||||||
|
recvPacket >> flags2;
|
||||||
|
}
|
||||||
|
recvPacket >> time >> x >> y >> z >> o >> unk32;
|
||||||
DEBUG(logdebug("MOVE: "I64FMT" -> time=%u flags=0x%X x=%.4f y=%.4f z=%.4f o=%.4f",guid,time,flags,x,y,z,o));
|
DEBUG(logdebug("MOVE: "I64FMT" -> time=%u flags=0x%X x=%.4f y=%.4f z=%.4f o=%.4f",guid,time,flags,x,y,z,o));
|
||||||
Object *obj = objmgr.GetObj(guid);
|
Object *obj = objmgr.GetObj(guid);
|
||||||
if(obj && obj->IsWorldObject())
|
if(obj && obj->IsWorldObject())
|
||||||
{
|
{
|
||||||
((WorldObject*)obj)->SetPosition(x,y,z,o);
|
((WorldObject*)obj)->SetPosition(x,y,z,o);
|
||||||
}
|
}
|
||||||
|
//TODO: Eval rest of Packet!!
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::_HandleSetSpeedOpcode(WorldPacket& recvPacket)
|
void WorldSession::_HandleSetSpeedOpcode(WorldPacket& recvPacket)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user