diff --git a/gts/pokemondpds_web.ashx.cs b/gts/pokemondpds_web.ashx.cs index 1d877b72..3418acfd 100644 --- a/gts/pokemondpds_web.ashx.cs +++ b/gts/pokemondpds_web.ashx.cs @@ -61,36 +61,77 @@ namespace PkmnFoundations.GTS { // This is a replayed response from a game I had with Pipian. // It appears to be 49 ints. - // todo: A real implementation + // todo(mythra): A real implementation + // - we can generate events manually now, but we have a few + // missing fields, so more research will need to be done before + // that implementation. - response.Write(new byte[] - { - 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, - 0x9e, 0xc4, 0x70, 0xa7, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, - 0x0a, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, - 0x0d, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, - 0x0f, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x33, 0x04, 0x00, 0x00, - 0x12, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, - 0x0d, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x74, 0x04, 0x00, 0x00, - 0x0b, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, - 0x13, 0x00, 0x00, 0x00 - }, 0, 196); + // note(mythra): this response is usually overwritten by the + // peerchat server (through GETCHANKEY `b_lib_c_lobby`). + // this is only taken if that channel key returns an + // "empty" response. + Random room_choice = new Random(); + if (room_choice.Next() % 2 == 0) { + // Mew Room w/ Arceus Footprint. + response.Write(new byte[] + { + 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x33, 0x04, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x74, 0x04, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00 + }, 0, 196); + } else { + // Grass Room without Arceus Footprint. + response.Write(new byte[] + { + 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0x9e, 0xc4, 0x70, 0xa7, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x33, 0x04, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x74, 0x04, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00 + }, 0, 196); + } } break;