Compare commits
1 Commits
main
...
lineup-ref
Author | SHA1 | Date | |
---|---|---|---|
|
1bfa41323f |
@ -4,7 +4,7 @@ import Packet from "../kcp/Packet";
|
|||||||
import Session from "../kcp/Session";
|
import Session from "../kcp/Session";
|
||||||
|
|
||||||
export default async function handle(session: Session, packet: Packet) {
|
export default async function handle(session: Session, packet: Packet) {
|
||||||
let lineup = await session.player.getLineup();
|
const lineup = await session.player.getLineup();
|
||||||
|
|
||||||
session.send("GetCurLineupDataScRsp", {
|
session.send("GetCurLineupDataScRsp", {
|
||||||
retcode: 0,
|
retcode: 0,
|
||||||
|
@ -8,7 +8,7 @@ export default async function handle(session: Session, packet: Packet) {
|
|||||||
const body = packet.body as JoinLineupCsReq;
|
const body = packet.body as JoinLineupCsReq;
|
||||||
session.send("JoinLineupScRsp", { retcode: 0 });
|
session.send("JoinLineupScRsp", { retcode: 0 });
|
||||||
|
|
||||||
let lineup = await session.player.getLineup();
|
const lineup = await session.player.getLineup();
|
||||||
const slot = body.slot || 0;
|
const slot = body.slot || 0;
|
||||||
const avatarList = [];
|
const avatarList = [];
|
||||||
for (const avatarId in lineup) {
|
for (const avatarId in lineup) {
|
||||||
|
@ -5,7 +5,7 @@ import Session from "../kcp/Session";
|
|||||||
export default async function handle(session: Session, packet: Packet) {
|
export default async function handle(session: Session, packet: Packet) {
|
||||||
const body = packet.body as SetLineupNameCsReq;
|
const body = packet.body as SetLineupNameCsReq;
|
||||||
|
|
||||||
let curLineup = await session.player.getLineup();
|
const curLineup = await session.player.getLineup();
|
||||||
curLineup.name = body.name;
|
curLineup.name = body.name;
|
||||||
session.player.setLineup(curLineup);
|
session.player.setLineup(curLineup);
|
||||||
session.player.save();
|
session.player.save();
|
||||||
|
Loading…
Reference in New Issue
Block a user