Commit 2620484c authored by wjf's avatar wjf

l

parent 7dab2ecc
......@@ -430,6 +430,21 @@ export class NetManager extends ABNetManager {
};
this.send(net);
}
private encrypt(data) {
var kk: string = window['CFG'].consumerId;
kk = kk.substring(0, 16);
//补0;
var len = kk.length;
while (len < 16) {
kk = kk + "0";
len++;
}
var CryptoJS = window["CryptoJS"];
var key = CryptoJS.enc.Utf8.parse(kk);
var iv = CryptoJS.enc.Utf8.parse(kk);
return CryptoJS.AES.encrypt(data, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.ZeroPadding }).toString();
}
/**
*
* @param callback
......@@ -440,21 +455,33 @@ export class NetManager extends ABNetManager {
*/
hc_submit(callback: Function, orderId: number, score: number, gameData: string, submitToken: string): void {
const sign = this.createSgin(orderId, score, gameData, submitToken);
NetName.CUSTOM_DO_JOIN
var data = {
activityId: DataManager.ins.customCfgData.actId,
orderId: orderId,
gameData: gameData,
sgin: sign,
dynamicData: JSON.stringify([]),
detect: window['detect'],
deviceSessionId: window['_device_session_id'],
score: score,
}
var sgin = this.encrypt(data);
const net: INetData = {
name: 'hc_submit',
uri: '/hdtool/happyclear/submit',
type: 'post',
dataType: 'json',
param: {
activityId: DataManager.ins.customCfgData.actId,
orderId: orderId,
gameData: gameData,
sgin: sign,
dynamicData: JSON.stringify([]),
detect: window['detect'],
deviceSessionId: window['_device_session_id'],
score: score,
// activityId: DataManager.ins.customCfgData.actId,
// orderId: orderId,
// gameData: gameData,
// sgin: sign,
// dynamicData: JSON.stringify([]),
// detect: window['detect'],
// deviceSessionId: window['_device_session_id'],
// score: score,
sgin:sgin
},
hideMsg: true,
callback: callback
......
......@@ -198,8 +198,8 @@ export default class MainScene extends Scene {
//初始化索引信息
Tool.init();
//第几关
this.chapter = (data && data.chapter) ? data.chapter : 1;
// this.chapter = 33;
// this.chapter = (data && data.chapter) ? data.chapter : 1;
this.chapter = 70;
this.chapterTxt.text = "第" + this.chapter + "关";
//关卡数据,1期定制,70,后面35关地图一致,步数减少
this.chapterData = Chapters[this.chapter % 35 || 35];
......@@ -479,6 +479,13 @@ export default class MainScene extends Scene {
this.lattices[connectedLat[0]].down = connectedLat[1];
this.lattices[connectedLat[1]].up = connectedLat[0];
}
//第35和70,要枷锁元素,定制,2期去掉
if (this.chapter == 35 || this.chapter == 70) {
var locks = [4, 13, 22, 31, 40, 49, 57, 58, 59, 66, 67, 68, 75, 76, 77, 63, 64, 72, 73, 70, 71, 79, 80];
for (var aaa = 0; aaa < locks.length; aaa++) {
this.lattices[locks[aaa]].element.isLock = true;
}
}
//初始化完先检测死图
this.warningCop = Tool.dieMapCheck(this.lattices);
if (!this.warningCop) {
......@@ -488,13 +495,7 @@ export default class MainScene extends Scene {
else {
this.enableMouseEvt(true);
}
//第35和70,要枷锁元素,定制,2期去掉
if (this.chapter == 35 || this.chapter == 70) {
var locks = [4, 13, 22, 31, 40, 49, 57, 58, 59, 66, 67, 68, 75, 76, 77, 63, 64, 72, 73, 70, 71, 79, 80];
for (var aaa = 0; aaa < locks.length; aaa++) {
this.lattices[locks[aaa]].element.isLock = true;
}
}
}
/**
......
......@@ -1030,7 +1030,7 @@ export const Chapters: ChapterData[] = [
0, 1, 3, 3, 0, 3, 3, 1, 0,
1, 1, 3, 3, 3, 3, 3, 1, 1,
],
generateLats: [0, 1, 2, 3, 5, 6, 7, 8],
generateLats: [0, 1, 2, 3, 4, 5, 6, 7, 8],
},
baseElementTypes: [0, 1, 2, 3, 4],
effectInitProbability: 0.05,
......@@ -1064,7 +1064,7 @@ export const Chapters: ChapterData[] = [
3, 3, 5, 3, 3, 3, 5, 3, 3,
3, 3, 5, 3, 3, 3, 5, 3, 3,
],
generateLats: [0, 1, 2, 3, 5, 6, 7, 8],
generateLats: [0, 1, 2, 3, 4, 5, 6, 7, 8],
},
baseElementTypes: [0, 1, 2, 3, 4],
effectInitProbability: 0.05,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment