base StartChallengeScReq

This commit is contained in:
memetrollsXD 2022-08-02 23:13:13 +02:00
parent d7e0d42906
commit 64219d5895
No known key found for this signature in database
GPG Key ID: 105C2F3417AC32CD
3 changed files with 61 additions and 1 deletions

View File

@ -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,

View File

@ -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();

View File

@ -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);
}