diff --git a/src/server/packets/GetGachaInfoCsReq.ts b/src/server/packets/GetGachaInfoCsReq.ts index 273525f..2b50f09 100644 --- a/src/server/packets/GetGachaInfoCsReq.ts +++ b/src/server/packets/GetGachaInfoCsReq.ts @@ -13,7 +13,7 @@ export default async function handle(session: Session, packet: Packet) { endTime: unix() * 2, newbieGachaCnt: 10, todayGachaCnt: 1, - gachaId: 763, // TODO: Figure out gachaIDs + gachaId: 502, // TODO: Figure out gachaIDs detailWebview: "https://omfgdogs.com/" }], todaySingleGachaMaxCnt: 10, diff --git a/src/server/packets/JoinLineupCsReq.ts b/src/server/packets/JoinLineupCsReq.ts index ea3740f..dee8d04 100644 --- a/src/server/packets/JoinLineupCsReq.ts +++ b/src/server/packets/JoinLineupCsReq.ts @@ -25,6 +25,7 @@ export default async function handle(session: Session, packet: Packet) { slot, sp: 10000 }; + if (body.extraLineupType) lineup.extraLineupType = body.extraLineupType; session.player.setLineup(lineup); session.player.save(); diff --git a/src/server/packets/StartChallengeCsReq.ts b/src/server/packets/StartChallengeCsReq.ts new file mode 100644 index 0000000..80e6085 --- /dev/null +++ b/src/server/packets/StartChallengeCsReq.ts @@ -0,0 +1,59 @@ +import { ChallengeStatus, ExtraLineupType, StartChallengeCsReq, StartChallengeScRsp } from "../../data/proto/StarRail"; +import Packet from "../kcp/Packet"; +import Session from "../kcp/Session"; + +// StartChallengeCsReq { challengeId: 101 } +export default async function handle(session: Session, packet: Packet) { + const body = packet.body as StartChallengeCsReq; + + // TODO: This packet is just a base + + session.send("StartChallengeScRsp", { + retcode: 0, + curChallenge: { + challengeId: body.challengeId, + deadAvatarNum: 0, + extraLineupType: ExtraLineupType.LINEUP_CHALLENGE, + rounds: 1, + status: ChallengeStatus.CHALLENGE_DOING, + killMonsterList: [{ + monsterId: 1001010, + killNum: 1, + }] + }, + maze: { + // ? Data from MappingInfoExcelTable + id: 30101, + mapEntryId: 1000, + floor: { + floorId: 20121001, + scene: { + planeId: 20121, + entryId: 1000, + floorId: 20121001, + gameModeType: 1, + entityList: [{ + entityId: 10010101, + npcMonster: { + monsterId: 8013010, + worldLevel: 1, + }, + groupId: 11, + motion: { + pos: { + x: 0, + y: 100, + z: 0, + }, + rot: { + x: 0, + y: 0, + z: 0 + } + }, + }] + } + } + } + } as StartChallengeScRsp); +} \ No newline at end of file