mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
qqqq
This commit is contained in:
parent
c6710e7dfa
commit
26cc480866
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -132,7 +132,7 @@
|
|||||||
"_priority": 0,
|
"_priority": 0,
|
||||||
"_fov": 45,
|
"_fov": 45,
|
||||||
"_fovAxis": 0,
|
"_fovAxis": 0,
|
||||||
"_orthoHeight": 1000,
|
"_orthoHeight": 700,
|
||||||
"_near": 0,
|
"_near": 0,
|
||||||
"_far": 1000,
|
"_far": 1000,
|
||||||
"_color": {
|
"_color": {
|
||||||
|
@ -93,5 +93,25 @@
|
|||||||
"value": 20
|
"value": 20
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 210001,
|
||||||
|
"name": "锻造礼包",
|
||||||
|
"tig": "锻造礼包",
|
||||||
|
"limit": 1,
|
||||||
|
"limitValue": 0,
|
||||||
|
"exchanges": [
|
||||||
|
{
|
||||||
|
"id": 90001,
|
||||||
|
"value": 2000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rewards": [
|
||||||
|
{
|
||||||
|
"type": 1,
|
||||||
|
"id": 90002,
|
||||||
|
"value": 20
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -50,7 +50,7 @@
|
|||||||
{
|
{
|
||||||
"id": 90007,
|
"id": 90007,
|
||||||
"icon": "90007",
|
"icon": "90007",
|
||||||
"name": "兑换券",
|
"name": "点卷",
|
||||||
"tig": "用于购买礼包",
|
"tig": "用于购买礼包",
|
||||||
"args": "",
|
"args": "",
|
||||||
"quality": 1
|
"quality": 1
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": 1,
|
|
||||||
"tig": "金币礼包",
|
"tig": "金币礼包",
|
||||||
"giftId": 180001
|
"giftId": 180001,
|
||||||
|
"type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
|
||||||
"tig": "好多金币礼包",
|
"tig": "好多金币礼包",
|
||||||
"giftId": 180002
|
"giftId": 180002,
|
||||||
|
"type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
|
||||||
"tig": "限购矿石礼包",
|
"tig": "限购矿石礼包",
|
||||||
"giftId": 190001
|
"giftId": 190001,
|
||||||
|
"type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
|
||||||
"tig": "每日矿石礼包",
|
"tig": "每日矿石礼包",
|
||||||
"giftId": 200001
|
"giftId": 200001,
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tig": "锻造礼包",
|
||||||
|
"giftId": 210001,
|
||||||
|
"type": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
File diff suppressed because it is too large
Load Diff
@ -1119,8 +1119,8 @@
|
|||||||
"_string": "购买",
|
"_string": "购买",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 26,
|
"_actualFontSize": 22,
|
||||||
"_fontSize": 26,
|
"_fontSize": 22,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_overflow": 1,
|
"_overflow": 1,
|
||||||
@ -1439,6 +1439,9 @@
|
|||||||
"giftLimit": {
|
"giftLimit": {
|
||||||
"__id__": 39
|
"__id__": 39
|
||||||
},
|
},
|
||||||
|
"giftPrice": {
|
||||||
|
"__id__": 48
|
||||||
|
},
|
||||||
"views": {
|
"views": {
|
||||||
"__id__": 33
|
"__id__": 33
|
||||||
},
|
},
|
||||||
|
@ -1482,7 +1482,7 @@
|
|||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_string": "兑换\n商城",
|
"_string": "点卷\n商城",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 24,
|
"_actualFontSize": 24,
|
||||||
@ -1702,10 +1702,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.ClickEvent",
|
"__type__": "cc.ClickEvent",
|
||||||
"target": null,
|
"target": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
"component": "",
|
"component": "",
|
||||||
"_componentId": "b51bfKvsidNPKBbFirAFgQI",
|
"_componentId": "eb3d97OVbpKJIEDdbauLD9N",
|
||||||
"handler": "onClickShop",
|
"handler": "onClickTigs",
|
||||||
"customEventData": ""
|
"customEventData": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2243,10 +2245,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.ClickEvent",
|
"__type__": "cc.ClickEvent",
|
||||||
"target": null,
|
"target": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
"component": "",
|
"component": "",
|
||||||
"_componentId": "b51bfKvsidNPKBbFirAFgQI",
|
"_componentId": "eb3d97OVbpKJIEDdbauLD9N",
|
||||||
"handler": "onClickShop",
|
"handler": "onClickTigs",
|
||||||
"customEventData": ""
|
"customEventData": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2337,6 +2341,8 @@
|
|||||||
"__id__": 0
|
"__id__": 0
|
||||||
},
|
},
|
||||||
"fileId": "65LU7XwHdBEp0gEjbdLCNL",
|
"fileId": "65LU7XwHdBEp0gEjbdLCNL",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2665,6 +2671,9 @@
|
|||||||
"views": {
|
"views": {
|
||||||
"__id__": 37
|
"__id__": 37
|
||||||
},
|
},
|
||||||
|
"tigs": {
|
||||||
|
"__id__": 48
|
||||||
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -32,10 +32,10 @@ import { Component } from "cc";
|
|||||||
// let WsPath = `ws://localhost:8080/websocket`
|
// let WsPath = `ws://localhost:8080/websocket`
|
||||||
// let APIPath = `http://192.168.1.23:8080`
|
// let APIPath = `http://192.168.1.23:8080`
|
||||||
// let WsPath = `ws://192.168.1.23:8080/websocket`
|
// let WsPath = `ws://192.168.1.23:8080/websocket`
|
||||||
let APIPath = `http://192.168.0.118:8080`
|
// let APIPath = `http://192.168.0.118:8080`
|
||||||
let WsPath = `ws://192.168.0.118:8080/websocket`
|
// let WsPath = `ws://192.168.0.118:8080/websocket`
|
||||||
// let APIPath = `https://api.pet.jisol.cn`
|
let APIPath = `https://api.pet.jisol.cn`
|
||||||
// let WsPath = `wss://api.pet.jisol.cn/websocket`
|
let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||||
|
|
||||||
//重写UI
|
//重写UI
|
||||||
class JNGLayer extends JNLayer{
|
class JNGLayer extends JNLayer{
|
||||||
|
@ -66,7 +66,7 @@ export default class GNormalModeBase<T,DT> extends GDefaultMode<T,DT>{
|
|||||||
//调整相机
|
//调整相机
|
||||||
this.camera.enabled = true;
|
this.camera.enabled = true;
|
||||||
let camreaPos = this.camera.node.worldPosition;
|
let camreaPos = this.camera.node.worldPosition;
|
||||||
this.camera.node.worldPosition = v3(0,450,camreaPos.z)
|
this.camera.node.worldPosition = v3(0,400,camreaPos.z)
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取配置
|
//获取配置
|
||||||
|
@ -1212,18 +1212,14 @@ export namespace TB {
|
|||||||
export class TbGShop {
|
export class TbGShop {
|
||||||
|
|
||||||
constructor(_json_: any) {
|
constructor(_json_: any) {
|
||||||
if (_json_.id === undefined) { throw new Error() }
|
|
||||||
this.id = _json_.id
|
|
||||||
if (_json_.tig === undefined) { throw new Error() }
|
if (_json_.tig === undefined) { throw new Error() }
|
||||||
this.tig = _json_.tig
|
this.tig = _json_.tig
|
||||||
if (_json_.giftId === undefined) { throw new Error() }
|
if (_json_.giftId === undefined) { throw new Error() }
|
||||||
this.giftId = _json_.giftId
|
this.giftId = _json_.giftId
|
||||||
|
if (_json_.type === undefined) { throw new Error() }
|
||||||
|
this.type = _json_.type
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* id
|
|
||||||
*/
|
|
||||||
readonly id: number
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ -1232,6 +1228,10 @@ export class TbGShop {
|
|||||||
* 礼包Id
|
* 礼包Id
|
||||||
*/
|
*/
|
||||||
readonly giftId: number
|
readonly giftId: number
|
||||||
|
/**
|
||||||
|
* 0.点卷商店 1.金币商店
|
||||||
|
*/
|
||||||
|
readonly type: number
|
||||||
|
|
||||||
resolve(tables:Tables)
|
resolve(tables:Tables)
|
||||||
{
|
{
|
||||||
@ -2012,23 +2012,23 @@ export class TbGGift{
|
|||||||
|
|
||||||
|
|
||||||
export class TbGShop{
|
export class TbGShop{
|
||||||
private _dataMap: Map<number, TB.TbGShop>
|
private _dataMap: Map<string, TB.TbGShop>
|
||||||
private _dataList: TB.TbGShop[]
|
private _dataList: TB.TbGShop[]
|
||||||
constructor(_json_: any) {
|
constructor(_json_: any) {
|
||||||
this._dataMap = new Map<number, TB.TbGShop>()
|
this._dataMap = new Map<string, TB.TbGShop>()
|
||||||
this._dataList = []
|
this._dataList = []
|
||||||
for(var _json2_ of _json_) {
|
for(var _json2_ of _json_) {
|
||||||
let _v: TB.TbGShop
|
let _v: TB.TbGShop
|
||||||
_v = new TB.TbGShop(_json2_)
|
_v = new TB.TbGShop(_json2_)
|
||||||
this._dataList.push(_v)
|
this._dataList.push(_v)
|
||||||
this._dataMap.set(_v.id, _v)
|
this._dataMap.set(_v.tig, _v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getDataMap(): Map<number, TB.TbGShop> { return this._dataMap; }
|
getDataMap(): Map<string, TB.TbGShop> { return this._dataMap; }
|
||||||
getDataList(): TB.TbGShop[] { return this._dataList; }
|
getDataList(): TB.TbGShop[] { return this._dataList; }
|
||||||
|
|
||||||
get(key: number): TB.TbGShop | undefined { return this._dataMap.get(key); }
|
get(key: string): TB.TbGShop | undefined { return this._dataMap.get(key); }
|
||||||
|
|
||||||
resolve(tables:Tables)
|
resolve(tables:Tables)
|
||||||
{
|
{
|
||||||
|
@ -12,8 +12,9 @@ export default class GiftData extends BaseData{
|
|||||||
records:GiftRecord[] = [];
|
records:GiftRecord[] = [];
|
||||||
dayRecords:GiftDayRecord[] = [];
|
dayRecords:GiftDayRecord[] = [];
|
||||||
|
|
||||||
onInit() {
|
async onInit() {
|
||||||
|
await this.UpdateGiftRecord();
|
||||||
|
await this.UpdateGiftDayRecord();
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询充值记录
|
//查询充值记录
|
||||||
@ -38,6 +39,8 @@ export default class GiftData extends BaseData{
|
|||||||
//购买礼包
|
//购买礼包
|
||||||
async buy(giftId:number){
|
async buy(giftId:number){
|
||||||
await API.BuyGift(giftId);
|
await API.BuyGift(giftId);
|
||||||
|
await this.UpdateGiftRecord();
|
||||||
|
await this.UpdateGiftDayRecord();
|
||||||
app.event.emit(GiftDataEnum.BUY);
|
app.event.emit(GiftDataEnum.BUY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ export default class PetEquipData extends BaseData{
|
|||||||
//获取指定宠物等级
|
//获取指定宠物等级
|
||||||
getForgingBenchPetLevel(petId:number = this.info.forgingPetId){
|
getForgingBenchPetLevel(petId:number = this.info.forgingPetId){
|
||||||
let exp = this.info.forgingPetLevels[`${petId}`] || 0;
|
let exp = this.info.forgingPetLevels[`${petId}`] || 0;
|
||||||
let list = TD.TbGRoleEquipLevel.getDataList().filter(info => info.exp <= exp);
|
let list = TD.TbGRoleEquipLevel.getDataList().filter(info => (exp-=info.exp) >= 0);
|
||||||
return list[list.length - 1].id;
|
return list[list.length - 1].id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ export enum ResourceType{
|
|||||||
DungeonGold = 90004, //钥匙:金币副本
|
DungeonGold = 90004, //钥匙:金币副本
|
||||||
DungeonForgedStones = 90005, //钥匙:锻造石副本
|
DungeonForgedStones = 90005, //钥匙:锻造石副本
|
||||||
Q1S = 90006, //魂:一品宠物魂
|
Q1S = 90006, //魂:一品宠物魂
|
||||||
|
GiftCoupons = 90007, //兑换券
|
||||||
}
|
}
|
||||||
|
|
||||||
//资源刷新类型
|
//资源刷新类型
|
||||||
|
@ -25,8 +25,6 @@ export class PetIcon extends Component {
|
|||||||
info:PlayerPetOV;
|
info:PlayerPetOV;
|
||||||
|
|
||||||
onLoad(){
|
onLoad(){
|
||||||
this.reset();
|
|
||||||
|
|
||||||
//监听
|
//监听
|
||||||
app.event.on(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
|
app.event.on(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
|
||||||
}
|
}
|
||||||
@ -35,13 +33,6 @@ export class PetIcon extends Component {
|
|||||||
app.event.off(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
|
app.event.off(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化
|
|
||||||
reset(){
|
|
||||||
|
|
||||||
this.starNode.active = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//信息更新
|
//信息更新
|
||||||
onUpdateInfo(info:PlayerPetOV){
|
onUpdateInfo(info:PlayerPetOV){
|
||||||
if(this.info && info.petId == this.info.petId){
|
if(this.info && info.petId == this.info.petId){
|
||||||
@ -51,6 +42,9 @@ export class PetIcon extends Component {
|
|||||||
|
|
||||||
//刷新页面
|
//刷新页面
|
||||||
onUpdateView(){
|
onUpdateView(){
|
||||||
|
|
||||||
|
this.starNode.active = false;
|
||||||
|
|
||||||
this.spine.skeletonData = app.battleRes.getRoleSpine(this.info.petTbId);
|
this.spine.skeletonData = app.battleRes.getRoleSpine(this.info.petTbId);
|
||||||
this.spine.setAnimation(0,UIPetAnim.std,true);
|
this.spine.setAnimation(0,UIPetAnim.std,true);
|
||||||
|
|
||||||
@ -67,7 +61,6 @@ export class PetIcon extends Component {
|
|||||||
|
|
||||||
//设置icon
|
//设置icon
|
||||||
set(info:PlayerPetOV){
|
set(info:PlayerPetOV){
|
||||||
this.reset();
|
|
||||||
this.info = info;
|
this.info = info;
|
||||||
this.onUpdateView();
|
this.onUpdateView();
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import { TD } from '../../App';
|
|||||||
import { Label } from 'cc';
|
import { Label } from 'cc';
|
||||||
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||||
import GiftData from '../../data/GiftData';
|
import GiftData from '../../data/GiftData';
|
||||||
|
import NumberTools from '../../tools/NumberTools';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('ShopGiftItem')
|
@ccclass('ShopGiftItem')
|
||||||
@ -16,6 +17,9 @@ export class ShopGiftItem extends JNScrollViewItem<TB.TbGShop> {
|
|||||||
@property(Label)
|
@property(Label)
|
||||||
giftLimit:Label; //限购
|
giftLimit:Label; //限购
|
||||||
|
|
||||||
|
@property(Label)
|
||||||
|
giftPrice:Label; //价格
|
||||||
|
|
||||||
@property(JNScrollView)
|
@property(JNScrollView)
|
||||||
views:JNScrollView; //礼包列表
|
views:JNScrollView; //礼包列表
|
||||||
|
|
||||||
@ -25,10 +29,6 @@ export class ShopGiftItem extends JNScrollViewItem<TB.TbGShop> {
|
|||||||
|
|
||||||
this.gift = TD.TbGGift.get(data.giftId);
|
this.gift = TD.TbGGift.get(data.giftId);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected start(): void {
|
|
||||||
|
|
||||||
this.giftName.string = this.data.tig;
|
this.giftName.string = this.data.tig;
|
||||||
|
|
||||||
if(this.gift.limit == TbGEnum.TGiftLimit.Unlimited)
|
if(this.gift.limit == TbGEnum.TGiftLimit.Unlimited)
|
||||||
@ -38,10 +38,11 @@ export class ShopGiftItem extends JNScrollViewItem<TB.TbGShop> {
|
|||||||
if(this.gift.limit == TbGEnum.TGiftLimit.Limit)
|
if(this.gift.limit == TbGEnum.TGiftLimit.Limit)
|
||||||
this.giftLimit.string = `限制( ${GiftData.getIns().getGiftRecordCount(this.gift.id)}/${this.gift.limitValue} )`;
|
this.giftLimit.string = `限制( ${GiftData.getIns().getGiftRecordCount(this.gift.id)}/${this.gift.limitValue} )`;
|
||||||
|
|
||||||
|
this.giftPrice.string = `${NumberTools.NumberStr(this.gift.exchanges[0].value)} ${TD.TbGResource.get(this.gift.exchanges[0].id).name}`;
|
||||||
this.views.refreshData(this.gift.rewards);
|
this.views.refreshData(this.gift.rewards);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//点击购买礼包
|
//点击购买礼包
|
||||||
async onClickBuy(){
|
async onClickBuy(){
|
||||||
|
@ -3,6 +3,9 @@ import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLay
|
|||||||
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||||
import { app, TD } from '../../App';
|
import { app, TD } from '../../App';
|
||||||
import GiftData, { GiftDataEnum } from '../../data/GiftData';
|
import GiftData, { GiftDataEnum } from '../../data/GiftData';
|
||||||
|
import { Sprite } from 'cc';
|
||||||
|
import { color } from 'cc';
|
||||||
|
import { EventTouch } from 'cc';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
//商店页面
|
//商店页面
|
||||||
@ -13,6 +16,13 @@ export class ShopView extends JNLayerBase {
|
|||||||
@property(JNScrollView)
|
@property(JNScrollView)
|
||||||
views:JNScrollView
|
views:JNScrollView
|
||||||
|
|
||||||
|
//商店标签
|
||||||
|
@property(Node)
|
||||||
|
tigs:Node;
|
||||||
|
|
||||||
|
//页面下标
|
||||||
|
index:number = 0;
|
||||||
|
|
||||||
async onJNLoad(data?: any) {
|
async onJNLoad(data?: any) {
|
||||||
|
|
||||||
super.onJNLoad(data);
|
super.onJNLoad(data);
|
||||||
@ -31,13 +41,24 @@ export class ShopView extends JNLayerBase {
|
|||||||
|
|
||||||
async onUpdateView() {
|
async onUpdateView() {
|
||||||
|
|
||||||
await GiftData.getIns().UpdateGiftRecord();
|
this.tigs.children.forEach((item,index) => {
|
||||||
await GiftData.getIns().UpdateGiftDayRecord();
|
if(this.index == index){
|
||||||
|
item.getComponentInChildren(Sprite).color = color(0,0,0);
|
||||||
|
}else{
|
||||||
|
item.getComponentInChildren(Sprite).color = color(255,255,255);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
this.views.refreshData(TD.TbGShop.getDataList());
|
this.views.refreshData(TD.TbGShop.getDataList().filter(item => item.type == this.index));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//切换下标
|
||||||
|
onClickTigs(touch:EventTouch){
|
||||||
|
this.index = touch.target.getSiblingIndex();
|
||||||
|
this.onUpdateView();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a98403e0e131001f21f870c9d511c3c63fbbc486
|
Subproject commit 7d40b6c6e3089fe4feb559e85fd051aa74885cab
|
@ -16,19 +16,15 @@ import com.google.gson.JsonObject;
|
|||||||
|
|
||||||
public final class TbGShop extends AbstractBean {
|
public final class TbGShop extends AbstractBean {
|
||||||
public TbGShop(JsonObject _buf) {
|
public TbGShop(JsonObject _buf) {
|
||||||
id = _buf.get("id").getAsInt();
|
|
||||||
tig = _buf.get("tig").getAsString();
|
tig = _buf.get("tig").getAsString();
|
||||||
giftId = _buf.get("giftId").getAsInt();
|
giftId = _buf.get("giftId").getAsInt();
|
||||||
|
type = _buf.get("type").getAsInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TbGShop deserialize(JsonObject _buf) {
|
public static TbGShop deserialize(JsonObject _buf) {
|
||||||
return new cfg.TB.TbGShop(_buf);
|
return new cfg.TB.TbGShop(_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* id
|
|
||||||
*/
|
|
||||||
public final int id;
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ -37,6 +33,10 @@ public final class TbGShop extends AbstractBean {
|
|||||||
* 礼包Id
|
* 礼包Id
|
||||||
*/
|
*/
|
||||||
public final int giftId;
|
public final int giftId;
|
||||||
|
/**
|
||||||
|
* 0.点卷商店 1.金币商店
|
||||||
|
*/
|
||||||
|
public final int type;
|
||||||
|
|
||||||
public static final int __ID__ = 319422095;
|
public static final int __ID__ = 319422095;
|
||||||
|
|
||||||
@ -46,9 +46,9 @@ public final class TbGShop extends AbstractBean {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "{ "
|
return "{ "
|
||||||
+ "(format_field_name __code_style field.name):" + id + ","
|
|
||||||
+ "(format_field_name __code_style field.name):" + tig + ","
|
+ "(format_field_name __code_style field.name):" + tig + ","
|
||||||
+ "(format_field_name __code_style field.name):" + giftId + ","
|
+ "(format_field_name __code_style field.name):" + giftId + ","
|
||||||
|
+ "(format_field_name __code_style field.name):" + type + ","
|
||||||
+ "}";
|
+ "}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,24 +14,24 @@ import com.google.gson.JsonElement;
|
|||||||
|
|
||||||
|
|
||||||
public final class TbGShop {
|
public final class TbGShop {
|
||||||
private final java.util.HashMap<Integer, cfg.TB.TbGShop> _dataMap;
|
private final java.util.HashMap<String, cfg.TB.TbGShop> _dataMap;
|
||||||
private final java.util.ArrayList<cfg.TB.TbGShop> _dataList;
|
private final java.util.ArrayList<cfg.TB.TbGShop> _dataList;
|
||||||
|
|
||||||
public TbGShop(JsonElement _buf) {
|
public TbGShop(JsonElement _buf) {
|
||||||
_dataMap = new java.util.HashMap<Integer, cfg.TB.TbGShop>();
|
_dataMap = new java.util.HashMap<String, cfg.TB.TbGShop>();
|
||||||
_dataList = new java.util.ArrayList<cfg.TB.TbGShop>();
|
_dataList = new java.util.ArrayList<cfg.TB.TbGShop>();
|
||||||
|
|
||||||
for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) {
|
for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) {
|
||||||
cfg.TB.TbGShop _v;
|
cfg.TB.TbGShop _v;
|
||||||
_v = cfg.TB.TbGShop.deserialize(_e_.getAsJsonObject());
|
_v = cfg.TB.TbGShop.deserialize(_e_.getAsJsonObject());
|
||||||
_dataList.add(_v);
|
_dataList.add(_v);
|
||||||
_dataMap.put(_v.id, _v);
|
_dataMap.put(_v.tig, _v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public java.util.HashMap<Integer, cfg.TB.TbGShop> getDataMap() { return _dataMap; }
|
public java.util.HashMap<String, cfg.TB.TbGShop> getDataMap() { return _dataMap; }
|
||||||
public java.util.ArrayList<cfg.TB.TbGShop> getDataList() { return _dataList; }
|
public java.util.ArrayList<cfg.TB.TbGShop> getDataList() { return _dataList; }
|
||||||
|
|
||||||
public cfg.TB.TbGShop get(int key) { return _dataMap.get(key); }
|
public cfg.TB.TbGShop get(String key) { return _dataMap.get(key); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@ spring:
|
|||||||
serialization:
|
serialization:
|
||||||
write-dates-as-timestamps: true
|
write-dates-as-timestamps: true
|
||||||
|
|
||||||
mybatis-plus:
|
#mybatis-plus:
|
||||||
configuration:
|
# configuration:
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
@ -93,5 +93,25 @@
|
|||||||
"value": 20
|
"value": 20
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 210001,
|
||||||
|
"name": "锻造礼包",
|
||||||
|
"tig": "锻造礼包",
|
||||||
|
"limit": 1,
|
||||||
|
"limitValue": 0,
|
||||||
|
"exchanges": [
|
||||||
|
{
|
||||||
|
"id": 90001,
|
||||||
|
"value": 2000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rewards": [
|
||||||
|
{
|
||||||
|
"type": 1,
|
||||||
|
"id": 90002,
|
||||||
|
"value": 20
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -50,7 +50,7 @@
|
|||||||
{
|
{
|
||||||
"id": 90007,
|
"id": 90007,
|
||||||
"icon": "90007",
|
"icon": "90007",
|
||||||
"name": "兑换券",
|
"name": "点卷",
|
||||||
"tig": "用于购买礼包",
|
"tig": "用于购买礼包",
|
||||||
"args": "",
|
"args": "",
|
||||||
"quality": 1
|
"quality": 1
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": 1,
|
|
||||||
"tig": "金币礼包",
|
"tig": "金币礼包",
|
||||||
"giftId": 180001
|
"giftId": 180001,
|
||||||
|
"type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
|
||||||
"tig": "好多金币礼包",
|
"tig": "好多金币礼包",
|
||||||
"giftId": 180002
|
"giftId": 180002,
|
||||||
|
"type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
|
||||||
"tig": "限购矿石礼包",
|
"tig": "限购矿石礼包",
|
||||||
"giftId": 190001
|
"giftId": 190001,
|
||||||
|
"type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
|
||||||
"tig": "每日矿石礼包",
|
"tig": "每日矿石礼包",
|
||||||
"giftId": 200001
|
"giftId": 200001,
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tig": "锻造礼包",
|
||||||
|
"giftId": 210001,
|
||||||
|
"type": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user