private void TeleportHandler(WoWReader wr) { float x, y, z, orient; byte mask = wr.ReadByte(); WoWGuid guid = new WoWGuid(mask, wr.ReadBytes(WoWGuid.BitCount8(mask))); wr.ReadUInt32(); // flags wr.ReadUInt32(); // time? wr.ReadByte(); // unk 2.3.0 wr.ReadSingle(); // unk2 x = wr.ReadSingle(); y = wr.ReadSingle(); z = wr.ReadSingle(); orient = wr.ReadSingle(); wr.ReadUInt16(); // unk3 wr.ReadByte(); // unk4 BoogieCore.Log(LogType.SystemDebug, "Got teleport to: {0} {1} {2} {3}", x, y, z, orient); BoogieCore.world.getPlayerObject().SetCoordinates(new Coordinate(x, y, z, orient)); WoWWriter ww = new WoWWriter(OpCode.MSG_MOVE_TELEPORT_ACK); ww.Write(BoogieCore.world.getPlayerObject().GUID.GetOldGuid()); Send(ww.ToArray()); SendMoveHeartBeat(BoogieCore.world.getPlayerObject().GetCoordinates()); }
private void Handle_NewWorld(WoWReader wr) { Object obj = BoogieCore.world.getPlayerObject(); WorldZone(obj.GUID.GetOldGuid()); UInt32 mapid = wr.ReadUInt32(); BoogieCore.world.zoned(mapid); // Tell World we zoned, and give new mapid obj.coord = new Coordinate(wr.ReadSingle(), wr.ReadSingle(), wr.ReadSingle(), wr.ReadSingle()); WoWWriter ww = new WoWWriter(OpCode.MSG_MOVE_WORLDPORT_ACK); //ww.Write(BoogieCore.world.getPlayerObject().GUID.GetOldGuid()); Send(ww.ToArray()); SendMoveHeartBeat(obj.coord); BoogieCore.Log(LogType.System, "Got worldport for mapid: {0} xyz: {1} {2} {3}", mapid, obj.coord.X, obj.coord.Y, obj.coord.Z); BoogieCore.world.updatePlayerLocationUI(); }