| | |
| | | using System.Collections.Generic; |
| | | using System; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public struct Dungeon |
| | | { |
| | | public int mapId; |
| | | public int lineId; |
| | | |
| | | public Dungeon(int _mapId, int _lineId) |
| | | { |
| | | this.mapId = _mapId; |
| | | this.lineId = _lineId; |
| | | } |
| | | |
| | | public static bool operator ==(Dungeon _lhs, Dungeon _rhs) |
| | | { |
| | | return _lhs.mapId == _rhs.mapId && _lhs.lineId == _rhs.lineId; |
| | | } |
| | | |
| | | public static bool operator !=(Dungeon _lhs, Dungeon _rhs) |
| | | { |
| | | return _lhs.mapId != _rhs.mapId || _lhs.lineId != _rhs.lineId; |
| | | } |
| | | |
| | | } |
| | | |
| | | public struct DungeonResult |
| | | { |
| | | public int conWinCnt; //胜利的场数 |
| | | public int extraExp; //额外的经验加成 |
| | | public int extraExpPoint;//额外的经验点数 |
| | | public int score; //获得积分 |
| | | public int extrScore; //额外获得积分 |
| | | |
| | | public int isSweep; |
| | | public int dataMapID; |
| | | public int lineID; |
| | | public int upPer; |
| | | public int costTime; //毫秒 |
| | | public int isPass; |
| | | public int rank; |
| | | public int grade; |
| | | public int scoreExp; |
| | | public int scoreExpPoint; |
| | | public int npcTotal; |
| | | public int expPoint; |
| | | public int exp; |
| | | public DungeonGotMoney[] money; |
| | | public int runeEssence; |
| | | public int runeMagicEssence; |
| | | public ServerItem[] itemInfo; |
| | | public ServerItem[] succItemInfo; |
| | | public int sp; |
| | | public int startRewardLineID; |
| | | public int enterLV; |
| | | public int leaderID; |
| | | |
| | | public long totalExp |
| | | { |
| | | get |
| | | { |
| | | return exp + (long)expPoint * Constants.ExpPointValue; |
| | | } |
| | | } |
| | | |
| | | public long extraTotalExp |
| | | { |
| | | get { return extraExp + (long)extraExpPoint * Constants.ExpPointValue; } |
| | | } |
| | | |
| | | public long totalScoreExp |
| | | { |
| | | get { return scoreExp + (long)scoreExpPoint * Constants.ExpPointValue; } |
| | | } |
| | | } |
| | | |
| | | public struct DungeonMissionData |
| | | { |
| | | public int lineID; |
| | | public int missionID; |
| | | public int step; |
| | | public int wheel; |
| | | public int expPoint; |
| | | public int exp; |
| | | public int grade; |
| | | public int npcTotal; |
| | | public int hasCollect; |
| | | public int passAllCnt; |
| | | public DungeonNPCInfo[] npc; |
| | | public DungeonGotMoney[] money; |
| | | public int score; |
| | | public int remainHPPer; |
| | | public int hpReduceSpeed; |
| | | public int talkOver; |
| | | public int winCnt; |
| | | public int KillBOSS; |
| | | public DungeonHurt[] hurtInfo; |
| | | public string topName; |
| | | public int topScore; |
| | | public int isFullExp; |
| | | public int leaderID; |
| | | |
| | | public long totalExp |
| | | { |
| | | get |
| | | { |
| | | return exp + (long)expPoint * Constants.ExpPointValue; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public struct DungeonNPCInfo |
| | | { |
| | | public int NPCID; |
| | | public int killCnt; |
| | | public int HPPer; |
| | | } |
| | | |
| | | public struct DungeonGotMoney |
| | | { |
| | | public int moneyType; |
| | | public int moneyValue; |
| | | } |
| | | |
| | | public struct DungeonHurt |
| | | { |
| | | public string playerName; |
| | | public int hurt; |
| | | public int rank; |
| | | public int hurtEx; |
| | | public long totalHurt |
| | | { |
| | | get |
| | | { |
| | | return hurt + hurtEx * Constants.ExpPointValue; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public struct ServerItem |
| | | { |
| | | public int ItemID; |
| | | public int Count; |
| | | public int IsBind; |
| | | public int IsSuite; |
| | | public string UserData; |
| | | } |
| | | |
| | | public class DungeonRecord |
| | | { |
| | | public int id { get; private set; } //副本id |
| | | public int enterTimes { get; private set; } //当日进入次数 |
| | | public int buyTimes { get; private set; } //当日已购买次数 |
| | | public int extraTimes { get; private set; } //使用物品增加的额外次数 |
| | | public int recoverTimes { get; private set; } //找回次数 |
| | | public Dictionary<int, int> lineGrades; //副本线路对应星级值列表 |
| | | |
| | | public DungeonRecord(HA320_tagMCPlayerFBInfoData.tagMCFBInfo _serverInfo) |
| | | { |
| | | this.id = (int)_serverInfo.FBID; |
| | | this.enterTimes = (int)_serverInfo.EnterCnt; |
| | | this.recoverTimes = (int)_serverInfo.RecoverCnt; |
| | | this.extraTimes = (int)_serverInfo.ItemAddCnt; |
| | | this.lineGrades = new Dictionary<int, int>(); |
| | | for (int i = 0; i < _serverInfo.PassGrade.Length; i++) |
| | | { |
| | | var tempValue = (int)_serverInfo.PassGrade[i]; |
| | | for (int j = 0; j < 9; j++) |
| | | { |
| | | var a = MathUtility.Power(10, j); |
| | | var b = MathUtility.Power(10, j + 1); |
| | | this.lineGrades[i * 9 + j] = (tempValue % b) / a; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public DungeonRecord(HA3BD_tagMCBuyEnterInfo.tagMCBuyInfo _serverInfo) |
| | | { |
| | | this.id = (int)_serverInfo.FBID; |
| | | this.buyTimes = _serverInfo.BuyCount; |
| | | } |
| | | |
| | | public void UpdateRecord(HA320_tagMCPlayerFBInfoData.tagMCFBInfo _serverInfo) |
| | | { |
| | | this.enterTimes = (int)_serverInfo.EnterCnt; |
| | | this.recoverTimes = (int)_serverInfo.RecoverCnt; |
| | | this.extraTimes = (int)_serverInfo.ItemAddCnt; |
| | | for (int i = 0; i < _serverInfo.PassGrade.Length; i++) |
| | | { |
| | | var tempValue = (int)_serverInfo.PassGrade[i]; |
| | | for (int j = 0; j < 9; j++) |
| | | { |
| | | var a = MathUtility.Power(10, j); |
| | | var b = MathUtility.Power(10, j + 1); |
| | | this.lineGrades[i * 9 + j] = (tempValue % b) / a; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void UpdateRecord(HA3BD_tagMCBuyEnterInfo.tagMCBuyInfo _serverInfo) |
| | | { |
| | | this.buyTimes = _serverInfo.BuyCount; |
| | | } |
| | | |
| | | } |
| | | |
| | | public class DungeonEnterCD |
| | | { |
| | | public int mapId; |
| | | public uint dungeonSurplusTime; |
| | | public uint enterCd; |
| | | public uint clearCdCost; |
| | | public DateTime overdueTime; |
| | | |
| | | public void SetEnterTime(uint _enterTime) |
| | | { |
| | | dungeonSurplusTime = _enterTime; |
| | | overdueTime = DateTime.Now.AddSeconds(dungeonSurplusTime); |
| | | } |
| | | |
| | | public void SetCost(uint _cost) |
| | | { |
| | | clearCdCost = _cost; |
| | | } |
| | | } |
| | | |
| | | public struct DungeonTarget |
| | | { |
| | | public DungeonTargetType targetType; |
| | | public int targetCondition; |
| | | public int targetValue; |
| | | |
| | | public DungeonTarget(DungeonTargetType _type, int _condition, int _targetValue) |
| | | { |
| | | this.targetType = _type; |
| | | this.targetCondition = _condition; |
| | | this.targetValue = _targetValue; |
| | | } |
| | | |
| | | } |
| | | } |
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using LitJson;
|
| | | using UnityEngine;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public struct Dungeon
|
| | | {
|
| | | public int mapId;
|
| | | public int lineId;
|
| | |
|
| | | public Dungeon(int _mapId, int _lineId)
|
| | | {
|
| | | this.mapId = _mapId;
|
| | | this.lineId = _lineId;
|
| | | }
|
| | |
|
| | | public static bool operator ==(Dungeon _lhs, Dungeon _rhs)
|
| | | {
|
| | | return _lhs.mapId == _rhs.mapId && _lhs.lineId == _rhs.lineId;
|
| | | }
|
| | |
|
| | | public static bool operator !=(Dungeon _lhs, Dungeon _rhs)
|
| | | {
|
| | | return _lhs.mapId != _rhs.mapId || _lhs.lineId != _rhs.lineId;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public struct DungeonResult
|
| | | {
|
| | | public int conWinCnt; //胜利的场数
|
| | | public int extraExp; //额外的经验加成
|
| | | public int extraExpPoint;//额外的经验点数
|
| | | public int score; //获得积分
|
| | | public int extrScore; //额外获得积分
|
| | |
|
| | | public int isSweep;
|
| | | public int dataMapID;
|
| | | public int lineID;
|
| | | public int upPer;
|
| | | public int costTime; //毫秒
|
| | | public int isPass;
|
| | | public int rank;
|
| | | public int grade;
|
| | | public int scoreExp;
|
| | | public int scoreExpPoint;
|
| | | public int npcTotal;
|
| | | public int expPoint;
|
| | | public int exp;
|
| | | public DungeonGotMoney[] money;
|
| | | public int runeEssence;
|
| | | public int runeMagicEssence;
|
| | | public ServerItem[] itemInfo;
|
| | | public ServerItem[] succItemInfo;
|
| | | public int sp;
|
| | | public int startRewardLineID;
|
| | | public int enterLV;
|
| | | public int leaderID;
|
| | |
|
| | | public long totalExp
|
| | | {
|
| | | get
|
| | | {
|
| | | return exp + (long)expPoint * Constants.ExpPointValue;
|
| | | }
|
| | | }
|
| | |
|
| | | public long extraTotalExp
|
| | | {
|
| | | get { return extraExp + (long)extraExpPoint * Constants.ExpPointValue; }
|
| | | }
|
| | |
|
| | | public long totalScoreExp
|
| | | {
|
| | | get { return scoreExp + (long)scoreExpPoint * Constants.ExpPointValue; }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct DungeonMissionData
|
| | | {
|
| | | public int lineID;
|
| | | public int missionID;
|
| | | public int step;
|
| | | public int wheel;
|
| | | public int expPoint;
|
| | | public int exp;
|
| | | public int grade;
|
| | | public int npcTotal;
|
| | | public int hasCollect;
|
| | | public int passAllCnt;
|
| | | public DungeonNPCInfo[] npc;
|
| | | public DungeonGotMoney[] money;
|
| | | public int score;
|
| | | public int remainHPPer;
|
| | | public int hpReduceSpeed;
|
| | | public int talkOver;
|
| | | public int winCnt;
|
| | | public int KillBOSS;
|
| | | public DungeonHurt[] hurtInfo;
|
| | | public string topName;
|
| | | public int topScore;
|
| | | public int isFullExp;
|
| | | public int leaderID;
|
| | |
|
| | | public long totalExp
|
| | | {
|
| | | get
|
| | | {
|
| | | return exp + (long)expPoint * Constants.ExpPointValue;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct DungeonNPCInfo
|
| | | {
|
| | | public int NPCID;
|
| | | public int killCnt;
|
| | | public int HPPer;
|
| | | }
|
| | |
|
| | | public struct DungeonGotMoney
|
| | | {
|
| | | public int moneyType;
|
| | | public int moneyValue;
|
| | | }
|
| | |
|
| | | public struct DungeonHurt
|
| | | {
|
| | | public string playerName;
|
| | | public int hurt;
|
| | | public int rank;
|
| | | public int hurtEx;
|
| | | public long totalHurt
|
| | | {
|
| | | get
|
| | | {
|
| | | return hurt + (long)hurtEx * Constants.ExpPointValue;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct ServerItem
|
| | | {
|
| | | public int ItemID;
|
| | | public int Count;
|
| | | public int IsBind;
|
| | | public int IsSuite;
|
| | | public string UserData;
|
| | | }
|
| | |
|
| | | public class DungeonRecord
|
| | | {
|
| | | public int id { get; private set; } //副本id
|
| | | public int enterTimes { get; private set; } //当日进入次数
|
| | | public int buyTimes { get; private set; } //当日已购买次数
|
| | | public int extraTimes { get; private set; } //使用物品增加的额外次数
|
| | | public int recoverTimes { get; private set; } //找回次数
|
| | | public Dictionary<int, int> lineGrades; //副本线路对应星级值列表
|
| | |
|
| | | public DungeonRecord(HA320_tagMCPlayerFBInfoData.tagMCFBInfo _serverInfo)
|
| | | {
|
| | | this.id = (int)_serverInfo.FBID;
|
| | | this.enterTimes = (int)_serverInfo.EnterCnt;
|
| | | this.recoverTimes = (int)_serverInfo.RecoverCnt;
|
| | | this.extraTimes = (int)_serverInfo.ItemAddCnt;
|
| | | this.lineGrades = new Dictionary<int, int>();
|
| | | for (int i = 0; i < _serverInfo.PassGrade.Length; i++)
|
| | | {
|
| | | var tempValue = (int)_serverInfo.PassGrade[i];
|
| | | for (int j = 0; j < 9; j++)
|
| | | {
|
| | | var a = MathUtility.Power(10, j);
|
| | | var b = MathUtility.Power(10, j + 1);
|
| | | this.lineGrades[i * 9 + j] = (tempValue % b) / a;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public DungeonRecord(HA3BD_tagMCBuyEnterInfo.tagMCBuyInfo _serverInfo)
|
| | | {
|
| | | this.id = (int)_serverInfo.FBID;
|
| | | this.buyTimes = _serverInfo.BuyCount;
|
| | | }
|
| | |
|
| | | public void UpdateRecord(HA320_tagMCPlayerFBInfoData.tagMCFBInfo _serverInfo)
|
| | | {
|
| | | this.enterTimes = (int)_serverInfo.EnterCnt;
|
| | | this.recoverTimes = (int)_serverInfo.RecoverCnt;
|
| | | this.extraTimes = (int)_serverInfo.ItemAddCnt;
|
| | | for (int i = 0; i < _serverInfo.PassGrade.Length; i++)
|
| | | {
|
| | | var tempValue = (int)_serverInfo.PassGrade[i];
|
| | | for (int j = 0; j < 9; j++)
|
| | | {
|
| | | var a = MathUtility.Power(10, j);
|
| | | var b = MathUtility.Power(10, j + 1);
|
| | | this.lineGrades[i * 9 + j] = (tempValue % b) / a;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateRecord(HA3BD_tagMCBuyEnterInfo.tagMCBuyInfo _serverInfo)
|
| | | {
|
| | | this.buyTimes = _serverInfo.BuyCount;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public class DungeonEnterCD
|
| | | {
|
| | | public int mapId;
|
| | | public uint dungeonSurplusTime;
|
| | | public uint enterCd;
|
| | | public uint clearCdCost;
|
| | | public DateTime overdueTime;
|
| | |
|
| | | public void SetEnterTime(uint _enterTime)
|
| | | {
|
| | | dungeonSurplusTime = _enterTime;
|
| | | overdueTime = DateTime.Now.AddSeconds(dungeonSurplusTime);
|
| | | }
|
| | |
|
| | | public void SetCost(uint _cost)
|
| | | {
|
| | | clearCdCost = _cost;
|
| | | }
|
| | | }
|
| | |
|
| | | public struct DungeonTarget
|
| | | {
|
| | | public DungeonTargetType targetType;
|
| | | public int targetCondition;
|
| | | public int targetValue;
|
| | |
|
| | | public DungeonTarget(DungeonTargetType _type, int _condition, int _targetValue)
|
| | | {
|
| | | this.targetType = _type;
|
| | | this.targetCondition = _condition;
|
| | | this.targetValue = _targetValue;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|