You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4897 lines
132 KiB
4897 lines
132 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Numerics;
|
|
using UnityEngine;
|
|
using UnityEngine.ResourceManagement.AsyncOperations;
|
|
|
|
// 데이터 구조 모음.
|
|
namespace IVDataFormat
|
|
{
|
|
#region Reference
|
|
// 재화/아이템.
|
|
public static class cGoods
|
|
{
|
|
#region Type
|
|
public const int TNone = 0;
|
|
public const int TCash = 1;
|
|
public const int TAds = 2;
|
|
public const int TAdsRemove = 3;
|
|
public const int TCurrency = 100;
|
|
public const int TExp = 101;
|
|
|
|
public const int TBag = 200;
|
|
public const int TBagWeapon = 201;
|
|
|
|
public const int TBagArmor = 210;
|
|
public const int TBagArmorCape = 211;
|
|
public const int TBagArmorHat = 212;
|
|
public const int TBagArmorShoes = 213;
|
|
|
|
public const int TBagAcce = 220;
|
|
public const int TBagAcceEar = 221;
|
|
public const int TBagAcceNeck = 222;
|
|
public const int TBagAcceRing = 223;
|
|
|
|
public const int TBagTreasure = 231;
|
|
|
|
public const int TPet = 241;
|
|
public const int TPetSpirit = 242;
|
|
|
|
public const int TSkillActive = 251;
|
|
public const int TSkillPassive = 252;
|
|
|
|
public const int TRedTicket = 301;
|
|
public const int TBlueTicket = 302;
|
|
public const int TPurpleTicket = 303;
|
|
public const int TSkyblueTicket = 304;
|
|
public const int TGoldKey = 305;
|
|
public const int TPvpTicket = 350;
|
|
|
|
public const int TCosCloth = 421;
|
|
public const int TCosWeapon = 422;
|
|
public const int TCosClrEye = 411;
|
|
public const int TCosClrHair = 412;
|
|
public const int TCosClrTop = 413;
|
|
|
|
public const int TPass = 500;
|
|
public const int TBox = 600;
|
|
public const int TEventTrade = 700;
|
|
public const int TEventRaise = 701;
|
|
public const int TEventRoulette = 702;
|
|
|
|
public const int TProfileIcon = 800;
|
|
public const int TProfileTitle = 801;
|
|
|
|
public const int TGuardian = 900;
|
|
#endregion Typet
|
|
|
|
#region Currency Code
|
|
public const int CDia = 1;
|
|
public const int CDiaP = 2;
|
|
public const int CDiaF = 3;
|
|
public const int CGold = 11;
|
|
public const int CLvPoint = 12;
|
|
public const int CEnhanceStoneGear = 13;
|
|
public const int CAwakenStoneGear = 14;
|
|
public const int CChangeStone = 15;
|
|
public const int CPudding = 16;
|
|
public const int CEnhanceStoneSkill = 17;
|
|
public const int CAwakenStoneSkill = 18;
|
|
public const int CCondMight = 19;
|
|
|
|
public const int CGachaTokenWeapon = 20;
|
|
public const int CGachaTokenArmor = 21;
|
|
public const int CGachaTokenAcce = 22;
|
|
public const int CGachaTokenTreasure = 23;
|
|
|
|
public const int CFantasyWorldRing = 24;
|
|
public const int CMemoryPiece = 25;
|
|
|
|
public const int CMileage = 99;
|
|
#endregion Currency Code
|
|
|
|
#region Cos Code
|
|
public const int CCosClothSetBase = 1;
|
|
public const int CCosClothBase = 1;
|
|
public const int CCosWeaponSetBase = 1;
|
|
public const int CCosWeaponBase = 1;
|
|
public const int CClrHairBase = 1;
|
|
public const int CClrTopBase = 2;
|
|
public const int CClrEyeBase = 3;
|
|
#endregion Cos Code
|
|
|
|
#region Pass Code
|
|
public const int PassTypeRepeat = 0;
|
|
public const int PassTypeOne = 1;
|
|
public const int PassTypeEvent = 2;
|
|
#endregion Pass Code
|
|
|
|
#region Box Code
|
|
public const int CBoxGeneralStart = 1;
|
|
public const int CBoxPetStart = 100;
|
|
public const int CBoxDiary = 200;
|
|
public const int CBoxEventStart = 400;
|
|
#endregion Box Code
|
|
|
|
#region Rarity & Grade
|
|
public const int RNone = 0;
|
|
public const int RNormal = 1;
|
|
public const int RRare = 2;
|
|
public const int REpic = 3;
|
|
public const int RUnique = 4;
|
|
public const int RHero = 5;
|
|
public const int RLegend = 6;
|
|
public const int RMyth = 7;
|
|
|
|
public const int GMax = 4;
|
|
#endregion Rarity & Grade
|
|
}
|
|
|
|
// 재화 획득 종류.
|
|
public enum eGoodsGetUse
|
|
{
|
|
Test = -1,
|
|
None = 0,
|
|
|
|
Stage = 1,
|
|
Boss = 2,
|
|
Offline = 3,
|
|
|
|
Dungeon = 90
|
|
}
|
|
|
|
public enum eRarity
|
|
{
|
|
None = 0,
|
|
Normal = 1,
|
|
Rare = 2,
|
|
Epic = 3,
|
|
Unique = 4,
|
|
Hero = 5,
|
|
Legend = 6,
|
|
Mystic = 7
|
|
}
|
|
|
|
// 갱신 타입.
|
|
public enum eRefreshType
|
|
{
|
|
None = 0,
|
|
Account = 1,
|
|
Period = 2,
|
|
Daily = 3,
|
|
Weekly = 4,
|
|
Monthly = 5
|
|
//Days30 = 30
|
|
}
|
|
|
|
// 효과 종류.
|
|
public enum eEffectType
|
|
{
|
|
All = -99,
|
|
Test = -1,
|
|
None = 0,
|
|
|
|
Damage = 1,
|
|
|
|
PetBoxDropRate = 2,
|
|
GoldDropRate = 3,
|
|
ExpDropRate = 4,
|
|
ChestDropRate = 5,
|
|
SkillDamage = 6,
|
|
SkillCool = 7,
|
|
HealPerSec = 8,
|
|
PetBuff = 9,
|
|
GearBuff = 10,
|
|
|
|
// 스탯 값 증가.
|
|
AtkBase = 11,
|
|
HpBase = 13,
|
|
|
|
// 기량, 의지.
|
|
AtkAble = 14,
|
|
HpAble = 15,
|
|
AtkWill = 16,
|
|
HpWill = 17,
|
|
|
|
// 스탯 % 증가.
|
|
AtkBuff = 21,
|
|
HpBuff = 23,
|
|
|
|
// 기타 스탯 값 증가.
|
|
Mov = 24,//이속
|
|
Spd = 25,//공속
|
|
Pierce = 26,
|
|
CrtDam = 27,
|
|
|
|
// 적 스탯 감소.
|
|
EnemyAtk = 41,
|
|
EnemyHp = 43,
|
|
|
|
// 보너스 스탯
|
|
DeepCaveDgBonus = 51,
|
|
AtlantisDgBonus = 52,
|
|
ProtectTheMerchantDgBonus = 53,
|
|
DevelopTheJungleDgBonus = 54,
|
|
|
|
CrtRate = 100,
|
|
|
|
PlayerSkillCoolFix = 200, // 플레이어 스킬 쿨타임 고정
|
|
|
|
IncMateSkillDmg = 205, // 동료 스킬 데미지 증가 / subkey = 0: 전체, 1~?: 동료 번호
|
|
DecMateSkillCool = 210, // 동료 스킬 쿨타임 감소
|
|
}
|
|
|
|
// 조건 종류.
|
|
public enum eCondition
|
|
{
|
|
Test = -1,
|
|
None = 0,
|
|
|
|
// 스테이지 클리어.
|
|
StageClear = 1,
|
|
// 플레이어 레벨 달성.
|
|
PlayerLv = 2,
|
|
// 플레이어 각성 단계 완료.
|
|
PlayerAwaken = 3,
|
|
// 플레이 시간.
|
|
PlayTimeM = 4,
|
|
PlayTimeH = 5,
|
|
// 출석 횟수.
|
|
PlayAtttend = 6,
|
|
|
|
// 몬스터 처치 횟수.
|
|
MonsterCnt = 10,
|
|
EliteCnt = 11,
|
|
BossCnt = 12,
|
|
|
|
// 소환 횟수.
|
|
GachaAll = 20,
|
|
GachaWeapon = 21,
|
|
GachaArmor = 22,
|
|
GachaAcc = 23,
|
|
GachaTreasure = 24,
|
|
|
|
// 소환 레벨
|
|
GachaWeaponLv = 25,
|
|
GachaArmorLv = 26,
|
|
GachaAccLv = 27,
|
|
|
|
// 장비 강화 레벨.
|
|
EquipLvAll = 30,
|
|
EquipLvWeapon = 31,
|
|
EquipLvArmor = 32,
|
|
EquipLvAcc = 33,
|
|
EquipLvTreasure = 34,
|
|
|
|
// 스킬
|
|
SkillEquip = 40,
|
|
SkillLvAll = 41,
|
|
SkillLvActive = 42,
|
|
SkillLvPassive = 43,
|
|
// 특정 코스튬 획득.
|
|
CosHave = 50,
|
|
// 코스튬 보유 수.
|
|
CosCnt = 51,
|
|
// 특정 코스튬 세트 획득.
|
|
CosSetHave = 52,
|
|
// 코스튬 세트 보유 수
|
|
CosSetCnt = 53,
|
|
|
|
// 골드 강화
|
|
EnhanceGoldAll = 60,
|
|
EnhanceGoldAtk = 61,
|
|
EnhanceGoldHp = 62,
|
|
EnhanceGoldCrtRate = 64,
|
|
EnhanceGoldAtkCount = 68,
|
|
EnhanceGoldHpCount = 69,
|
|
|
|
// 포인트 강화
|
|
EnhancePointAll = 70,
|
|
EnhancePointAtk = 71,
|
|
EnhancePointHp = 72,
|
|
EnhancePointMov = 74,
|
|
EnhancePointSpd = 75,
|
|
EnhancePointGoldDropRate = 76,
|
|
EnhancePointExpDropRate = 77,
|
|
EnhancePointChestDropRate = 78,
|
|
|
|
// 잠재 능력
|
|
ChangeAbility = 80,
|
|
|
|
// 모든 장비 획득.
|
|
EquipHaveAll = 100,
|
|
EquipHaveD = 101,
|
|
EquipHaveC = 102,
|
|
EquipHaveB = 103,
|
|
EquipHaveA = 104,
|
|
EquipHaveS = 105,
|
|
EquipHaveSS = 106,
|
|
EquipHaveSR = 107,
|
|
|
|
// 모든 무기 획득.
|
|
EquipHaveWeaponAll = 110,
|
|
EquipHaveWeaponD = 111,
|
|
EquipHaveWeaponC = 112,
|
|
EquipHaveWeaponB = 113,
|
|
EquipHaveWeaponA = 114,
|
|
EquipHaveWeaponS = 115,
|
|
EquipHaveWeaponSS = 116,
|
|
EquipHaveWeaponSR = 117,
|
|
|
|
// 모든 방어구 획득.
|
|
EquipHaveArmorAll = 120,
|
|
EquipHaveArmorD = 121,
|
|
EquipHaveArmorC = 122,
|
|
EquipHaveArmorB = 123,
|
|
EquipHaveArmorA = 124,
|
|
EquipHaveArmorS = 125,
|
|
EquipHaveArmorSS = 126,
|
|
EquipHaveArmorSR = 127,
|
|
|
|
// 모든 장신구 획득.
|
|
EquipHaveAccAll = 130,
|
|
EquipHaveAccD = 131,
|
|
EquipHaveAccC = 132,
|
|
EquipHaveAccB = 133,
|
|
EquipHaveAccA = 134,
|
|
EquipHaveAccS = 135,
|
|
EquipHaveAccSS = 136,
|
|
EquipHaveAccSR = 137,
|
|
|
|
// 특정 등급의 무기 획득
|
|
EquipHaveWeaponNOne = 151,
|
|
EquipHaveWeaponROne = 152,
|
|
EquipHaveWeaponEOne = 153,
|
|
EquipHaveWeaponUOne = 154,
|
|
EquipHaveWeaponHOne = 155,
|
|
EquipHaveWeaponLOne = 156,
|
|
EquipHaveWeaponMOne = 157,
|
|
|
|
//특정 등급의 귀걸이 획득
|
|
EquipHaveEarNOne = 161,
|
|
EquipHaveEarROne = 162,
|
|
EquipHaveEarEOne = 163,
|
|
EquipHaveEarUOne = 164,
|
|
EquipHaveEarHOne = 165,
|
|
EquipHaveEarLOne = 166,
|
|
EquipHaveEarMOne = 167,
|
|
|
|
// 던전 도전 횟수.
|
|
DgTryAll = 200,
|
|
DgTryGold = 201,
|
|
DgTryEnhance = 202,
|
|
DgTryAwaken = 203,
|
|
DgTryPet = 204,
|
|
|
|
// 던전 클리어 횟수.
|
|
DgClearAll = 210,
|
|
DgClearGold = 211,
|
|
DgClearEnhance = 212,
|
|
DgClearAwaken = 213,
|
|
DgClearPet = 214,
|
|
|
|
// 던전 스테이지 클리어.
|
|
DgStageGold = 221,
|
|
DgStageEnhance = 222,
|
|
DgStageAwaken = 223,
|
|
DgStagePet = 224,
|
|
|
|
// 장비 합성
|
|
EquipComposeAll = 310,
|
|
EquipComposeWeapon = 311,
|
|
EquipComposeArmor = 312,
|
|
EquipComposeAcc = 313,
|
|
EquipComposeTreasure = 314,
|
|
|
|
// 장비 장착
|
|
EquipWeapon = 321,
|
|
EquipArmorCape = 322,
|
|
EquipArmorHat = 323,
|
|
EquipArmorShoes = 324,
|
|
EquipAccEar = 325,
|
|
EquipAccNeck = 326,
|
|
EquipAccRing = 327,
|
|
|
|
// 장비 강화
|
|
EnhanceGear = 330,
|
|
EnhanceWeapon = 331,
|
|
EnhanceArmor = 332,
|
|
EnhanceArmorCape = 333,
|
|
EnhanceArmorHat = 334,
|
|
EnhanceArmorShoes = 335,
|
|
EnhanceAcc = 336,
|
|
EnhanceAccEar = 337,
|
|
EnhanceAccNeck = 338,
|
|
EnhanceAccRing = 339,
|
|
EnhanceTreasure = 340,
|
|
|
|
// 펫 ~400번대
|
|
PetHave = 401,
|
|
PetEnhance = 411,
|
|
PetspiritCompose = 430,
|
|
|
|
// 퀘스트 달성횟수
|
|
DailyQuestClear = 500,
|
|
DailyQuestClearTotal = 501,
|
|
// 이벤트 퀘스트 일차별 달성
|
|
EventQuestDayClear = 502,
|
|
MissionClearLv = 503,
|
|
|
|
// 아이콘, 칭호 ~600번대
|
|
// 특정 아이콘, 칭호 장착
|
|
EquipIcon = 601,
|
|
EquipTitle = 602,
|
|
|
|
// 결투장.
|
|
PvpTry = 990,
|
|
PvpClear = 991,
|
|
|
|
// 보석 사용.
|
|
UseDia = 1001,
|
|
// 색상석 합성.
|
|
//ComposeIris = 1002,
|
|
// 자동 전투 활성화
|
|
AutoBattle = 1003,
|
|
// 닉네임 변경
|
|
RenameCnt = 1004,
|
|
|
|
// 광고 버프 활성화
|
|
ActivateADbuff = 1010,
|
|
ActivateADbuffAtk = 1011,
|
|
ActivateADbuffExp = 1012,
|
|
ActivateADbuffGold = 1013,
|
|
ADbuffAtkLv = 1021,
|
|
ADbuffExpLv = 1022,
|
|
ADbuffGoldLv = 1023,
|
|
|
|
// 기타
|
|
Etc = 2000
|
|
}
|
|
|
|
// 컨텐츠 종류
|
|
public enum eContent
|
|
{
|
|
Battle = 1,
|
|
Equipment = 2,
|
|
Summon = 3,
|
|
Dungeon = 4,
|
|
Etc = 5
|
|
}
|
|
|
|
public enum eContentType
|
|
{
|
|
None = 0,
|
|
DailyQuest = 1,
|
|
RepeatQuest = 2,
|
|
EventQuest = 3,
|
|
Icon = 10,
|
|
Title = 11,
|
|
QuestMission = 20
|
|
}
|
|
|
|
public enum eMonsterType
|
|
{
|
|
None = 0,
|
|
SmalllMonster = 1,
|
|
MediumMonster = 2,
|
|
BigMonster = 3,
|
|
SmallObject = 11,
|
|
MediumObject = 12,
|
|
BigObject = 13
|
|
}
|
|
|
|
[System.Flags] // 내부 사용 희귀도 플래그.
|
|
public enum fRangeRarity
|
|
{
|
|
None = 0,
|
|
Normal = 1,
|
|
Rare = 2,
|
|
Epic = 4,
|
|
Unique = 8,
|
|
Hero = 16,
|
|
Legend = 32,
|
|
Myth = 64,
|
|
All = Normal | Rare | Epic | Unique | Hero | Legend | Myth
|
|
}
|
|
|
|
[System.Flags] // 오픈 요일.
|
|
public enum fDays
|
|
{
|
|
None = 0x0, // 0
|
|
Sunday = 0x1, // 1
|
|
Monday = 0x2, // 2
|
|
Tuesday = 0x4, // 4
|
|
Wednesday = 0x8, // 8
|
|
Thursday = 0x10, // 16
|
|
Friday = 0x20, // 32
|
|
Saturday = 0x40, // 64
|
|
All = Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday
|
|
}
|
|
#endregion Reference
|
|
|
|
|
|
#region Base
|
|
[Serializable] // 게임 버전/점검 데이터.
|
|
public class dGame
|
|
{
|
|
public int aosMin;
|
|
public int aosMax;
|
|
public int iosMin;
|
|
public int iosMax;
|
|
public int oneMin;
|
|
public int oneMax;
|
|
|
|
public bool iosCouponEnable;
|
|
public int aosCouponMax;
|
|
public int iosCouponMax;
|
|
public int oneCouponMax;
|
|
|
|
public bool isUpdate;
|
|
|
|
[SerializeField] string _updateStartAt;
|
|
public DateTime updateStartAt
|
|
{
|
|
get
|
|
{
|
|
if(_updateStartAt is null)
|
|
return DateTime.MinValue;
|
|
|
|
return DateTime.ParseExact(_updateStartAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
}
|
|
}
|
|
|
|
[SerializeField] string _updateEndAt;
|
|
public DateTime updateEndAt
|
|
{
|
|
get
|
|
{
|
|
if(_updateEndAt is null)
|
|
return DateTime.MaxValue;
|
|
|
|
return DateTime.ParseExact(_updateEndAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
}
|
|
}
|
|
|
|
public string updateMsg;
|
|
|
|
[SerializeField] string _serverTime;
|
|
public DateTime serverTime
|
|
{
|
|
get
|
|
{
|
|
if(_serverTime is null)
|
|
return DateTime.MinValue;
|
|
|
|
return DateTime.ParseExact(_serverTime, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
}
|
|
}
|
|
|
|
public bool isNotice;
|
|
|
|
public int logLevel;
|
|
}
|
|
|
|
[Serializable] // 상수.
|
|
public class dConst
|
|
{
|
|
#region Const Base
|
|
public static readonly BigInteger RateMaxBi = new BigInteger(1000000L);
|
|
public const int RateMax = 1000000;
|
|
public const int RateRound0 = RateMax / 200;
|
|
public const int RateRound1 = RateMax / 20;
|
|
public const float RateMaxFloat = 1000000f; // 0~1f
|
|
public const int RateDivideInt = 10000; // 1~100
|
|
public const int RateDivideInt1 = 1000; // 0.1~100
|
|
public const int RateDivideInt2 = 100; // 0.01~100
|
|
public const int RateDivideInt3 = 10; // 0.001~100
|
|
public const int RateDivideLong = 100000;
|
|
public const int RangeDivide = 10000;
|
|
#endregion Const Base
|
|
|
|
#region Base
|
|
public int stageMax = 50;
|
|
public int stageTimeout = 50;
|
|
|
|
public int gradeMax = 4;
|
|
public int rarityMax = 7;
|
|
|
|
public int offlineTimeMax = 86400;
|
|
public int offlineTimeStage = 30;
|
|
public int offlineReward = 500000;
|
|
#endregion Base
|
|
|
|
#region Player Lv & Exp
|
|
public int playerMaxLv = 500;
|
|
public int playerLvExp = 25;
|
|
public int playerLvExpInc = 1005000;
|
|
#endregion
|
|
|
|
#region Const Stage & Monster
|
|
public int monEliteAtk = 1200000;
|
|
public int monEliteHp = 1200000;
|
|
public int monBossAtk = 1400000;
|
|
public int monBossHp = 1400000;
|
|
|
|
public int normalBoxRate = 10000;
|
|
public int gearBoxRate = 50000;
|
|
public int petBoxRate = 50000;
|
|
public int irisRte = 50000;
|
|
public int eventItemRate = 50000;
|
|
#endregion Const Stage & Monster
|
|
|
|
#region Enhance
|
|
public int awakenChangeStonePrice = 10;
|
|
public int awakenChangeStoneInc = 10;
|
|
|
|
public int lvPointResetPrice = 1000;
|
|
#endregion Enhance
|
|
|
|
#region Bag
|
|
public int gearAccOpenStage = 1525;
|
|
public int gearTreasureOpenStage = 1025;
|
|
public int gearConsumeOpenStage = 0;//DB 에 없음
|
|
|
|
public int petOpenStage = 9950;//DB 에 없음
|
|
|
|
public int gearComposePrice = 5;
|
|
public int gearExtraChangeStonePrice = 500;
|
|
public int gearTreasureSellPrice = 1;
|
|
public int irisUsePrice = 5;
|
|
#endregion Bag
|
|
|
|
#region Const Pet
|
|
public int petSpiritComposePrice = 5;
|
|
public int petExtraChangeStonePrice = 2;
|
|
#endregion Const Pet
|
|
|
|
#region Gacha
|
|
public int firstButtonEquip = 1;
|
|
public int secondButtonEquip = 30;
|
|
public int thirdButtonEquip = 100;
|
|
public int fourthButtonEquip = 300;
|
|
|
|
public int firstButtonTreasure = 1;
|
|
public int secondButtonTreasure = 10;
|
|
public int thirdButtonTreasure = 30;
|
|
|
|
public int gachaWeaponPrice = 10;
|
|
public int gachaArmorPrice = 10;
|
|
public int gachaAccPrice = 10;
|
|
public int gachaTreasurePrice = 30;
|
|
#endregion Gacha
|
|
|
|
#region Dungeon
|
|
public int dungeonGoldOpenStage = 125;
|
|
public int dungeonEnhanceStoneOpenStage = 225;
|
|
public int dungeonPetOpenStage = 325;
|
|
public int dungeonAwakenStoneOpenStage = 525;
|
|
public int dungeonAwakenOpenStage = 250;
|
|
|
|
public int dungeonPetStageMax = 10;
|
|
#endregion
|
|
|
|
#region Costume
|
|
public int colorComposeCount = 10;
|
|
public int colorSlotMax = 6;
|
|
public int colorSlotPrice = 100;
|
|
#endregion Costume
|
|
|
|
#region Etc.
|
|
public int pvpOpenStage = 2050;
|
|
|
|
public int chatOpenStage = 110;
|
|
public int nameChangePrice = 5000;
|
|
public int nameChangeFree = 1;
|
|
public int nameMin = 2;
|
|
public int nameMax = 10;
|
|
#endregion Etc.
|
|
|
|
#region Guardion
|
|
public int guardianExtraChangeStonePrice = 1;
|
|
|
|
public int firstGradeEquipExp = 1;
|
|
public int secondGradeEquipExp = 5;
|
|
public int thirdGradeEquipExp = 25;
|
|
public int fourthGradeEquipExp = 125;
|
|
|
|
public int firstGradeAccExp = 1;
|
|
public int secondGradeAccExp = 5;
|
|
public int thirdGradeAccExp = 25;
|
|
public int fourthGradeAccExp = 125;
|
|
#endregion
|
|
|
|
#region Diary
|
|
public int tripPeiceCnt = 5;
|
|
|
|
public int TripChapterMaxsize = 3;
|
|
public int TripMaxsize = 6;
|
|
public int TripPieceMaxsize = 5;
|
|
|
|
public int LifeChapterMaxsize = 2;
|
|
public int LifeMaxsize = 9;
|
|
public int LifePieceMaxsize = 12;
|
|
#endregion
|
|
}
|
|
|
|
[Serializable]
|
|
public class dBox
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int grade;
|
|
public string path;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nSystemData
|
|
{
|
|
// 상수.
|
|
public dConst constData;
|
|
|
|
// 상자.
|
|
public dBox[] sysBox;
|
|
// 스테이지.
|
|
public dArea[] sysArea;
|
|
// 몬스터, 배경.
|
|
public dMonster[] sysMonster;
|
|
public dBg[] sysBackground;
|
|
|
|
// 추가효과.
|
|
public dExtraRarity[] sysExtraRarity;
|
|
public dExtraAbility[] sysExtra;
|
|
|
|
// 강화.
|
|
public dCharStat[] sysCharEnhanceGold;
|
|
public dCharStat[] sysCharEnhancePoint;
|
|
|
|
// 장비. 무기, 투구, 갑옷, 신발, 목걸이, 반지, 귀걸이.
|
|
public dGear[] sysGearWeapon;
|
|
public dGear[] sysGearHat;
|
|
public dGear[] sysGearCape;
|
|
public dGear[] sysGearShoes;
|
|
public dGear[] sysGearNecklace;
|
|
public dGear[] sysGearRing;
|
|
public dGear[] sysGearEarring;
|
|
public dAwaken[] sysGearAwaken;
|
|
public dTotalLvValue[] sysGearEnhance;
|
|
|
|
// 보물.
|
|
public dTreasure[] sysGearTreasure;
|
|
public nProps sysGearTreasureEnhance;
|
|
|
|
// 스킬.
|
|
public dSkillPassive[] sysCharSkillPassive;
|
|
public dSkillActive[] sysCharSkillActive;
|
|
public dAwaken[] sysCharSkillAwaken;
|
|
public dTotalLvValue[] sysCharSkillEnhance;
|
|
|
|
public dDungeonInfo sysDgGold;
|
|
public dDungeonInfo sysDgReinStone;
|
|
public dDungeonInfo sysDgPet;
|
|
public dDungeonInfo sysDgAwakenStone;
|
|
public dDungeonInfo sysDgAwaken;
|
|
public dDungeonInfo sysDgRelic;
|
|
public dAwakenReward[] sysAwaken;
|
|
public dDungeonInfo[] sysDgGuardian;
|
|
public dSysGuardian[] sysGuardian;
|
|
public dSysRelic[] sysRelic;
|
|
public dSysRelicEnhanceProp sysRelicEnhance;
|
|
|
|
// 펫.
|
|
public dPet[] sysPet;
|
|
public dAwaken[] sysPetAwaken;
|
|
public dTotalLvValue[] sysPetEnhance;
|
|
|
|
// 코스튬.
|
|
public dColor[] sysColor;
|
|
public dCostume[] sysCostumeOutfit;
|
|
public dCostume[] sysCostumeWeapon;
|
|
public dCostumeSet[] sysCostumeOutfitSet;
|
|
public dCostumeSet[] sysCostumeWeaponSet;
|
|
|
|
// 가챠.
|
|
public dGachaLevel[] sysGachaWeaponCount;
|
|
public int[] sysGachaWeaponGrade;
|
|
public dGachaLevel[] sysGachaArmorCount;
|
|
public int[] sysGachaArmorGrade;
|
|
public dGachaLevel[] sysGachaAccCount;
|
|
public int[] sysGachaAccGrade;
|
|
|
|
// 상점.
|
|
public dShop[] sysShop;
|
|
// 패스.
|
|
public dPass[] sysPass;
|
|
// 버프.
|
|
public dAdBuff[] sysBuff;
|
|
// 출석.
|
|
public dAttend[] sysAttend;
|
|
// 결투장.
|
|
public dPvp sysPvp;
|
|
|
|
// 아이콘,칭호
|
|
public dTitle[] sysProfileTitle;
|
|
public dIcon[] sysProfileIcon;
|
|
|
|
// 퀘스트
|
|
public dQuest[] sysQuestDaily;
|
|
public dQuest[] sysQuestRepeat;
|
|
public dQuest[] sysQuestEvent;
|
|
public dMission[] sysQuestMission;
|
|
|
|
// 긴급공지, 채팅공지.
|
|
public dNotice[] sysNotice;
|
|
public dChatNotice[] sysNoticeChat;
|
|
|
|
// 이벤트.
|
|
public dEvent[] sysEvent;
|
|
public dEventInfo sysEventTrade;
|
|
public dEventInfo sysEventRaise;
|
|
public dEventInfo sysEventRoulette;
|
|
public dRewardEvent sysEventReward;
|
|
|
|
//### 이하 수정/추가 필요.
|
|
}
|
|
#endregion Base
|
|
|
|
#region Play Base
|
|
[Serializable] // 재화 플레이 데이터.
|
|
public class cGoodsData : ISerializationCallbackReceiver
|
|
{
|
|
public const string PrefsKey = "PlayGoods";
|
|
|
|
public int diaPaid;
|
|
public int diaFree;
|
|
public int Dia => diaPaid + diaFree;
|
|
|
|
[SerializeField] private string _gold;
|
|
public BigInteger gold;
|
|
|
|
[SerializeField] private string _goldUsed;
|
|
public BigInteger goldUsed;
|
|
|
|
public int point;
|
|
public int gearReinStone;
|
|
public int skillReinStone;
|
|
public int gearAwakenStone;
|
|
public int skillAwakenStone;
|
|
public int changeStone;
|
|
public int pudding;
|
|
public int condMight;
|
|
public int fantasyWorldRing = 20;
|
|
public int memoryPiece;
|
|
|
|
// 가챠 티켓.
|
|
public int gachaWeapon;
|
|
public int gachaArmor;
|
|
public int gachaAcc;
|
|
public int gachaTreasure;
|
|
|
|
public int mileage;
|
|
|
|
[SerializeField] private string _lastTime;
|
|
public DateTime lastTime;
|
|
|
|
// ES3 저장.
|
|
public void Save(int server)
|
|
{
|
|
lastTime = TimeUtils.Now();
|
|
|
|
OnBeforeSerialize();
|
|
string prefskey = FormatString.CombineAllString(PrefsKey, server.ToString());
|
|
ES3.Save(prefskey, this, Global.ES3_PlayGoods);
|
|
}
|
|
|
|
// ES3 로드.
|
|
public static cGoodsData Load(int server)
|
|
{
|
|
string prefskey = FormatString.CombineAllString(PrefsKey, server.ToString());
|
|
if (!ES3.KeyExists(prefskey, Global.ES3_PlayGoods))
|
|
ES3.Save(prefskey, new cGoodsData(), Global.ES3_PlayGoods);
|
|
cGoodsData data = ES3.Load<cGoodsData>(prefskey, Global.ES3_PlayGoods);
|
|
data.OnAfterDeserialize();
|
|
return data;
|
|
}
|
|
|
|
// ES3 Save 직전 호출, Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (gold != null)
|
|
_gold = gold.ToString();
|
|
if (goldUsed != null)
|
|
_goldUsed = goldUsed.ToString();
|
|
|
|
_lastTime = lastTime.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// ES3 Load 직후 호출, Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_gold))
|
|
{
|
|
gold = BigInteger.Parse(_gold);
|
|
}
|
|
_gold = null;
|
|
|
|
if (!string.IsNullOrEmpty(_goldUsed))
|
|
{
|
|
goldUsed = BigInteger.Parse(_goldUsed);
|
|
}
|
|
_goldUsed = null;
|
|
|
|
if (!string.IsNullOrEmpty(_lastTime))
|
|
{
|
|
lastTime = DateTime.ParseExact(_lastTime, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
}
|
|
_lastTime = null;
|
|
}
|
|
}
|
|
|
|
[Serializable] // 마스터 계정 데이터.
|
|
public class cMasterData
|
|
{
|
|
public string masterCode;
|
|
}
|
|
|
|
|
|
[Serializable] // 플레이 데이터.
|
|
public class cPlayData : ISerializationCallbackReceiver
|
|
{
|
|
public const string PrefsKey = "PlayDatas";
|
|
|
|
public int server;
|
|
public string userCode;
|
|
|
|
public string playerName;
|
|
public int playerIcon;
|
|
public int playerTitle;
|
|
public int playerLv;
|
|
|
|
public BigInteger playerExp;
|
|
[SerializeField] protected string _playerExp;
|
|
|
|
public int clearStage;
|
|
public int curStage;
|
|
|
|
// 스킬 프리셋.
|
|
public int usePreset;
|
|
// 2차원 배열은 Serialize가 불가능하므로 1차원 배열로 나눠서 처리.
|
|
public int[][] skillPresets;
|
|
[SerializeField] protected int[] skillPreset1;
|
|
[SerializeField] protected int[] skillPreset2;
|
|
[SerializeField] protected int[] skillPreset3;
|
|
[SerializeField] protected int[] skillPreset4;
|
|
[SerializeField] protected int[] skillPreset5;
|
|
[SerializeField] protected int[] skillPreset6;
|
|
|
|
// 펫 프리셋.
|
|
public int usePetPreset;
|
|
public int[][] petPresets;
|
|
[SerializeField] protected int[] petPreset1;
|
|
[SerializeField] protected int[] petPreset2;
|
|
[SerializeField] protected int[] petPreset3;
|
|
[SerializeField] protected int[] petPreset4;
|
|
[SerializeField] protected int[] petPreset5;
|
|
[SerializeField] protected int[] petPreset6;
|
|
|
|
public int weapon;
|
|
public int cape;
|
|
public int hat;
|
|
public int shoes;
|
|
public int earring;
|
|
public int necklace;
|
|
public int ring;
|
|
|
|
public int gachaWeaponLv;
|
|
public int gachaWeaponExp;
|
|
public int gachaWeaponReward;
|
|
public int gachaArmorLv;
|
|
public int gachaArmorExp;
|
|
public int gachaArmorReward;
|
|
public int gachaAccLv;
|
|
public int gachaAccExp;
|
|
public int gachaAccReward;
|
|
|
|
public bool adRemove;
|
|
public bool forceOverwrite;
|
|
public DateTime lastTime;
|
|
[SerializeField] protected string _lastTime;
|
|
public bool stageRepeat;
|
|
|
|
public cPlayData()
|
|
{
|
|
userCode = FormatString.TextHex(UnityEngine.Random.Range(0, 10000000));
|
|
playerName = "Temp" + FormatString.TextHex(UnityEngine.Random.Range(0, 65536));
|
|
|
|
playerIcon = 1;
|
|
playerTitle = 57;
|
|
playerLv = 1;
|
|
|
|
skillPresets = new int[6][]
|
|
{
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 }
|
|
};
|
|
|
|
petPresets = new int[6][]
|
|
{
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 },
|
|
new int[4] { -1 , -1 , -1 , -1 }
|
|
};
|
|
|
|
weapon = -1;
|
|
cape = -1;
|
|
hat = -1;
|
|
shoes = -1;
|
|
earring = -1;
|
|
necklace = -1;
|
|
ring = -1;
|
|
|
|
gachaWeaponLv = 1;
|
|
gachaArmorLv = 1;
|
|
gachaAccLv = 1;
|
|
stageRepeat = false;
|
|
}
|
|
|
|
// ES3 저장.
|
|
public void Save()
|
|
{
|
|
this.lastTime = TimeUtils.Now();
|
|
this.lastTime.AddSeconds(2f);
|
|
|
|
OnBeforeSerialize();
|
|
ES3.Save(FormatString.CombineAllString(PrefsKey, this.server.ToString()), this, Global.ES3_PlayDatas);
|
|
}
|
|
|
|
// ES3 저장.
|
|
public void SaveDate(DateTime savetime)
|
|
{
|
|
this.lastTime = savetime;
|
|
OnBeforeSerialize();
|
|
ES3.Save(FormatString.CombineAllString(PrefsKey, this.server.ToString()), this, Global.ES3_PlayDatas);
|
|
}
|
|
|
|
// ES3 로드.
|
|
public static cPlayData Load(int iserver)
|
|
{
|
|
string prefskey = FormatString.CombineAllString(PrefsKey, iserver.ToString());
|
|
if (!ES3.KeyExists(prefskey, Global.ES3_PlayDatas))
|
|
ES3.Save(prefskey, new cPlayData(), Global.ES3_PlayDatas);
|
|
cPlayData data = ES3.Load<cPlayData>(prefskey, Global.ES3_PlayDatas);
|
|
|
|
data.OnAfterDeserialize();
|
|
return data;
|
|
}
|
|
|
|
// ES3 Save 직전 호출, Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (playerExp != null)
|
|
_playerExp = playerExp.ToString();
|
|
|
|
if (skillPresets != null)
|
|
{
|
|
skillPreset1 = skillPresets[0];
|
|
skillPreset2 = skillPresets[1];
|
|
skillPreset3 = skillPresets[2];
|
|
skillPreset4 = skillPresets[3];
|
|
skillPreset5 = skillPresets[4];
|
|
skillPreset6 = skillPresets[5];
|
|
}
|
|
|
|
if (petPresets != null)
|
|
{
|
|
petPreset1 = petPresets[0];
|
|
petPreset2 = petPresets[1];
|
|
petPreset3 = petPresets[2];
|
|
petPreset4 = petPresets[3];
|
|
petPreset5 = petPresets[4];
|
|
petPreset6 = petPresets[5];
|
|
}
|
|
|
|
_lastTime = lastTime.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// ES3 Load 직후 호출, Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_playerExp))
|
|
playerExp = BigInteger.Parse(_playerExp);
|
|
else
|
|
playerExp = 0L;
|
|
_playerExp = null;
|
|
|
|
if (skillPreset1 != null)
|
|
{
|
|
skillPresets = new int[6][];
|
|
skillPresets[0] = skillPreset1;
|
|
skillPresets[1] = skillPreset2;
|
|
skillPresets[2] = skillPreset3;
|
|
skillPresets[3] = skillPreset4;
|
|
skillPresets[4] = skillPreset5;
|
|
skillPresets[5] = skillPreset6;
|
|
skillPreset1 = null;
|
|
skillPreset2 = null;
|
|
skillPreset3 = null;
|
|
skillPreset4 = null;
|
|
skillPreset5 = null;
|
|
skillPreset6 = null;
|
|
}
|
|
|
|
if (petPreset1 != null)
|
|
{
|
|
petPresets = new int[6][];
|
|
petPresets[0] = petPreset1;
|
|
petPresets[1] = petPreset2;
|
|
petPresets[2] = petPreset3;
|
|
petPresets[3] = petPreset4;
|
|
petPresets[4] = petPreset5;
|
|
petPresets[5] = petPreset6;
|
|
petPreset1 = null;
|
|
petPreset2 = null;
|
|
petPreset3 = null;
|
|
petPreset4 = null;
|
|
petPreset5 = null;
|
|
petPreset6 = null;
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(_lastTime))
|
|
lastTime = DateTime.ParseExact(_lastTime, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_lastTime = null;
|
|
|
|
if (curStage <= 0)
|
|
curStage = 101;
|
|
}
|
|
}
|
|
|
|
[Serializable] // 플레이 데이터.
|
|
public class cPlayCostume : ISerializationCallbackReceiver
|
|
{
|
|
// 적용중인 코스튬.
|
|
public int outfitId;
|
|
public int weaponId;
|
|
public int hairColor;
|
|
public int topColor;
|
|
public int eyeColor;
|
|
public int[][] paletteSlots;
|
|
public int[] paletteOpens;
|
|
|
|
[SerializeField] private int[] hairPalette;
|
|
[SerializeField] private int hairSlot;
|
|
[SerializeField] private int[] topPalette;
|
|
[SerializeField] private int topSlot;
|
|
[SerializeField] private int[] eyePalette;
|
|
[SerializeField] private int eyeSlot;
|
|
|
|
public cPlayCostume()
|
|
{
|
|
this.outfitId = cGoods.CCosClothBase;
|
|
this.weaponId = cGoods.CCosWeaponBase;
|
|
this.hairColor = cGoods.CClrHairBase;
|
|
this.topColor = cGoods.CClrTopBase;
|
|
this.eyeColor = cGoods.CClrEyeBase;
|
|
this.paletteSlots = new int[3][]
|
|
{
|
|
new int[6] { 1, 0, 0, 0, 0, 0 },
|
|
new int[6] { 2, 0, 0, 0, 0, 0 },
|
|
new int[6] { 3, 0, 0, 0, 0, 0 }
|
|
};
|
|
this.paletteOpens = new int[3] { 3, 3, 3 };
|
|
}
|
|
|
|
// ES3 Save 직전 호출, Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
hairPalette = paletteSlots[0];
|
|
topPalette = paletteSlots[1];
|
|
eyePalette = paletteSlots[2];
|
|
hairSlot = paletteOpens[0];
|
|
topSlot = paletteOpens[1];
|
|
eyeSlot = paletteOpens[2];
|
|
}
|
|
|
|
// ES3 Load 직후 호출, Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (hairPalette != null)
|
|
{
|
|
paletteSlots = new int[3][];
|
|
paletteSlots[0] = hairPalette;
|
|
paletteSlots[1] = topPalette;
|
|
paletteSlots[2] = eyePalette;
|
|
hairPalette = null;
|
|
topPalette = null;
|
|
eyePalette = null;
|
|
|
|
paletteOpens = new int[3];
|
|
paletteOpens[0] = hairSlot;
|
|
paletteOpens[1] = topSlot;
|
|
paletteOpens[2] = eyeSlot;
|
|
}
|
|
}
|
|
}
|
|
|
|
[Serializable] // 상자 플레이 데이터.
|
|
public class cBoxData : ISerializationCallbackReceiver
|
|
{
|
|
public const string PrefsKey = "PlayBox";
|
|
|
|
[SerializeField] private nIdCnt[] boxCounts;
|
|
public Dictionary<int, int> dicBoxCount = new Dictionary<int, int>(64);
|
|
|
|
public cBoxData() { }
|
|
|
|
public cBoxData(nIdCnt[] datas)
|
|
{
|
|
boxCounts = datas;
|
|
OnAfterDeserialize();
|
|
}
|
|
|
|
public nIdCnt[] GetPlayData()
|
|
{
|
|
var datas = new List<nIdCnt>();
|
|
foreach (var item in dicBoxCount)
|
|
{
|
|
datas.OrderInsert(new nIdCnt(item.Key, item.Value), (a, b) => a.sid.CompareTo(b.sid));
|
|
}
|
|
return datas.ToArray();
|
|
}
|
|
|
|
// ES3 저장.
|
|
public void Save(int iserver)
|
|
{
|
|
boxCounts = GetPlayData();
|
|
|
|
string prefskey = FormatString.CombineAllString(PrefsKey, iserver.ToString());
|
|
ES3.Save(prefskey, this, Global.ES3_PlayBox);
|
|
|
|
boxCounts = null;
|
|
}
|
|
|
|
// ES3 로드.
|
|
public static cBoxData Load(int iserver)
|
|
{
|
|
string prefskey = FormatString.CombineAllString(PrefsKey, iserver.ToString());
|
|
|
|
if (!ES3.KeyExists(prefskey, Global.ES3_PlayBox))
|
|
ES3.Save(prefskey, new cBoxData(), Global.ES3_PlayBox);
|
|
|
|
cBoxData data = ES3.Load<cBoxData>(prefskey, Global.ES3_PlayBox);
|
|
data.OnAfterDeserialize();
|
|
|
|
return data;
|
|
}
|
|
|
|
// ES3 Save 직전 호출, Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
}
|
|
|
|
// ES3 Load 직후 호출, Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (boxCounts is null) return;
|
|
|
|
for (int i = 0; i < boxCounts.Length; i++)
|
|
{
|
|
int key = boxCounts[i].sid;
|
|
if (dicBoxCount.ContainsKey(key))
|
|
dicBoxCount[key] = boxCounts[i].cnt;
|
|
else
|
|
dicBoxCount.Add(key, boxCounts[i].cnt);
|
|
}
|
|
|
|
boxCounts = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nUserInfo : ISerializationCallbackReceiver
|
|
{
|
|
public float battlePower;
|
|
[SerializeField]
|
|
protected string atk;
|
|
public BigInteger charAtk;
|
|
[SerializeField]
|
|
protected string hp;
|
|
public BigInteger charHp;
|
|
//public float pierce;
|
|
public int critRate;
|
|
public float atkSpeed;
|
|
public float movSpeed;
|
|
public float goldRate;
|
|
public float expRate;
|
|
public float boxRate;
|
|
public float skillDmg;
|
|
public float skillReuseDec;
|
|
public float healPerSec;
|
|
|
|
|
|
public static nUserInfo GetMyInfo()
|
|
{
|
|
nUserInfo data = new nUserInfo();
|
|
|
|
data.charAtk = BuffMgr.Instance.GetCharAtkExcAd();
|
|
data.charHp = BuffMgr.Instance.GetCharHp();
|
|
|
|
//data.pierce = BuffMgr.Instance.GetCharPierce();
|
|
data.critRate = BuffMgr.Instance.GetCharCrtRate();
|
|
data.atkSpeed = BuffMgr.Instance.GetCharSpd();
|
|
data.movSpeed = BuffMgr.Instance.GetCharMov();
|
|
|
|
data.skillDmg = BuffMgr.Instance.GetSkillDamage();
|
|
data.skillReuseDec = BuffMgr.Instance.GetSkillCooldownReduce();
|
|
data.healPerSec = BuffMgr.Instance.GetHpHealPerSec();
|
|
|
|
data.goldRate = BuffMgr.Instance.GetGoldDropRate();
|
|
data.expRate = BuffMgr.Instance.GetExpDropRate();
|
|
data.boxRate = BuffMgr.Instance.GetChestDropRate();
|
|
|
|
return data;
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (atk != null)
|
|
atk = charAtk.ToString();
|
|
if (hp != null)
|
|
hp = charHp.ToString();
|
|
}
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(atk))
|
|
charAtk = BigInteger.Parse(atk);
|
|
else
|
|
charAtk = 0L;
|
|
atk = null;
|
|
if (!string.IsNullOrEmpty(hp))
|
|
charHp = BigInteger.Parse(hp);
|
|
else
|
|
charHp = 0L;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nMasterData
|
|
{
|
|
public cMasterData master;
|
|
public cPlayData[] user;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nPlayData
|
|
{
|
|
// 기본 플레이 데이터.
|
|
public cPlayData playUser;
|
|
public cGoodsData playCurrency;
|
|
public cPlayCostume playCostumeInfo;
|
|
public cAwakenData playAwaken;
|
|
public nIdCnt[] playBox;
|
|
public int mailCount;
|
|
|
|
public int[] playProfileIcon;
|
|
public int[] playProfileTitle;
|
|
|
|
// 장비. 무기, 투구, 갑옷, 신발, 목걸이, 반지, 귀걸이.
|
|
public nIdLvInfo[] playGearWeapon;
|
|
public nIdLvInfo[] playGearCape;
|
|
public nIdLvInfo[] playGearHat;
|
|
public nIdLvInfo[] playGearShoes;
|
|
public nIdLvInfo[] playGearNecklace;
|
|
public nIdLvInfo[] playGearRing;
|
|
public nIdLvInfo[] playGearEarring;
|
|
// 보물.
|
|
public nIdLvInfo[] playGearTreasure;
|
|
|
|
// 스킬.
|
|
public nIdLvInfo[] playCharSkillPassive;
|
|
public nIdLvInfo[] playCharSkillActive;
|
|
|
|
// 펫.
|
|
public nIdLvInfo[] playPet;
|
|
|
|
// 코스튬.
|
|
public int[] playCostumeOutfit;
|
|
public int[] playCostumeWeapon;
|
|
public nIdCnt[] playColorHair;
|
|
public nIdCnt[] playColorTop;
|
|
public nIdCnt[] playColorEye;
|
|
|
|
//골드 강화, 포인트 강화
|
|
public nIdLv[] playCharEnhanceGold;
|
|
public nIdLv[] playCharEnhancePoint;
|
|
|
|
public cPlayerDungeonInfo playDgGold;
|
|
public cPlayerDungeonInfo playDgReinStone;
|
|
public cPlayerDungeonInfo playDgPet;
|
|
public cPlayerDungeonInfo playDgAwakenStone;
|
|
public cPlayerDungeonInfo playDgAwaken;
|
|
public cPlayerDungeonInfo[] playDgGuardian;
|
|
public cPlayerDungeonInfo playDgRelic;
|
|
public cPlayGuardian[] playGuardian;
|
|
|
|
public cPlayRelic[] playRelic;
|
|
|
|
// 상점.
|
|
public sShopPlay[] playShop;
|
|
// 패스.
|
|
public sPassPlay[] playPass;
|
|
// 버프.
|
|
public cAdBuffLevel playBuff;
|
|
// 출석.
|
|
public cAttend[] playAttend;
|
|
// 결투장.
|
|
public cPvpPlay playPvp;
|
|
public dPvpRank rankPvp;
|
|
|
|
// 기록
|
|
public cTotalRecord playRecordTotal;
|
|
public cDailyRecord playRecordDaily;
|
|
|
|
public cQuestDaily[] playQuestDaily;
|
|
public cQuestRepeat[] playQuestRepeat;
|
|
|
|
public cQuestEvent[] playQuestEvent;
|
|
public cQuestAttend playQuestEventAttend;
|
|
|
|
public cDungeonPreset dgPreset;
|
|
|
|
public cEventItem playEventTrade;
|
|
public cEventItem playEventRaise;
|
|
public cEventItem playEventRoulette;
|
|
public cRewardEvent playEventReward;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nSaveData
|
|
{
|
|
public cPlayData playUser;
|
|
public cGoodsData playCurrency;
|
|
public nIdCnt[] playBox;
|
|
public nUserInfo playUserInfo;
|
|
public cTotalRecord playRecordTotal;
|
|
public cDailyRecord playRecordDaily;
|
|
public cEventItem playEventRoulette;
|
|
public cEventItem playEventRaise;
|
|
public cEventItem playEventTrade;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nSaveReturn
|
|
{
|
|
public int mailCount;
|
|
}
|
|
#endregion Play Base
|
|
|
|
#region Record
|
|
public class RequestRecrod
|
|
{
|
|
public int monsterKill;
|
|
public int playTime;
|
|
|
|
public RequestRecrod(int imonkill, int itime)
|
|
{
|
|
monsterKill = imonkill; playTime = itime;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class RecordReturn
|
|
{
|
|
public cDailyRecord playRecordDaily;
|
|
public cTotalRecord playRecordTotal;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cTotalRecord
|
|
{
|
|
public int attendCnt;
|
|
public int monsterKill;
|
|
public int gachaWeaponCnt;
|
|
public int gachaArmorCnt;
|
|
public int gachaAccCnt;
|
|
public int gachaTreasureCnt;
|
|
public int composeWeaponCnt;
|
|
public int composeArmorCnt;
|
|
public int composeAccCnt;
|
|
public int enhanceGoldAtk;
|
|
public int enhanceGoldHp;
|
|
public int clearDailyQuest;
|
|
public int playTime;
|
|
public int missionLv;
|
|
public int missionProgress;
|
|
public int composeIris;
|
|
public int composePetSpirit;
|
|
public int renameCnt;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cDailyRecord
|
|
{
|
|
public int attendCnt;
|
|
public int monsterKill;
|
|
public int gachaWeaponCnt;
|
|
public int gachaArmorCnt;
|
|
public int gachaAccCnt;
|
|
public int gachaTreasureCnt;
|
|
public int composeWeaponCnt;
|
|
public int composeArmorCnt;
|
|
public int composeAccCnt;
|
|
public int enhanceGoldAtk;
|
|
public int enhanceGoldHp;
|
|
public int clearDailyQuest;
|
|
public int playTime;
|
|
}
|
|
#endregion
|
|
|
|
#region Stage & Monster & Bg & Bgm
|
|
[Serializable]
|
|
public class dArea : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int bgId;
|
|
|
|
public int[] monsterNormal;
|
|
public int[] monsterEpic;
|
|
public int[] monsterBoss;
|
|
|
|
[SerializeField] private string _hp;
|
|
public BigInteger hp;
|
|
[SerializeField] private string _atk;
|
|
public BigInteger atk;
|
|
|
|
public int normalBox;
|
|
public int normalBoxCnt;
|
|
public int gearBox;
|
|
public int gearBoxCnt;
|
|
public int accBox;
|
|
public int accBoxCnt;
|
|
public int petBox;
|
|
public int petBoxCnt;
|
|
|
|
[SerializeField] private string _gold;
|
|
public BigInteger gold;
|
|
|
|
[SerializeField] private string _exp;
|
|
public BigInteger exp;
|
|
|
|
public int wave;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (atk != null)
|
|
_atk = atk.ToString();
|
|
|
|
if (hp != null)
|
|
_hp = hp.ToString();
|
|
|
|
if (gold != null)
|
|
_gold = gold.ToString();
|
|
|
|
if (exp != null)
|
|
_exp = exp.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_gold))
|
|
gold = BigInteger.Parse(_gold);
|
|
else
|
|
gold = 0L;
|
|
_gold = null;
|
|
|
|
if (!string.IsNullOrEmpty(_atk))
|
|
atk = BigInteger.Parse(_atk);
|
|
else
|
|
atk = 0L;
|
|
_atk = null;
|
|
|
|
if (!string.IsNullOrEmpty(_hp))
|
|
hp = BigInteger.Parse(_hp);
|
|
else
|
|
hp = 0L;
|
|
_hp = null;
|
|
|
|
if (!string.IsNullOrEmpty(_exp))
|
|
exp = BigInteger.Parse(_exp);
|
|
else
|
|
exp = 0L;
|
|
_exp = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nStageRequest
|
|
{
|
|
public int curStage;
|
|
public int clearStage;
|
|
public bool isClear;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dMonster
|
|
{
|
|
public int id;
|
|
public string path;
|
|
public int speed;
|
|
public int group;
|
|
}
|
|
|
|
[Serializable]
|
|
public enum eBgEffect
|
|
{
|
|
None = -1,
|
|
BubbleWhite = 1,
|
|
BubbleBlue = 4,
|
|
LeafGreen = 13,
|
|
LeafPink = 16,
|
|
LightYellow = 25,
|
|
RainWhite = 31,
|
|
WaveWhite = 41
|
|
}
|
|
|
|
[Serializable]
|
|
public class dBg
|
|
{
|
|
public int id;
|
|
public string path;
|
|
public int[] globalLight;
|
|
public int[] charLight;
|
|
public eBgEffect bgEffect;
|
|
}
|
|
|
|
public enum BGM
|
|
{
|
|
none,
|
|
intro,
|
|
stage,
|
|
goldDg,
|
|
enhanceDg,
|
|
petDg,
|
|
awakenStoneDg,
|
|
awakenDg,
|
|
guardian,
|
|
pvp
|
|
}
|
|
|
|
[Serializable]
|
|
public class dBgm
|
|
{
|
|
public BGM id;
|
|
public string path;
|
|
|
|
public dBgm(BGM id, string path)
|
|
{
|
|
this.id = id;
|
|
this.path = path;
|
|
}
|
|
}
|
|
#endregion Stage & Monster
|
|
|
|
#region Dungeon
|
|
//@ 클래스 이름, 구조 변경 필요.
|
|
[Serializable]
|
|
public class dDungeonInfo
|
|
{
|
|
public int id;
|
|
public int bgId;
|
|
public int wave;
|
|
public int openStage;
|
|
public int timeOut;//던전 정보
|
|
|
|
public int[] monsterNormal;
|
|
public int[] monsterEpic;
|
|
public int[] monsterBoss;
|
|
|
|
public nDiffs[] diffs;//던전 난이도별 차등
|
|
}
|
|
|
|
[Serializable]
|
|
public class cPlayerDungeonInfo
|
|
{
|
|
public int sid = 0;
|
|
public int lv = 1;
|
|
public int ticket = 0;
|
|
public int ticketUsed = 0;
|
|
public int dailyTry = 0;
|
|
public int totalTry = 0;
|
|
public int dailyClear = 0;
|
|
public int totalClear = 0;
|
|
public int dailyFail = 0;
|
|
public int totalFail = 0;
|
|
}
|
|
|
|
public class nDungeonTryInfo
|
|
{
|
|
public int lv;
|
|
public bool clear;
|
|
public bool isSkip;
|
|
public int skipCnt;
|
|
public int preset;
|
|
public int petPreset;
|
|
public int extraPreset;
|
|
public float bonus;
|
|
public int sid;
|
|
|
|
public nDungeonTryInfo(int lv, bool clear, bool isskip, int skipcnt, int skill, int pet, int extra, float ibonus)
|
|
{
|
|
this.lv = lv;
|
|
this.clear = clear;
|
|
isSkip = isskip;
|
|
skipCnt = skipcnt;
|
|
preset = skill;
|
|
petPreset = pet;
|
|
extraPreset = extra;
|
|
bonus = ibonus;
|
|
}
|
|
|
|
public nDungeonTryInfo(int lv, bool clear, int skill, int pet, int extra)
|
|
{
|
|
this.lv = lv;
|
|
this.clear = clear;
|
|
preset = skill;
|
|
petPreset = pet;
|
|
extraPreset = extra;
|
|
}
|
|
|
|
public nDungeonTryInfo(int lv,int sid, bool clear, int skill, int pet, int extra)
|
|
{
|
|
this.lv = lv;
|
|
this.sid = sid;
|
|
this.clear = clear;
|
|
preset = skill;
|
|
petPreset = pet;
|
|
extraPreset = extra;
|
|
}
|
|
}
|
|
|
|
public class nDungeonResultReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public cPlayerDungeonInfo playDgGold;
|
|
public cPlayerDungeonInfo playDgReinStone;
|
|
public cPlayerDungeonInfo playDgPet;
|
|
public cPlayerDungeonInfo playDgAwakenStone;
|
|
public cPlayerDungeonInfo playDgAwaken;
|
|
public cPlayerDungeonInfo playDgRelic;
|
|
public cAwakenData playAwaken;
|
|
public cPlayerDungeonInfo playDgGuardian;
|
|
public cPlayGuardian playGuardian;
|
|
}
|
|
|
|
#endregion Dungeon
|
|
|
|
#region Color & Costume
|
|
[Serializable]
|
|
public class dColor : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
|
|
[SerializeField] private int[] color;
|
|
public Color realColor;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize() { }
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (color != null)
|
|
{
|
|
realColor = new Color(color[0] / 255f, color[1] / 255f, color[2] / 255f, 1f);
|
|
color = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dCostumeSet
|
|
{
|
|
public int id;
|
|
public eEffectType abilityType;
|
|
public int abilityValue;
|
|
public int[] set;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dCostume
|
|
{
|
|
public int id;
|
|
public string path;
|
|
|
|
public eEffectType abilityType1;
|
|
public int abilityValue1;
|
|
public eEffectType abilityType2;
|
|
public int abilityValue2;
|
|
|
|
public bool have;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nColorSet
|
|
{
|
|
public int hairColor;
|
|
public int topColor;
|
|
public int eyeColor;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nCostumeReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public cPlayCostume playCostumeInfo;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nColorComposeReturn
|
|
{
|
|
public int result;
|
|
public nIdCnt[] playColorHair;
|
|
public nIdCnt[] playColorTop;
|
|
public nIdCnt[] playColorEye;
|
|
}
|
|
#endregion Color & Costume
|
|
|
|
#region Character
|
|
[Serializable]
|
|
public class dPlayerLv
|
|
{
|
|
public int lv;
|
|
|
|
public static dPlayerLv[] LocalDatas()
|
|
{
|
|
dPlayerLv[] datas = new dPlayerLv[40000];
|
|
BigInteger ibefexp = 0L;
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new dPlayerLv();
|
|
datas[i].lv = i + 1;
|
|
}
|
|
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dIntervals
|
|
{
|
|
public int interval;
|
|
public int abilityValue;
|
|
public int abilityValueInc;
|
|
public int buyingCnt;
|
|
public int buyingCntInc;
|
|
|
|
|
|
public dIntervals(bool isGold)
|
|
{
|
|
if (isGold)
|
|
{
|
|
interval = 0;
|
|
abilityValue = 0;
|
|
abilityValueInc = 1;
|
|
buyingCnt = 100;
|
|
buyingCntInc = 5;
|
|
}
|
|
else
|
|
{
|
|
interval = 0;
|
|
abilityValue = 0;
|
|
abilityValueInc = 1;
|
|
buyingCnt = 1;
|
|
buyingCntInc = 0;
|
|
}
|
|
}
|
|
}
|
|
public class nCharEnhanceGoldReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLv playCharEnhanceGold;
|
|
}
|
|
|
|
public class nCharEnhancePointReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLv playCharEnhancePoint;
|
|
}
|
|
|
|
public class nCharAwakenReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public cAwakenData playAwaken;
|
|
}
|
|
|
|
public class nStageReturn
|
|
{
|
|
public cPlayData playUser;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dCharStat : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int sid;
|
|
public eEffectType abilityType;//올라가는 어빌리티 종류
|
|
public int maxLv;//만렙
|
|
public int abilityValue;//강화 1레벨 스텟
|
|
public int abilityValueInc;//강화 레벨이 올라가면 늘어나는 스텟
|
|
[SerializeField] private string buyingCnt;
|
|
public BigInteger buyingCount;//강화 1레벨 비용
|
|
public int buyingCntInc;//강화 레벨당 늘어나는 비용
|
|
public int condType; //해금에 필요한 ID.
|
|
public int condValue;//해금에 필요한 어빌리티 레벨
|
|
public int level;//현재 강화 레벨
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (buyingCnt != null)
|
|
buyingCnt = buyingCount.ToString();
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if(!string.IsNullOrEmpty(buyingCnt))
|
|
buyingCount = BigInteger.Parse(buyingCnt);
|
|
else
|
|
buyingCount = 0L;
|
|
buyingCnt = null;
|
|
}
|
|
}
|
|
#endregion Character
|
|
|
|
#region Awaken
|
|
[Serializable]
|
|
public class cAwakenData : ISerializationCallbackReceiver
|
|
{
|
|
static readonly string _es3Key = "PlayAwaken";
|
|
|
|
public int awaken;
|
|
|
|
public int usePreset;
|
|
public int[][] extras;
|
|
|
|
[SerializeField] int[] extras1;
|
|
[SerializeField] int[] extras2;
|
|
[SerializeField] int[] extras3;
|
|
|
|
public bool[][] awakenUnlock;
|
|
|
|
public cAwakenData()
|
|
{
|
|
awaken = 6;
|
|
|
|
extras = new int[3][]
|
|
{
|
|
new int[6]{ -1, -1, -1, -1, -1, -1},
|
|
new int[6]{ -1, -1, -1, -1, -1, -1},
|
|
new int[6]{ -1, -1, -1, -1, -1, -1}
|
|
};
|
|
|
|
awakenUnlock = new bool[3][]
|
|
{
|
|
new bool[6]{ true, true, true, true, true, true},
|
|
new bool[6]{ true, true, true, true, true, true},
|
|
new bool[6]{ true, true, true, true, true, true }
|
|
};
|
|
}
|
|
|
|
// ES3 Save 직전 호출, Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (extras != null)
|
|
{
|
|
extras1 = extras[0];
|
|
extras2 = extras[1];
|
|
extras3 = extras[2];
|
|
}
|
|
}
|
|
|
|
// ES3 Load 직후 호출, Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (extras1 != null)
|
|
{
|
|
extras = new int[3][];
|
|
extras[0] = extras1;
|
|
extras[1] = extras2;
|
|
extras[2] = extras3;
|
|
extras1 = null;
|
|
extras2 = null;
|
|
extras3 = null;
|
|
}
|
|
}
|
|
|
|
public void Save()
|
|
{
|
|
OnBeforeSerialize();
|
|
ES3.Save(_es3Key, this, Global.ES3_CharAwaken);
|
|
}
|
|
|
|
public static cAwakenData Load(cAwakenData prevData)
|
|
{
|
|
if (!ES3.KeyExists(_es3Key, Global.ES3_CharAwaken))
|
|
{
|
|
if (prevData == null)
|
|
{
|
|
prevData = new cAwakenData();
|
|
}
|
|
|
|
ES3.Save(_es3Key, prevData, Global.ES3_CharAwaken);
|
|
}
|
|
|
|
var data = ES3.Load<cAwakenData>(_es3Key, Global.ES3_CharAwaken);
|
|
data.OnAfterDeserialize();
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dSysGuardian
|
|
{
|
|
public int guardianType;
|
|
public dSysGuardianLevel[] levels;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dSysGuardianLevel
|
|
{
|
|
public int lv;
|
|
public int maxExp;
|
|
public int abilityType1;
|
|
public int abilityMinValue1;
|
|
public int abilityMaxValue1;
|
|
public int abilityType2;
|
|
public int abilityMinValue2;
|
|
public int abilityMaxValue2;
|
|
public int abilityType3;
|
|
public int abilityMinValue3;
|
|
public int abilityMaxValue3;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cPlayGuardian
|
|
{
|
|
public int guardianType;
|
|
public int lv;
|
|
public int exp;
|
|
public int[] extras;
|
|
}
|
|
|
|
public class nAwakenPresetSlot
|
|
{
|
|
public int preset;
|
|
public int slot;
|
|
|
|
public nAwakenPresetSlot(int ipreset, int islot)
|
|
{
|
|
preset = ipreset;
|
|
slot = islot;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dAwakenReward : ISerializationCallbackReceiver
|
|
{
|
|
public int awakenInc;
|
|
|
|
[SerializeField] private string rewardCnt;
|
|
public BigInteger rewardCount;
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (rewardCount != 0)
|
|
rewardCnt = rewardCount.ToString();
|
|
}
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(rewardCnt))
|
|
rewardCount = BigInteger.Parse(rewardCnt);
|
|
else
|
|
rewardCount = 0L;
|
|
rewardCnt = null;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Gear & Treasure
|
|
[Serializable]
|
|
public class dGear : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int grade;
|
|
public int maxAwaken;
|
|
|
|
[SerializeField] private string buyingCnt;
|
|
public int buyingCount;
|
|
|
|
[SerializeField] private string buyingCntInc;
|
|
public int buyingCountInc;
|
|
|
|
public eEffectType abilityType1;
|
|
public long abilityValue1;
|
|
public long abilityValueInc1;
|
|
|
|
public eEffectType abilityType2;
|
|
public long abilityValue2;
|
|
public long abilityValueInc2;
|
|
|
|
public eEffectType abilityType3;
|
|
public long abilityValue3;
|
|
public long abilityValueInc3;
|
|
|
|
public bool have;
|
|
public int count;
|
|
public int awaken;
|
|
public int level;
|
|
public int[] extraEffects;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
buyingCnt = buyingCount.ToString();
|
|
buyingCntInc = buyingCountInc.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(buyingCnt))
|
|
buyingCount = int.Parse(buyingCnt);
|
|
else
|
|
buyingCount = 0;
|
|
buyingCnt = null;
|
|
if (!string.IsNullOrEmpty(buyingCntInc))
|
|
buyingCountInc = int.Parse(buyingCntInc);
|
|
else
|
|
buyingCountInc = 0;
|
|
buyingCntInc = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nGearEnhanceReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo playGearWeapon;
|
|
public nIdLvInfo playGearCape;
|
|
public nIdLvInfo playGearHat;
|
|
public nIdLvInfo playGearShoes;
|
|
public nIdLvInfo playGearEarring;
|
|
public nIdLvInfo playGearNecklace;
|
|
public nIdLvInfo playGearRing;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nGearComposeReturn
|
|
{
|
|
public nGoods[] result;
|
|
public nIdLvInfo[] playGearWeapon;
|
|
public nIdLvInfo[] playGearCape;
|
|
public nIdLvInfo[] playGearHat;
|
|
public nIdLvInfo[] playGearShoes;
|
|
public nIdLvInfo[] playGearEarring;
|
|
public nIdLvInfo[] playGearNecklace;
|
|
public nIdLvInfo[] playGearRing;
|
|
public int composeCnt;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nGearAwakenReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo[] playGearWeapon;
|
|
public nIdLvInfo[] playGearCape;
|
|
public nIdLvInfo[] playGearHat;
|
|
public nIdLvInfo[] playGearShoes;
|
|
public nIdLvInfo[] playGearEarring;
|
|
public nIdLvInfo[] playGearNecklace;
|
|
public nIdLvInfo[] playGearRing;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nGearEfcAddReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo playGearWeapon;
|
|
public nIdLvInfo playGearCape;
|
|
public nIdLvInfo playGearHat;
|
|
public nIdLvInfo playGearShoes;
|
|
public nIdLvInfo playGearEarring;
|
|
public nIdLvInfo playGearNecklace;
|
|
public nIdLvInfo playGearRing;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dTreasure
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int maxLv;
|
|
|
|
public eEffectType abilityType;
|
|
public long abilityValue;
|
|
public long abilityValueInc;
|
|
|
|
public bool have;
|
|
public int count;
|
|
public int level;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nTreasureEnhanceReturn
|
|
{
|
|
public nIdLvInfo playGearTreasure;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nTreasureSellReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo playGearTreasure;
|
|
}
|
|
#endregion Gear & Treasure
|
|
|
|
#region Skill
|
|
// 스킬 타입.
|
|
public enum eSkillType
|
|
{
|
|
None = 0,
|
|
|
|
//Damage = 1000
|
|
//Effect = 2000
|
|
|
|
// 범위에 데미지.
|
|
//Range = 000
|
|
// 타겟에 데미지.
|
|
//One = 100
|
|
|
|
// 수치 데미지.
|
|
//Value = 00
|
|
// Hp 비례 데미지.
|
|
//Rate = 10
|
|
|
|
// 시전자 위치에서.
|
|
//AtUse = 0
|
|
// 타겟 위치에서.
|
|
//AtTarget = 1
|
|
// 시전자를 따라다님.
|
|
//TraceUse = 2
|
|
// 타겟을 따라다님.
|
|
//TraceTarget = 3
|
|
|
|
RangeValueAtUse = 1000,
|
|
RangeValueAtTarget = 1001,
|
|
RangeValueTraceUse = 1002,
|
|
RangeValueTraceTarget = 1003,
|
|
//RangeRateAtUse = 1010,
|
|
//RangeRateAtTarget = 1011,
|
|
//RangeRateTraceUse = 1012,
|
|
//RangeRateTraceTarget = 1013,
|
|
|
|
OneValueAtUse = 1100,
|
|
OneValueAtTarget = 1101,
|
|
OneValueTraceUse = 1102,
|
|
OneValueTraceTarget = 1103,
|
|
//OneRateAtUse = 1110,
|
|
//OneRateAtTarget = 1111,
|
|
//OneRateTraceUse = 1112,
|
|
//OneRateTraceTarget = 1113,
|
|
|
|
//EffectRangeValueAtUse = 2000,
|
|
//EffectRangeValueAtTarget = 2001,
|
|
//EffectRangeValueTraceUse = 2002,
|
|
//EffectRangeValueTraceTarget = 2003,
|
|
//EffectRangeRateAtUse = 2010,
|
|
//EffectRangeRateAtTarget = 2011,
|
|
//EffectRangeRateTraceUse = 2012,
|
|
//EffectRangeRateTraceTarget = 2013,
|
|
|
|
//EffectOneValueAtUse = 2100,
|
|
//EffectOneValueAtTarget = 2101,
|
|
//EffectOneValueTraceUse = 2102,
|
|
//EffectOneValueTraceTarget = 2103,
|
|
//EffectOneRateAtUse = 2110,
|
|
//EffectOneRateAtTarget = 2111,
|
|
//EffectOneRateTraceUse = 2112,
|
|
//EffectOneRateTraceTarget = 2113
|
|
|
|
End = 9999
|
|
}
|
|
|
|
// 상태이상.
|
|
public enum eSkillDebuff
|
|
{
|
|
None = 0,
|
|
DecMove = 1,
|
|
DamageSec = 2,
|
|
Stun = 3,
|
|
Push = 4,
|
|
Pull = 5
|
|
}
|
|
|
|
[Serializable]
|
|
public class dSkillPassive
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int openLv;
|
|
public int maxLv;
|
|
|
|
public int buyingCnt;
|
|
public int buyingCntInc;
|
|
|
|
public eEffectType abilityType;
|
|
public long abilityValue;
|
|
public long abilityValueInc;
|
|
|
|
public int level;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dSkillActive
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int openLv;
|
|
public int maxAwaken;
|
|
|
|
public int buyingCnt;
|
|
public int buyingCntInc;
|
|
|
|
// 0. 쿨타임.
|
|
public int coolTime;
|
|
|
|
// 1. 피해량.
|
|
public long atkValue;
|
|
public long atkValueInc;
|
|
|
|
public eSkillDebuff debuffType;
|
|
// 2. 상태이상 수치.
|
|
public int debuffValue;
|
|
public int debuffValueInc;
|
|
// 3. 상태이상 지속 시간.
|
|
public float debuffTime;
|
|
|
|
public int level;
|
|
public int awaken;
|
|
}
|
|
|
|
[Serializable] // 스킬 강화/각성 후 리턴.
|
|
public class nSkillReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo playCharSkillPassive;
|
|
public nIdLvInfo playCharSkillActive;
|
|
}
|
|
#endregion Skill
|
|
|
|
|
|
#region Pet
|
|
[Serializable]
|
|
public class dPet : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int maxAwaken;
|
|
public int condValue;
|
|
|
|
[SerializeField] private string buyingCnt;
|
|
public int buyingCount;
|
|
[SerializeField] private string buyingCntInc;
|
|
public int buyingCountInc;
|
|
|
|
public eEffectType abilityType1;
|
|
public long abilityValue1;
|
|
public long abilityValueInc1;
|
|
|
|
public eEffectType abilityType2;
|
|
public long abilityValue2;
|
|
public long abilityValueInc2;
|
|
|
|
public eEffectType abilityType3;
|
|
public long abilityValue3;
|
|
public long abilityValueInc3;
|
|
|
|
public eEffectType abilityTypeOption;
|
|
public long abilityValueOption;
|
|
|
|
public bool have;
|
|
public int awaken;
|
|
public int level;
|
|
public int[] extraEffects;
|
|
|
|
public int count;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
buyingCnt = buyingCount.ToString();
|
|
buyingCntInc = buyingCountInc.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(buyingCnt))
|
|
buyingCount = int.Parse(buyingCnt);
|
|
else
|
|
buyingCount = 0;
|
|
buyingCnt = null;
|
|
if (!string.IsNullOrEmpty(buyingCntInc))
|
|
buyingCountInc = int.Parse(buyingCntInc);
|
|
else
|
|
buyingCountInc = 0;
|
|
buyingCntInc = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nPetReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo playPet;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nPetsReturn
|
|
{
|
|
public nGoods[] result;
|
|
public nIdLvInfo[] playPet;
|
|
}
|
|
#endregion Pet
|
|
|
|
|
|
#region Gacha
|
|
// 소환 레벨별 필요 횟수, 확률, 보상.
|
|
[Serializable]
|
|
public class dGachaLevel : ISerializationCallbackReceiver
|
|
{
|
|
// 현재 레벨 달성에 필요한 횟수.
|
|
public int cnt;
|
|
// 현재 레벨 희귀도별 확률. 0:일반, 1:레어, 2:에픽, 3:유니크, 4:전설, 5:영웅.
|
|
public int[] props;
|
|
// 현재 레벨 달성 보상.
|
|
public int rewardType;
|
|
public int rewardId;
|
|
|
|
[SerializeField] private string rewardCnt;
|
|
public BigInteger rewardCount;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (rewardCount != null)
|
|
rewardCnt = rewardCount.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(rewardCnt))
|
|
rewardCount = BigInteger.Parse(rewardCnt);
|
|
else
|
|
rewardCount = 0L;
|
|
rewardCnt = null;
|
|
}
|
|
}
|
|
|
|
// 가챠 타입. 0:보석, 1:티켓.
|
|
[Serializable]
|
|
public class nGachaType
|
|
{
|
|
public int gachaType;
|
|
|
|
public nGachaType(int itype)
|
|
{
|
|
this.gachaType = itype;
|
|
}
|
|
}
|
|
#endregion Gacha
|
|
|
|
|
|
#region Title & Icon
|
|
|
|
[SerializeField]
|
|
public class nIconGetReutn : nGoodsGet
|
|
{
|
|
int sid;
|
|
}
|
|
public enum eDifficulty
|
|
{
|
|
Easy = 1,
|
|
Normal = 2,
|
|
Hard = 3,
|
|
VeryHard = 4,
|
|
Special = 5
|
|
}
|
|
|
|
[SerializeField]
|
|
public class nTitleGetReutn : nGoodsGet
|
|
{
|
|
public int sid;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dTitle
|
|
{
|
|
public int id;
|
|
public bool have;
|
|
|
|
public eContent category; // 획득 컨텐츠
|
|
public eDifficulty grade; // 획득 난이도
|
|
public eCondition condType; // 획득 방법
|
|
public int condValue; // 회득 목표치
|
|
|
|
public eEffectType abilityType; // 해금 효과 타입
|
|
public int abilityValue; // 해금 스탯값
|
|
}
|
|
|
|
[Serializable]
|
|
public class dIcon
|
|
{
|
|
public int id;
|
|
public bool have;
|
|
public eCondition condType; // 획득 방법
|
|
public int condValue;
|
|
}
|
|
#endregion
|
|
|
|
#region DungeonPreset
|
|
public class cDungeonPreset
|
|
{
|
|
static readonly string _prefsKey = "cDungeonPreset";
|
|
|
|
public int[] dgSkillPreset = new int[6];
|
|
public int[] dgAwakenPreset = new int[6];
|
|
public int[] dgPetPreset = new int[6];
|
|
|
|
public void Save()
|
|
{
|
|
ES3.Save(_prefsKey, this, Global.ES3_DgPreset);
|
|
}
|
|
|
|
public static cDungeonPreset Load()
|
|
{
|
|
if (!ES3.KeyExists(_prefsKey, Global.ES3_DgPreset))
|
|
ES3.Save(_prefsKey, new cDungeonPreset(), Global.ES3_DgPreset);
|
|
|
|
return ES3.Load<cDungeonPreset>(_prefsKey, Global.ES3_DgPreset);
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region AdBuff
|
|
[Serializable]
|
|
public class dAdBuff
|
|
{
|
|
public int lv;
|
|
public int exp;
|
|
public int atkValue;
|
|
public int goldValue;
|
|
public int expValue;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cAdBuffLevel
|
|
{
|
|
public const string PrefsKey = "cAdBuffLevel";
|
|
|
|
public int atkLv;
|
|
public int atkExp;
|
|
public int goldLv;
|
|
public int goldExp;
|
|
public int expLv;
|
|
public int expExp;
|
|
|
|
public int[] adTimer = new int[3];
|
|
|
|
public void Save(int iserver)
|
|
{
|
|
string prefsKey = FormatString.CombineAllString(PrefsKey, iserver.ToString());
|
|
|
|
adTimer[0] = AdBuffMgr.GetAdTImer()[0];
|
|
adTimer[1] = AdBuffMgr.GetAdTImer()[1];
|
|
adTimer[2] = AdBuffMgr.GetAdTImer()[2];
|
|
|
|
ES3.Save(prefsKey, this, Global.ES3_AdBuff);
|
|
}
|
|
|
|
public static cAdBuffLevel Load(cAdBuffLevel prevData, int iserver)
|
|
{
|
|
string prefsKey = FormatString.CombineAllString(PrefsKey, iserver.ToString());
|
|
|
|
if (!ES3.KeyExists(prefsKey, Global.ES3_AdBuff))
|
|
{
|
|
if (prevData != null)
|
|
{
|
|
ES3.Save(prefsKey, prevData, Global.ES3_AdBuff);
|
|
}
|
|
else
|
|
{
|
|
ES3.Save(prefsKey, new cAdBuffLevel(), Global.ES3_AdBuff);
|
|
}
|
|
}
|
|
|
|
return ES3.Load<cAdBuffLevel>(prefsKey, Global.ES3_AdBuff);
|
|
}
|
|
}
|
|
|
|
public class nAdBuffReturn
|
|
{
|
|
public cAdBuffLevel playBuff;
|
|
}
|
|
#endregion
|
|
|
|
#region Event
|
|
public enum eEventMoveType
|
|
{
|
|
None = 0,
|
|
Attend10 = 1,
|
|
Attend7 = 2, // 마리모 출석.
|
|
Mission = 3, // 성장 지원 미션.
|
|
Exchange = 4, // 마리모 교환.
|
|
Hottime = 5,
|
|
Roulette = 6,
|
|
Raise = 7, // 마리모 키우기.
|
|
Pass = 500,
|
|
Shop = 900,
|
|
|
|
// Enhance
|
|
EnhnaceGold = 101,
|
|
EnhancePoint = 102,
|
|
EnhanceAwakne = 103,
|
|
|
|
// Summon
|
|
SummonWeapon = 201,
|
|
SummonArmor = 202,
|
|
SummonAcc = 203,
|
|
SummonTreasure = 204,
|
|
|
|
// Bag
|
|
BagWeapon = 301,
|
|
BagArmorCape = 302,
|
|
BagArmorHat = 303,
|
|
BagArmorShoes = 304,
|
|
BagAccEar = 305,
|
|
BagAccNeck = 306,
|
|
BagAccRing = 307,
|
|
BagTreasure = 308,
|
|
BagTreasureR = 309,
|
|
BagConsume = 350,
|
|
|
|
// skill
|
|
skillActive = 401,
|
|
skillPassive = 402,
|
|
|
|
// pet
|
|
pet = 501,
|
|
petSprit = 502,
|
|
|
|
// dungeon
|
|
DgGold = 601,
|
|
DgStone = 602,
|
|
DgAwaken = 603,
|
|
DgPet = 604,
|
|
DgRelic = 607,
|
|
|
|
// Profile
|
|
ProfileIcon = 701,
|
|
ProfileTitleBattle = 702,
|
|
ProfileTitleEquip = 703,
|
|
ProfileTitleSummon = 704,
|
|
ProfileTitleDungeon = 705,
|
|
ProfileTitleEtc = 706,
|
|
|
|
// Etc Content
|
|
AdBuff = 2001,
|
|
Attend = 2002,
|
|
SettingSys = 2003,
|
|
SettingId = 2004,
|
|
}
|
|
|
|
[Serializable]
|
|
public class dEvent : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public string title; // deprecated
|
|
public string path;
|
|
public int[] bgColor;
|
|
public eEventMoveType moveType;
|
|
public int scale1;
|
|
public int scale2;
|
|
public int scale3;
|
|
|
|
[SerializeField] private string _startAt;
|
|
public DateTime startAt;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
[SerializeField] private string _startTime;
|
|
public TimeSpan startTime;
|
|
|
|
[SerializeField] private string _endTime;
|
|
public TimeSpan endTime;
|
|
|
|
public int[] eventType; // deprecated
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if(!Application.isPlaying) return;
|
|
|
|
_startAt = startAt.ToString(FormatString.DateTimeParse);
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
_endTime = endTime.ToString(FormatString.DateTimeParse);
|
|
|
|
try
|
|
{
|
|
_startTime = startTime.ToString(FormatString.DateTimeParse);
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
Debug.LogError(e.Message);
|
|
}
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_startAt))
|
|
startAt = DateTime.ParseExact(_startAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_startAt = null;
|
|
|
|
if (!string.IsNullOrEmpty(_startTime))
|
|
startTime = TimeParsing(_startTime);
|
|
_startTime = null;
|
|
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
|
|
if (!string.IsNullOrEmpty(_endTime))
|
|
endTime = TimeParsing(_endTime);
|
|
_endTime = null;
|
|
}
|
|
|
|
private static TimeSpan TimeParsing(string time)
|
|
{
|
|
string[] splitText = time.Split(":");
|
|
TimeSpan span = new TimeSpan(int.Parse(splitText[0]), int.Parse(splitText[1]), int.Parse(splitText[2]));
|
|
return span;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dEventInfo : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public string title; // deprecated
|
|
public string item; // deprecated
|
|
public int price;
|
|
|
|
public nRewardLimit[] rewards;
|
|
public nRewardLimit[] props;
|
|
|
|
[SerializeField] private string _startAt;
|
|
public DateTime startAt;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
[SerializeField] private string _closeAt;
|
|
public DateTime closeAt;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_startAt = startAt.ToString(FormatString.DateTimeParse);
|
|
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
|
|
_closeAt = closeAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_startAt))
|
|
startAt = DateTime.ParseExact(_startAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_startAt = null;
|
|
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
|
|
if (!string.IsNullOrEmpty(_closeAt))
|
|
closeAt = DateTime.ParseExact(_closeAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_closeAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class cEventItem
|
|
{
|
|
public int id;
|
|
public int sid;
|
|
public int item;
|
|
public int itemUsed;
|
|
public nIdBuyCnt[] rewards;
|
|
}
|
|
|
|
[Serializable]
|
|
public class EventServerReturn
|
|
{
|
|
public nGoods[] result;
|
|
public cEventItem playEventTrade;
|
|
public cEventItem playEventRaise;
|
|
public cEventItem playEventRoulette;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cRewardEvent
|
|
{
|
|
public int sid;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dRewardEvent : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public string path;
|
|
public nReward[] rewards;
|
|
|
|
[SerializeField] private string _startAt;
|
|
public DateTime startAt;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_startAt = startAt.ToString(FormatString.DateTimeParse);
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_startAt))
|
|
startAt = DateTime.ParseExact(_startAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_startAt = null;
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class EventRewardReturn
|
|
{
|
|
public cRewardEvent playEventReward;
|
|
}
|
|
#endregion
|
|
|
|
#region Shop
|
|
public enum eShopType
|
|
{
|
|
None = -1,
|
|
Event = 0,
|
|
SpecialPack = 1,
|
|
CostumePack = 2,
|
|
Dia = 3,
|
|
CostumeCloth = 4,
|
|
CostumeWeapon = 5,
|
|
General = 6,
|
|
Mileage = 7,
|
|
Pass = 500
|
|
}
|
|
|
|
[Serializable]
|
|
public class dShop : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int sortOrder;
|
|
public int openStage;
|
|
public string path;
|
|
public string productId;
|
|
|
|
// 구매 제한.
|
|
public eRefreshType refreshType;
|
|
public int refreshValue;
|
|
public int limitCnt;
|
|
|
|
// 상점 분류.
|
|
public eShopType shopType;
|
|
// 구매 재화 종류.
|
|
public int buyingType;
|
|
public int buyingId;
|
|
public int buyingCnt;
|
|
public int mileage;
|
|
|
|
// 상품 내용.
|
|
public nReward[] rewards;
|
|
|
|
[SerializeField] private string _startAt;
|
|
public DateTime startAt;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
// 플레이 데이터.
|
|
public int buyCnt;
|
|
public int totalCnt;
|
|
public DateTime refreshAt;
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_startAt = startAt.ToString(FormatString.DateTimeParse);
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_startAt))
|
|
startAt = DateTime.ParseExact(_startAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_startAt = null;
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class sShopPlay : ISerializationCallbackReceiver
|
|
{
|
|
public int sid;
|
|
public int buyCnt;
|
|
public int totalCnt;
|
|
|
|
public DateTime refreshAt;
|
|
[SerializeField] protected string _refreshAt;
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_refreshAt = refreshAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_refreshAt))
|
|
refreshAt = DateTime.ParseExact(_refreshAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_refreshAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nShopBuyReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public sShopPlay playShop;
|
|
//public nGoods[] result;
|
|
}
|
|
#endregion Shop
|
|
|
|
|
|
#region Pass
|
|
[Serializable]
|
|
public class dPass : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
|
|
// 대표 이미지.
|
|
public string path;
|
|
public int[] bgTop;
|
|
public int[] bgBottom;
|
|
|
|
// 패스 종류. 0: 반복, 1: 일회성, 2: 이벤트(일회성).
|
|
public int passType;
|
|
// 세부분류 단계 수.
|
|
public int passUnit;
|
|
public eCondition condType;
|
|
public dPassLevel[] levels;
|
|
|
|
[SerializeField] private string _startAt;
|
|
public DateTime startAt;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
public DateTime refreshAt;
|
|
|
|
// 플레이 데이터.
|
|
public int progress;
|
|
public bool[] isPaid;
|
|
public int[] haveLvFrees;
|
|
public int[] haveLvPaids;
|
|
|
|
// 클라 계산 데이터.
|
|
public int availLevel;
|
|
public int[] shopIds;
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_startAt = startAt.ToString(FormatString.DateTimeParse);
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_startAt))
|
|
startAt = DateTime.ParseExact(_startAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_startAt = null;
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dPassLevel : ISerializationCallbackReceiver
|
|
{
|
|
public int condLv;
|
|
public int condValue;
|
|
|
|
// 무료 보상.
|
|
public int freeRewardType;
|
|
public int freeRewardId;
|
|
|
|
[SerializeField] private string freeRewardCnt;
|
|
public BigInteger freeReward;
|
|
|
|
// 유료 보상.
|
|
public int paidRewardType;
|
|
public int paidRewardId;
|
|
|
|
[SerializeField] private string paidRewardCnt;
|
|
public BigInteger paidReward;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize() { }
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(freeRewardCnt)) freeReward = BigInteger.Parse(freeRewardCnt);
|
|
freeRewardCnt = null;
|
|
|
|
if (!string.IsNullOrEmpty(paidRewardCnt)) paidReward = BigInteger.Parse(paidRewardCnt);
|
|
paidRewardCnt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class sPassPlay : ISerializationCallbackReceiver
|
|
{
|
|
public int sid;
|
|
|
|
public int progress;
|
|
public bool[] isPaid;
|
|
public int[] haveLvFrees;
|
|
public int[] haveLvPaids;
|
|
|
|
[SerializeField] private string _refreshAt;
|
|
public DateTime refreshAt;
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_refreshAt = refreshAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_refreshAt))
|
|
refreshAt = DateTime.ParseExact(_refreshAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_refreshAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nPassRewardReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public sPassPlay playPass;
|
|
public nGoods[] result;
|
|
}
|
|
#endregion Pass
|
|
|
|
#region Mail
|
|
// 우편.
|
|
[Serializable]
|
|
public class dMail : ISerializationCallbackReceiver
|
|
{
|
|
public string id;
|
|
public string header;
|
|
public string title;
|
|
public nReward[] rewards;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
[SerializeField] private string _readAt;
|
|
public DateTime readAt;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
_readAt = readAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
|
|
if (!string.IsNullOrEmpty(_readAt))
|
|
readAt = DateTime.ParseExact(_readAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_readAt = null;
|
|
}
|
|
}
|
|
|
|
// 우편 목록 갱신/읽기 완료(삭제) 리턴 데이터.
|
|
[Serializable]
|
|
public class nMailRefreshReturn
|
|
{
|
|
public dMail[] playMail;
|
|
}
|
|
|
|
// 우편 아이템 획득 리턴 데이터.
|
|
[Serializable]
|
|
public class nMailGetReturn : nGoodsGet
|
|
{
|
|
public dMail[] playMail;
|
|
}
|
|
#endregion Mail
|
|
|
|
|
|
#region Attend
|
|
[Serializable]
|
|
public class AttendReward
|
|
{
|
|
public int day;
|
|
public nReward[] rewards;
|
|
}
|
|
|
|
// 출석.
|
|
[Serializable]
|
|
public class dAttend : ISerializationCallbackReceiver
|
|
{
|
|
public int attendType;
|
|
public bool isRepeat;
|
|
public AttendReward[] rewards;
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class cAttend : ISerializationCallbackReceiver
|
|
{
|
|
public int attendType;
|
|
public int day;
|
|
public int clearCnt;
|
|
public DateTime attendAt;
|
|
[SerializeField] private string _attendAt;
|
|
public bool attend;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_attendAt = attendAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_attendAt))
|
|
attendAt = DateTime.ParseExact(_attendAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_attendAt = null;
|
|
}
|
|
}
|
|
|
|
public class AttendTypeRequest
|
|
{
|
|
public int attendType;
|
|
}
|
|
|
|
public class AttendInfoReturn
|
|
{
|
|
public bool attend;
|
|
public cAttend playAttend;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
#endregion
|
|
|
|
#region Quest
|
|
[Serializable]
|
|
public class dQuest
|
|
{
|
|
public int id;
|
|
public eCondition condType;
|
|
public int condValue;
|
|
public int day;
|
|
public nReward[] rewards;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cQuestDaily
|
|
{
|
|
public int sid;
|
|
public int cond;
|
|
public int limitCnt;
|
|
public int totalCnt;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cQuestEvent
|
|
{
|
|
public int sid;
|
|
public int cond;
|
|
|
|
public static cQuestEvent[] LocalDatas()
|
|
{
|
|
cQuestEvent[] datas = new cQuestEvent[6];
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new cQuestEvent();
|
|
datas[i].sid = i + 1;
|
|
datas[i].cond = 0;
|
|
}
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class cQuestAttend
|
|
{
|
|
public int day;
|
|
|
|
[SerializeField] private string _attendAt;
|
|
public DateTime attendAt;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_attendAt = attendAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_attendAt))
|
|
attendAt = DateTime.ParseExact(_attendAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_attendAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class cQuestRepeat
|
|
{
|
|
public int sid;
|
|
public int totalCnt;
|
|
}
|
|
|
|
public class QuestDailyReturn
|
|
{
|
|
public cQuestDaily playQuestDaily;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
public class QuestRepeatReturn
|
|
{
|
|
public cQuestRepeat playQuestRepeat;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
public class QuestDailyAllReturn
|
|
{
|
|
public cQuestDaily[] playQuestDaily;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
public class QuestRepeatAllReturn
|
|
{
|
|
public cQuestRepeat[] playQuestRepeat;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
public class QuestEventReturn
|
|
{
|
|
public cQuestEvent playQuestEvent;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
public class QuestEventAllReturn
|
|
{
|
|
public cQuestEvent[] playQuestEvents;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
#endregion
|
|
|
|
#region Mission
|
|
public class cQuestMissionReturn
|
|
{
|
|
public cTotalRecord playRecordTotal;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dMission
|
|
{
|
|
public int id;
|
|
public eCondition condType;
|
|
public int condValue;
|
|
public nReward[] rewards;
|
|
public eEventMoveType moveType;
|
|
}
|
|
#endregion
|
|
|
|
#region Guardian
|
|
[Serializable]
|
|
public class nGuardianExtraReturn
|
|
{
|
|
public cGoodsData playCurrency;
|
|
public cPlayGuardian playGuardian;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nGuardianGrowPost
|
|
{
|
|
public int guardianType;
|
|
public int[] propertyTypes;
|
|
public int[] propertyIds;
|
|
public int[] propertyCnts;
|
|
|
|
public void SetNewInt(int count)
|
|
{
|
|
propertyTypes = new int[count];
|
|
propertyIds = new int[count];
|
|
propertyCnts = new int[count];
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nGuardianGrowReturn
|
|
{
|
|
public cPlayGuardian playGuardian;
|
|
}
|
|
#endregion
|
|
|
|
#region Mask(Relic)
|
|
[Serializable]
|
|
public class dSysRelic
|
|
{
|
|
public int id;
|
|
public int relicType;
|
|
public int maxLv;
|
|
public int abilityType;
|
|
public int abilityValue;
|
|
public int abilityValueInc;
|
|
public int buyingCnt;
|
|
public int buyingCntInc;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dSysRelicEnhanceProp
|
|
{
|
|
public int[] lv;
|
|
public int[] props;
|
|
}
|
|
|
|
[Serializable]
|
|
public class cPlayRelic
|
|
{
|
|
public int relicType;
|
|
public int nextRelic;
|
|
public int assistSid1;
|
|
public int assistLv1;
|
|
public int assistSid2;
|
|
public int assistLv2;
|
|
public int assistSid3;
|
|
public int assistLv3;
|
|
public int assistSid4;
|
|
public int assistLv4;
|
|
public int ancientSid;
|
|
public int ancientLv;
|
|
public bool have;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nMaskEnhancePost
|
|
{
|
|
public int relicType;
|
|
public bool isUpgrade;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nMaskEnhanceReturn
|
|
{
|
|
public cPlayRelic playRelic;
|
|
public cGoodsData playCurrency;
|
|
}
|
|
#endregion
|
|
|
|
#region Pvp
|
|
[Serializable] // 결투장 시스템 데이터.
|
|
public class dPvp
|
|
{
|
|
public bool isOpen;
|
|
public int bgId;
|
|
public int timeout;
|
|
public int pointClear;
|
|
public int pointFail;
|
|
|
|
public dPvpRew[] missions;
|
|
public dPvpTier[] tier;
|
|
}
|
|
|
|
[Serializable] // 결투장 주간 보상 구조.
|
|
public class dPvpRew : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int condValue;
|
|
|
|
// 보상.
|
|
public int rewardType;
|
|
public int rewardId;
|
|
[SerializeField] private string rewardCnt;
|
|
public BigInteger rewardCount;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize() { }
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(rewardCnt))
|
|
rewardCount = BigInteger.Parse(rewardCnt);
|
|
else
|
|
rewardCount = 0L;
|
|
rewardCnt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable] // 결투장 티어 구조.
|
|
public class dPvpTier : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int condValue;
|
|
|
|
// 보상.
|
|
public int rewardType;
|
|
public int rewardId;
|
|
[SerializeField] private string rewardCnt;
|
|
public BigInteger rewardCount;
|
|
|
|
public eEffectType abilityType1;
|
|
public long abilityValue1;
|
|
public eEffectType abilityType2;
|
|
public long abilityValue2;
|
|
public eEffectType abilityType3;
|
|
public long abilityValue3;
|
|
public eEffectType abilityType4;
|
|
public long abilityValue4;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize() { }
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(rewardCnt))
|
|
rewardCount = BigInteger.Parse(rewardCnt);
|
|
else
|
|
rewardCount = 0L;
|
|
rewardCnt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable] // 결투장 랭킹 구조.
|
|
public class dPvpRank
|
|
{
|
|
public int rank;
|
|
|
|
public string userCode;
|
|
public string playerName;
|
|
public int playerIcon;
|
|
public int playerLv;
|
|
|
|
public int tier;
|
|
public int point;
|
|
|
|
// 적용중인 코스튬.
|
|
public int costumeView;
|
|
public int weaponView;
|
|
public int colorHair;
|
|
public int colorTop;
|
|
public int colorEye;
|
|
}
|
|
|
|
[Serializable] // 결투장 플레이 데이터.
|
|
public class cPvpPlay : ISerializationCallbackReceiver
|
|
{
|
|
public int point;
|
|
public int rewardTier;
|
|
public int rewardWeekly;
|
|
public int ticket;
|
|
|
|
public int weeklyTry;
|
|
public int totalTry;
|
|
public int weeklyClear;
|
|
public int totalClear;
|
|
public int weeklyFail;
|
|
public int totalFail;
|
|
|
|
public int usePreset;
|
|
public int usePetPreset;
|
|
public int useExtraPreset;
|
|
|
|
[SerializeField] private string _refreshAt;
|
|
public DateTime refreshAt;
|
|
|
|
public int availWeeklyIndex; // calculate in client.
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_refreshAt = refreshAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_refreshAt))
|
|
refreshAt = DateTime.ParseExact(_refreshAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_refreshAt = null;
|
|
}
|
|
}
|
|
|
|
[Serializable] // 결투장 스펙 구조.
|
|
public class dPvpSpec : ISerializationCallbackReceiver
|
|
{
|
|
static readonly int _maxAvailableSkillCount = 4;
|
|
|
|
public int playerIcon;
|
|
public int playerLv;
|
|
|
|
public int weaponView;
|
|
public int costumeView;
|
|
public int colorHair;
|
|
public int colorTop;
|
|
public int colorEye;
|
|
|
|
public float speed;
|
|
public float move;
|
|
public float criticalPower;
|
|
public int criticalRate;
|
|
public float skillDamage;
|
|
|
|
[SerializeField] private string attack;
|
|
public BigInteger charAtk;
|
|
|
|
[SerializeField] private string hp;
|
|
public BigInteger charHp;
|
|
|
|
public int usePreset;
|
|
public int usePetPreset;
|
|
public int useExtraPreset;
|
|
public int petMain;
|
|
|
|
public int[] skillPreset = new int[_maxAvailableSkillCount];
|
|
public int[] skillLv = new int[_maxAvailableSkillCount];
|
|
public int[] skillAwaken = new int[_maxAvailableSkillCount];
|
|
|
|
// 클라이언트 계산.
|
|
public float[] skillCool = new float[_maxAvailableSkillCount];
|
|
|
|
public void CalcSkillCool()
|
|
{
|
|
if (skillPreset is null) return;
|
|
for (int i = 0; i < skillCool.Length; ++i)
|
|
{
|
|
if (skillPreset[i] < 0) continue;
|
|
skillCool[i] = DataHandler.GetSkillCool(skillPreset[i]);
|
|
}
|
|
}
|
|
|
|
public static dPvpSpec GetMyBestSpec(int iskillpreset, int ipetpreset, int iextrapreset)
|
|
{
|
|
dPvpSpec data = new dPvpSpec();
|
|
|
|
data.playerIcon = DataHandler.PlayData.playerIcon;
|
|
data.playerLv = DataHandler.PlayData.playerLv;
|
|
data.weaponView = DataHandler.PlayEquipCostume.weaponId;
|
|
data.costumeView = DataHandler.PlayEquipCostume.outfitId;
|
|
data.colorHair = DataHandler.PlayEquipCostume.hairColor;
|
|
data.colorTop = DataHandler.PlayEquipCostume.topColor;
|
|
data.colorEye = DataHandler.PlayEquipCostume.eyeColor;
|
|
|
|
BuffMgr buffbest = BuffMgr.CopyBuffMgr(BuffMgr.Instance);
|
|
|
|
#region Gear
|
|
int[] geartypes = new int[7]
|
|
{
|
|
cGoods.TBagWeapon,
|
|
cGoods.TBagArmorCape,
|
|
cGoods.TBagArmorHat,
|
|
cGoods.TBagArmorShoes,
|
|
cGoods.TBagAcceEar,
|
|
cGoods.TBagAcceNeck,
|
|
cGoods.TBagAcceRing
|
|
};
|
|
|
|
for (int k = 0; k < geartypes.Length; k++)
|
|
{
|
|
int itype = geartypes[k];
|
|
// 보유한 최고 장비.
|
|
int key = DataHandler.GetGearLastHaveId(itype);
|
|
if (key < 0)
|
|
continue;
|
|
dGear gear = DataHandler.GetGearEquip(itype, key);
|
|
|
|
// 장비 효과.
|
|
if (gear.abilityType3 != eEffectType.None)
|
|
{
|
|
long ivalue = gear.abilityValue3 + ((gear.abilityValue3 * gear.abilityValueInc3 / dConst.RateDivideLong) * (gear.level - 1));
|
|
buffbest.SetGearEquip(itype, gear.abilityType3, ivalue, false);
|
|
}
|
|
if (gear.abilityType2 != eEffectType.None)
|
|
{
|
|
long ivalue = gear.abilityValue2 + ((gear.abilityValue2 * gear.abilityValueInc2 / dConst.RateDivideLong) * (gear.level - 1));
|
|
buffbest.SetGearEquip(itype, gear.abilityType2, ivalue, false);
|
|
}
|
|
if (gear.abilityType1 != eEffectType.None)
|
|
{
|
|
long ivalue = gear.abilityValue1 + ((gear.abilityValue1 * gear.abilityValueInc1 / dConst.RateDivideLong) * (gear.level - 1));
|
|
buffbest.SetGearEquip(itype, gear.abilityType1, ivalue, true);
|
|
}
|
|
|
|
// 장비 추가 효과 없음.
|
|
if (gear.awaken <= 1 || gear.extraEffects == null)
|
|
{
|
|
buffbest.SetGearExtra(itype, 2, eEffectType.None, 0L, false);
|
|
buffbest.SetGearExtra(itype, 1, eEffectType.None, 0L, false);
|
|
buffbest.SetGearExtra(itype, 0, eEffectType.None, 0L, false);
|
|
continue;
|
|
}
|
|
|
|
// 장비 추가 효과 적용.
|
|
int[] extras = gear.extraEffects;
|
|
for (int i = extras.Length - 1; i >= 0; i--)
|
|
{
|
|
if (extras[i] < 0)
|
|
{
|
|
buffbest.SetGearExtra(itype, i, eEffectType.None, 0L, false);
|
|
}
|
|
else
|
|
{
|
|
dExtraAbility ability = DataHandler.GetExtraAbility(extras[i]);
|
|
buffbest.SetGearExtra(itype, i, ability.abilityType, ability.abilityValue, false);
|
|
}
|
|
}
|
|
}
|
|
#endregion Gear
|
|
|
|
#region Extra
|
|
data.useExtraPreset = iextrapreset;
|
|
buffbest.AwakenReset();
|
|
for (int i = 0; i < 6; i++)
|
|
{
|
|
if (DataHandler.PlayAwaken.extras[iextrapreset][i] >= 0)
|
|
{
|
|
buffbest.ChangeAwakenStat(
|
|
DataHandler.GetExtraAbility(DataHandler.PlayAwaken.extras[iextrapreset][i]).abilityType,
|
|
DataHandler.GetExtraAbility(DataHandler.PlayAwaken.extras[iextrapreset][i]).abilityValue, false);
|
|
}
|
|
}
|
|
#endregion Extra
|
|
|
|
#region Pet
|
|
data.usePetPreset = ipetpreset;
|
|
data.petMain = DataHandler.PlayData.petPresets[ipetpreset][0];
|
|
|
|
for (int slotindex = 0; slotindex < 3; slotindex++)
|
|
{
|
|
int key = DataHandler.PlayData.petPresets[ipetpreset][slotindex];
|
|
if (key < 0)
|
|
{
|
|
buffbest.SetPetEquip(slotindex, eEffectType.None, 0L, eEffectType.None, 0L, eEffectType.None, 0L, slotindex == 2);
|
|
buffbest.SetPetExtra(slotindex, 2, eEffectType.None, 0L, false);
|
|
buffbest.SetPetExtra(slotindex, 1, eEffectType.None, 0L, false);
|
|
buffbest.SetPetExtra(slotindex, 0, eEffectType.None, 0L, false);
|
|
buffbest.SetPetExtra(slotindex, 3, eEffectType.None, 0L, false);
|
|
continue;
|
|
}
|
|
|
|
dPet pet = DataHandler.GetPet(key);
|
|
|
|
// 펫 장착 효과.
|
|
int ilevel = pet.level - 1;
|
|
buffbest.SetPetEquip(slotindex, pet.abilityType1, ilevel * pet.abilityValueInc1 + pet.abilityValue1,
|
|
pet.abilityType2, ilevel * pet.abilityValueInc2 + pet.abilityValue2, pet.abilityType3, ilevel * pet.abilityValueInc3 + pet.abilityValue3, slotindex == 2);
|
|
|
|
// 펫 추가 효과 없음.
|
|
if (pet.awaken <= 1 || pet.extraEffects == null)
|
|
{
|
|
buffbest.SetPetExtra(slotindex, 2, eEffectType.None, 0L, false);
|
|
buffbest.SetPetExtra(slotindex, 1, eEffectType.None, 0L, false);
|
|
buffbest.SetPetExtra(slotindex, 0, eEffectType.None, 0L, false);
|
|
buffbest.SetPetExtra(slotindex, 3, eEffectType.None, 0L, false);
|
|
continue;
|
|
}
|
|
|
|
// 펫 추가 효과 있음.
|
|
bool bopenoption = true;
|
|
int[] extras = pet.extraEffects;
|
|
for (int i = extras.Length - 1; i >= 0; i--)
|
|
{
|
|
if (extras[i] < 0)
|
|
{
|
|
buffbest.SetPetExtra(slotindex, i, eEffectType.None, 0L, false);
|
|
bopenoption = false;
|
|
}
|
|
else
|
|
{
|
|
dExtraAbility ability = DataHandler.GetExtraAbility(extras[i]);
|
|
buffbest.SetPetExtra(slotindex, i, ability.abilityType, ability.abilityValue, false);
|
|
if (ability.rarity < cGoods.RLegend)
|
|
bopenoption = false;
|
|
}
|
|
}
|
|
|
|
// 옵션 보유 효과.
|
|
if (bopenoption)
|
|
buffbest.SetPetExtra(slotindex, extras.Length, pet.abilityTypeOption, pet.abilityValueOption, false);
|
|
else
|
|
buffbest.SetPetExtra(slotindex, extras.Length, eEffectType.None, 0L, false);
|
|
}
|
|
#endregion Pet
|
|
|
|
#region Skill
|
|
data.usePreset = iskillpreset;
|
|
data.skillPreset = new int[4];
|
|
data.skillLv = new int[4];
|
|
data.skillAwaken = new int[4];
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
data.skillPreset[i] = DataHandler.PlayData.skillPresets[iskillpreset][i];
|
|
dSkillActive skill = DataHandler.GetSkillActive(data.skillPreset[i]);
|
|
if (skill == null)
|
|
continue;
|
|
data.skillLv[i] = skill.level;
|
|
data.skillAwaken[i] = skill.awaken;
|
|
}
|
|
#endregion Skill
|
|
|
|
buffbest.CalcAllStat();
|
|
buffbest.CalcBattlePower();
|
|
|
|
data.speed = buffbest.GetCharSpd();
|
|
data.move = buffbest.GetCharMov();
|
|
data.criticalPower = buffbest.GetCharCrtDam();
|
|
data.criticalRate = buffbest.GetCharCrtRate();
|
|
data.skillDamage = buffbest.GetSkillDamage();
|
|
|
|
data.charAtk = buffbest.GetCharAtkExcAd();
|
|
data.charHp = buffbest.GetCharHp();
|
|
|
|
data.CalcSkillCool();
|
|
|
|
return data;
|
|
}
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
attack = charAtk.ToString();
|
|
hp = charHp.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(attack))
|
|
{
|
|
charAtk = BigInteger.Parse(attack);
|
|
attack = null;
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(hp))
|
|
{
|
|
charHp = BigInteger.Parse(hp);
|
|
hp = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
[Serializable] // 결투장 랭킹.
|
|
public class nPvpRank
|
|
{
|
|
public dPvpRank myRank;
|
|
public dPvpRank[] topRank;
|
|
}
|
|
|
|
[Serializable] // 결투장 입장.
|
|
public class nPvpJoinReturn
|
|
{
|
|
public cPvpPlay playPvp;
|
|
public int vsUserId;
|
|
public dPvpSpec battleInfo;
|
|
public dPvpSpec vsBattleInfo;
|
|
public dPvpRank vsRank;
|
|
}
|
|
|
|
[Serializable] // 결투장 결과 전송.
|
|
public class nPvpBattleRequest : ISerializationCallbackReceiver
|
|
{
|
|
// 상대 유저 ID.
|
|
public int vsUserId;
|
|
// 전투 결과. 1: 승리, 2: 패배.
|
|
public int battleResult;
|
|
// 내가 상대에게 준 데미지 비율.
|
|
public int damageRatio;
|
|
// 상대가 나에게 준 데미지 비율.
|
|
public int vsDamageRatio;
|
|
|
|
// 내가 상대에게 준 총 데미지.
|
|
[SerializeField] private string battleDamage;
|
|
public BigInteger battleDmg;
|
|
|
|
// 상대가 나에게 준 총 데미지.
|
|
[SerializeField] private string vsBattleDamage;
|
|
public BigInteger vsBattleDmg;
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
battleDamage = battleDmg.ToString();
|
|
vsBattleDamage = vsBattleDmg.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(battleDamage))
|
|
battleDmg = BigInteger.Parse(battleDamage);
|
|
else
|
|
battleDmg = 0L;
|
|
battleDamage = null;
|
|
if (!string.IsNullOrEmpty(vsBattleDamage))
|
|
vsBattleDmg = BigInteger.Parse(vsBattleDamage);
|
|
else
|
|
vsBattleDmg = 0L;
|
|
vsBattleDamage = null;
|
|
}
|
|
}
|
|
|
|
[Serializable] // 결투장 결과.
|
|
public class nPvpBattleReturn
|
|
{
|
|
public cPvpPlay playPvp;
|
|
public dPvpRank rankPvp;
|
|
}
|
|
|
|
[Serializable] // 결투장 보상 수령.
|
|
public class nPvpRewReturn
|
|
{
|
|
public cPvpPlay playPvp;
|
|
public cGoodsData playCurrency;
|
|
public nGoods[] result;
|
|
}
|
|
#endregion Pvp
|
|
|
|
#region Notice
|
|
[Serializable]
|
|
public class dNotice : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public int noticeType;
|
|
|
|
public string titleEN;
|
|
public string titleKR;
|
|
public string titleJP;
|
|
//public string titleES;
|
|
//public string titlePT;
|
|
//public string titleDE;
|
|
//public string titleFR;
|
|
//public string titleIT;
|
|
//public string titleRU;
|
|
//public string titleIN;
|
|
//public string titleCN;
|
|
//public string titleTW;
|
|
|
|
public string contentEN;
|
|
public string contentKR;
|
|
public string contentJP;
|
|
//public string contentES;
|
|
//public string contentPT;
|
|
//public string contentDE;
|
|
//public string contentFR;
|
|
//public string contentIT;
|
|
//public string contentRU;
|
|
//public string contentIN;
|
|
//public string contentCN;
|
|
//public string contentTW;
|
|
|
|
[SerializeField] private string _startAt;
|
|
public DateTime startAt;
|
|
|
|
[SerializeField] private string _endAt;
|
|
public DateTime endAt;
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
_startAt = startAt.ToString(FormatString.DateTimeParse);
|
|
_endAt = endAt.ToString(FormatString.DateTimeParse);
|
|
}
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(_startAt))
|
|
startAt = DateTime.ParseExact(_startAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_startAt = null;
|
|
if (!string.IsNullOrEmpty(_endAt))
|
|
endAt = DateTime.ParseExact(_endAt, FormatString.DateTimeParse, System.Globalization.CultureInfo.InvariantCulture);
|
|
_endAt = null;
|
|
}
|
|
|
|
public string GetTitle()
|
|
{
|
|
SystemLanguage lang = SingleMgr.GetSavedLanguage();
|
|
switch (lang)
|
|
{
|
|
case SystemLanguage.Korean: return titleKR;
|
|
case SystemLanguage.Japanese: return titleJP;
|
|
//case SystemLanguage.Spanish:
|
|
//case SystemLanguage.German:
|
|
//case SystemLanguage.French:
|
|
//case SystemLanguage.Russian:
|
|
//case SystemLanguage.Chinese:
|
|
//case SystemLanguage.ChineseSimplified:
|
|
//case SystemLanguage.ChineseTraditional:
|
|
default: return titleEN;
|
|
}
|
|
}
|
|
|
|
public string GetMsg()
|
|
{
|
|
SystemLanguage lang = SingleMgr.GetSavedLanguage();
|
|
switch (lang)
|
|
{
|
|
case SystemLanguage.Korean: return contentKR;
|
|
case SystemLanguage.Japanese: return contentJP;
|
|
//case SystemLanguage.Spanish:
|
|
//case SystemLanguage.German:
|
|
//case SystemLanguage.French:
|
|
//case SystemLanguage.Russian:
|
|
//case SystemLanguage.Chinese:
|
|
//case SystemLanguage.ChineseSimplified:
|
|
//case SystemLanguage.ChineseTraditional:
|
|
default: return contentEN;
|
|
}
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dNoticeDatas
|
|
{
|
|
public dNotice[] sysNotice;
|
|
}
|
|
|
|
[Serializable]
|
|
public class dChatNotice
|
|
{
|
|
public string contentEN;
|
|
public string contentKR;
|
|
public string contentJP;
|
|
//public string contentES;
|
|
//public string contentPT;
|
|
//public string contentDE;
|
|
//public string contentFR;
|
|
//public string contentIT;
|
|
//public string contentRU;
|
|
//public string contentIN;
|
|
//public string contentCN;
|
|
//public string contentTW;
|
|
|
|
public string GetMsg()
|
|
{
|
|
SystemLanguage lang = SingleMgr.GetSavedLanguage();
|
|
switch (lang)
|
|
{
|
|
case SystemLanguage.Korean: return contentKR;
|
|
case SystemLanguage.Japanese: return contentJP;
|
|
//case SystemLanguage.Spanish:
|
|
//case SystemLanguage.German:
|
|
//case SystemLanguage.French:
|
|
//case SystemLanguage.Russian:
|
|
//case SystemLanguage.Chinese:
|
|
//case SystemLanguage.ChineseSimplified:
|
|
//case SystemLanguage.ChineseTraditional:
|
|
default: return contentEN;
|
|
}
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class dChatNoticeDatas
|
|
{
|
|
public dChatNotice[] sysNoticeChat;
|
|
}
|
|
#endregion Notice
|
|
|
|
// 범용 통신.
|
|
#region Common
|
|
// 범용 문자열 ID.
|
|
[Serializable]
|
|
public class nIdStr
|
|
{
|
|
public string id;
|
|
|
|
|
|
public nIdStr() { }
|
|
|
|
public nIdStr(string strid)
|
|
{
|
|
this.id = strid;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nIdCnts
|
|
{
|
|
public int[] sid;
|
|
public int[] cnt;
|
|
|
|
public nIdCnts() { }
|
|
public nIdCnts(int[] _iid)
|
|
{
|
|
sid = _iid;
|
|
}
|
|
|
|
public nIdCnts(int[] _iid, int[] _cnt)
|
|
{
|
|
sid = _iid;
|
|
cnt = _cnt;
|
|
}
|
|
}
|
|
|
|
// 범용 ID, 레벨.
|
|
[Serializable]
|
|
public class nIdLv
|
|
{
|
|
public int sid;
|
|
public int lv;
|
|
|
|
public nIdLv() { }
|
|
|
|
public nIdLv(int iid)
|
|
{
|
|
sid = iid;
|
|
}
|
|
|
|
public nIdLv(int iid, int ilv)
|
|
{
|
|
sid = iid;
|
|
lv = ilv;
|
|
}
|
|
|
|
public static nIdLv[] LocalDatas(int ilen)
|
|
{
|
|
nIdLv[] datas = new nIdLv[ilen];
|
|
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new nIdLv(i + 1, UnityEngine.Random.Range(0, 55));
|
|
}
|
|
|
|
return datas;
|
|
}
|
|
|
|
public static nIdLv[] LocalCharLvPoints()
|
|
{
|
|
nIdLv[] datas = new nIdLv[8];
|
|
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new nIdLv(i + 1, ES3.Load<int>((i + 1).ToString(), 1));
|
|
}
|
|
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
// 범용 long ID, 레벨.
|
|
[Serializable]
|
|
public class nIdlLv
|
|
{
|
|
public long sid;
|
|
public int lv;
|
|
|
|
|
|
public nIdlLv() { }
|
|
|
|
public nIdlLv(long iid)
|
|
{
|
|
this.sid = iid;
|
|
}
|
|
|
|
public nIdlLv(long iid, int ilv)
|
|
{
|
|
this.sid = iid;
|
|
this.lv = ilv;
|
|
}
|
|
}
|
|
|
|
// 범용 ID, 소지, 레벨, 수량, 각성.
|
|
[Serializable]
|
|
public class nIdLvInfo
|
|
{
|
|
public int sid;
|
|
public bool have;
|
|
public int cnt;
|
|
public int lv;
|
|
public int awaken;
|
|
public int[] extras;
|
|
|
|
public nIdLvInfo() { }
|
|
|
|
public nIdLvInfo(int iid)
|
|
{
|
|
this.sid = iid;
|
|
this.lv = 1;
|
|
}
|
|
|
|
public nIdLvInfo(int iid, int icnt)
|
|
{
|
|
this.sid = iid;
|
|
this.have = icnt > 0;
|
|
this.lv = 1;
|
|
this.cnt = icnt;
|
|
}
|
|
|
|
public nIdLvInfo(int iid, bool bhave, int icnt)
|
|
{
|
|
this.sid = iid;
|
|
this.have = bhave;
|
|
this.awaken = 1;
|
|
if (bhave)
|
|
{
|
|
this.lv = 1;
|
|
this.cnt = icnt;
|
|
}
|
|
else
|
|
{
|
|
this.lv = 0;
|
|
this.cnt = 0;
|
|
}
|
|
this.extras = new int[3] { -1, -1, -1 };
|
|
}
|
|
|
|
public static nIdLvInfo[] LocalDatas(int ilen)
|
|
{
|
|
nIdLvInfo[] datas = new nIdLvInfo[ilen];
|
|
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new nIdLvInfo(i + 1, UnityEngine.Random.Range(0, 2) == 1, UnityEngine.Random.Range(1, 20));
|
|
}
|
|
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
// 범용 ID, 수량.
|
|
[Serializable]
|
|
public class nIdCnt
|
|
{
|
|
public int sid;
|
|
public int cnt;
|
|
|
|
public nIdCnt() { }
|
|
|
|
public nIdCnt(int iid)
|
|
{
|
|
this.sid = iid;
|
|
}
|
|
|
|
public nIdCnt(int iid, int icnt)
|
|
{
|
|
this.sid = iid;
|
|
this.cnt = icnt;
|
|
}
|
|
}
|
|
|
|
// 범용 구매, 교환, 이벤트.
|
|
[Serializable]
|
|
public class nIdBuyCnt
|
|
{
|
|
public int sid;
|
|
public int buyCnt; //trade
|
|
public int cnt; //raise
|
|
public int cond; //roulette
|
|
|
|
public nIdBuyCnt() { }
|
|
|
|
public nIdBuyCnt(int iid, int ibuycnt)
|
|
{
|
|
this.sid = iid;
|
|
this.buyCnt = ibuycnt;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nIdSlot
|
|
{
|
|
public int sid;
|
|
public int slot;
|
|
|
|
public int type;
|
|
|
|
|
|
public nIdSlot() { }
|
|
|
|
public nIdSlot(int iid, int islot)
|
|
{
|
|
this.sid = iid;
|
|
this.slot = islot;
|
|
}
|
|
}
|
|
|
|
// 범용 ID, 보유.
|
|
[Serializable]
|
|
public class nIdHave
|
|
{
|
|
public int sid;
|
|
public bool have;
|
|
|
|
|
|
public nIdHave() { }
|
|
|
|
public nIdHave(int iid)
|
|
{
|
|
this.sid = iid;
|
|
}
|
|
|
|
public nIdHave(int iid, bool bhave)
|
|
{
|
|
this.sid = iid;
|
|
this.have = bhave;
|
|
}
|
|
|
|
|
|
|
|
public static nIdHave[] LocalDatas(int ilen)
|
|
{
|
|
nIdHave[] datas = new nIdHave[ilen];
|
|
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new nIdHave(i + 1, i < 5 || UnityEngine.Random.Range(0, 2) == 1);
|
|
}
|
|
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
// 범용 레벨별 확률.
|
|
[Serializable]
|
|
public class nProps
|
|
{
|
|
public int[] lv;
|
|
public int[] props;
|
|
}
|
|
|
|
public class nAchivement
|
|
{
|
|
// eContentType 획득 컨텐츠 분류
|
|
// eCondition 획득 방법
|
|
public eContentType contentType;
|
|
public eCondition condition;
|
|
public int id;
|
|
public int condValue;
|
|
|
|
public nAchivement() { }
|
|
|
|
public nAchivement(eContentType type, eCondition cond, int ivalue, int iid)
|
|
{
|
|
contentType = type;
|
|
condition = cond;
|
|
condValue = ivalue;
|
|
id = iid;
|
|
}
|
|
|
|
public nAchivement(dQuest quest, eContentType content)
|
|
{
|
|
contentType = content;
|
|
condition = quest.condType;
|
|
condValue = quest.condValue;
|
|
id = quest.id;
|
|
}
|
|
|
|
public nAchivement(dTitle title)
|
|
{
|
|
contentType = eContentType.Title;
|
|
condition = title.condType;
|
|
condValue = title.condValue;
|
|
id = title.id;
|
|
}
|
|
|
|
public nAchivement(dIcon icon)
|
|
{
|
|
contentType = eContentType.Icon;
|
|
condition = icon.condType;
|
|
condValue = icon.condValue;
|
|
id = icon.id;
|
|
}
|
|
|
|
public nAchivement(dMission mission)
|
|
{
|
|
contentType = eContentType.QuestMission;
|
|
condition = mission.condType;
|
|
condValue = mission.condValue;
|
|
id = mission.id;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class nIdGuaardianSlot
|
|
{
|
|
public int guardianType;
|
|
public int slot;
|
|
public nIdGuaardianSlot(int iid, int islot)
|
|
{
|
|
this.guardianType = iid;
|
|
this.slot = islot;
|
|
}
|
|
}
|
|
|
|
// 재화/아이템.
|
|
[Serializable]
|
|
public class nGoods : ISerializationCallbackReceiver, ICloneable
|
|
{
|
|
public int propertyType;
|
|
public int propertyId;
|
|
|
|
[SerializeField] protected string propertyCnt;
|
|
public BigInteger propertyCount;
|
|
|
|
public nGoods() { }
|
|
|
|
public nGoods(int itype, int icode, BigInteger icnt)
|
|
{
|
|
propertyType = itype;
|
|
propertyId = icode;
|
|
propertyCount = icnt;
|
|
}
|
|
|
|
public nGoods(nReward reward)
|
|
{
|
|
propertyType = reward.rewardType;
|
|
propertyId = reward.rewardId;
|
|
propertyCount = reward.rewardCount;
|
|
}
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (propertyCount != null)
|
|
propertyCnt = propertyCount.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(propertyCnt))
|
|
propertyCount = BigInteger.Parse(propertyCnt);
|
|
else
|
|
propertyCount = 0L;
|
|
propertyCnt = null;
|
|
}
|
|
|
|
public object Clone() => new nGoods(propertyType, propertyId, propertyCount);
|
|
|
|
public bool IsSameGoods(nGoods other) => IsSameGoods(this, other);
|
|
|
|
public static bool IsSameGoods(nGoods goods1, nGoods goods2)
|
|
{
|
|
if (goods1 == null || goods2 == null)
|
|
return false;
|
|
return goods1.propertyType == goods2.propertyType && goods1.propertyId == goods2.propertyId;
|
|
}
|
|
|
|
public static int CompareByID(nGoods goods1, nGoods goods2) => goods1.propertyId.CompareTo(goods2.propertyId);
|
|
}
|
|
|
|
// 재화/아이템.
|
|
[Serializable]
|
|
public class nReward : ISerializationCallbackReceiver
|
|
{
|
|
public int rewardType;
|
|
public int rewardId;
|
|
[SerializeField] private string rewardCnt;
|
|
public BigInteger rewardCount { get; set; }
|
|
|
|
public nReward() { }
|
|
|
|
public nReward(int itype, int icode, BigInteger icnt)
|
|
{
|
|
this.rewardType = itype;
|
|
this.rewardId = icode;
|
|
this.rewardCount = icnt;
|
|
}
|
|
|
|
// Object->Json 변환시 자동 호출.
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if (rewardCount != null)
|
|
rewardCnt = rewardCount.ToString();
|
|
}
|
|
|
|
// Json->Object 변환시 자동 호출.
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(rewardCnt))
|
|
rewardCount = BigInteger.Parse(rewardCnt);
|
|
else
|
|
rewardCount = 0L;
|
|
rewardCnt = null;
|
|
}
|
|
|
|
public override string ToString() => FormatString.GetRewardType(rewardType, rewardId);
|
|
}
|
|
|
|
[Serializable]
|
|
public class nRewardLimit : nReward
|
|
{
|
|
public int id;
|
|
public int limitCnt;
|
|
public int cnt;
|
|
public int price;
|
|
public int prop;
|
|
|
|
public nRewardLimit() { }
|
|
|
|
public nRewardLimit(int itype, int icode, BigInteger icnt)
|
|
{
|
|
this.rewardType = itype;
|
|
this.rewardId = icode;
|
|
this.rewardCount = icnt;
|
|
}
|
|
}
|
|
|
|
// 재화/아이템 목록.
|
|
[Serializable]
|
|
public class nGoodsGet
|
|
{
|
|
public cPlayData playUser;
|
|
public cGoodsData playCurrency;
|
|
public nGoods[] result;
|
|
}
|
|
|
|
// 강화 결과.
|
|
[Serializable]
|
|
public class nLvUp
|
|
{
|
|
public cPlayData playUser;
|
|
public cGoodsData playCurrency;
|
|
public nIdLvInfo result;
|
|
}
|
|
|
|
// 범용 희귀도.
|
|
[Serializable]
|
|
public class nRarity
|
|
{
|
|
public int rarity;
|
|
|
|
public nRarity() { }
|
|
|
|
public nRarity(int irarity)
|
|
{
|
|
this.rarity = irarity;
|
|
}
|
|
|
|
public nRarity(fRangeRarity irarity)
|
|
{
|
|
this.rarity = (int)irarity;
|
|
}
|
|
}
|
|
|
|
//범용 난이도
|
|
[Serializable]
|
|
public class nDiffs : ISerializationCallbackReceiver
|
|
{
|
|
public int id;
|
|
public string hp;
|
|
public BigInteger monHp;
|
|
public int hpInc;
|
|
public string atk;
|
|
public BigInteger monAtk;
|
|
public nReward[] rewards;
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
if (!string.IsNullOrEmpty(hp))
|
|
monHp = BigInteger.Parse(hp);
|
|
else
|
|
monHp = 0L;
|
|
hp = null;
|
|
if (!string.IsNullOrEmpty(atk))
|
|
monAtk = BigInteger.Parse(atk);
|
|
else
|
|
monAtk = 0L;
|
|
atk = null;
|
|
}
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
if(monHp != null)
|
|
hp = monHp.ToString();
|
|
if(monAtk != null)
|
|
atk = monAtk.ToString();
|
|
}
|
|
}
|
|
#endregion Common
|
|
|
|
// 범용 통신 - 서버 요청 및 응답.
|
|
#region Common Request & Return
|
|
// 범용 레벨업.
|
|
[Serializable]
|
|
public class nIdEnhance
|
|
{
|
|
public int sid;
|
|
public int befLv;
|
|
public int aftLv;
|
|
public int befCnt;
|
|
public int aftCnt;
|
|
|
|
public int tryCount;
|
|
public int useGoods;
|
|
|
|
|
|
public nIdEnhance(int iid, int ibeflv)
|
|
{
|
|
this.sid = iid;
|
|
this.befLv = ibeflv;
|
|
this.aftLv = ibeflv;
|
|
}
|
|
|
|
public nIdEnhance(int iid, int ibeflv, int ibefcnt)
|
|
{
|
|
this.sid = iid;
|
|
this.befLv = ibeflv;
|
|
this.aftLv = ibeflv;
|
|
this.befCnt = ibefcnt;
|
|
this.aftCnt = ibefcnt;
|
|
}
|
|
}
|
|
|
|
// 범용 희귀도별 확률.
|
|
[Serializable]
|
|
public class dExtraRarity
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public int prop;
|
|
|
|
public static dExtraRarity[] LocalDatas()
|
|
{
|
|
dExtraRarity[] datas = new dExtraRarity[7];
|
|
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new dExtraRarity();
|
|
datas[i].id = i + 1;
|
|
datas[i].rarity = i + 1;
|
|
}
|
|
|
|
datas[0].prop = 600000;
|
|
datas[1].prop = 300000;
|
|
datas[2].prop = 72000;
|
|
datas[3].prop = 20000;
|
|
datas[4].prop = 5000;
|
|
datas[5].prop = 3000;
|
|
datas[6].prop = 1000;
|
|
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
// 범용 효과.
|
|
[Serializable]
|
|
public class dExtraAbility
|
|
{
|
|
public int id;
|
|
public int rarity;
|
|
public eEffectType abilityType;
|
|
public int abilityValue;
|
|
public int abilityInc;
|
|
|
|
public static dExtraAbility[] LocalDatas()
|
|
{
|
|
dExtraAbility[] datas = new dExtraAbility[35];
|
|
|
|
for (int i = 0; i < datas.Length / 5; i++)
|
|
{
|
|
for (int j = 0; j < 5; j++)
|
|
{
|
|
datas[(i * 5) + j] = new dExtraAbility();
|
|
datas[(i * 5) + j].id = i * 5 + j + 1;
|
|
datas[(i * 5) + j].rarity = i + 1;
|
|
datas[(i * 5) + j].abilityType = (eEffectType)(j + 3);
|
|
datas[(i * 5) + j].abilityValue = (i + 1) * 10000;
|
|
datas[(i * 5) + j].abilityInc = 0;
|
|
}
|
|
}
|
|
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
// 범용 각성 정보.
|
|
[Serializable]
|
|
public class dAwaken
|
|
{
|
|
public int maxLv;
|
|
// 각성에 필요한 장비.
|
|
// 장비 각성은 해당 장비, 이전 장비1, 이전 장비2.
|
|
// 스킬 각성은 스킬과 같은 등급의 모자, 망토, 신발. 각성 단계에 따라 2성, 3성, 4성이 필요.
|
|
public int buyingCnt1;
|
|
public int buyingCnt2;
|
|
public int buyingCnt3;
|
|
public int AwakenStoneCnt;
|
|
// 스킬 각성 단계에 따른 쿨 감소.
|
|
public int coolTimeDec;
|
|
}
|
|
|
|
// 범용 레벨 총합별 값.
|
|
[Serializable]
|
|
public class dTotalLvValue
|
|
{
|
|
public int totalLv;
|
|
public int value;
|
|
}
|
|
#endregion Common Request & Return
|
|
|
|
// 기타.
|
|
#region Etc.
|
|
// 범용 ID, 레벨.
|
|
[Serializable]
|
|
public class nToken
|
|
{
|
|
public string accessToken;
|
|
public int server;
|
|
|
|
public nToken(string strtoken)
|
|
{
|
|
this.accessToken = strtoken;
|
|
}
|
|
|
|
public nToken(string strtoken, int iserver)
|
|
{
|
|
this.accessToken = strtoken;
|
|
this.server = iserver;
|
|
}
|
|
}
|
|
|
|
// 쿠폰.
|
|
[Serializable]
|
|
public class nCoupon
|
|
{
|
|
public string code;
|
|
|
|
|
|
public nCoupon(string strcode)
|
|
{
|
|
this.code = strcode;
|
|
}
|
|
}
|
|
|
|
// 어드레서블 관리.
|
|
public class jAddrCnt<T>
|
|
{
|
|
public bool isLoading = true;
|
|
public int loadCnt = 0;
|
|
public AsyncOperationHandle<T> handle;
|
|
}
|
|
|
|
[Serializable]
|
|
public class nNameChangeReturn
|
|
{
|
|
public cPlayData playUser;
|
|
public cGoodsData playCurrency;
|
|
public cTotalRecord playRecordTotal;
|
|
//public nGoods[] result;
|
|
}
|
|
#endregion Etc.
|
|
|
|
|
|
#region Chat
|
|
[Serializable]
|
|
public class BlockUser
|
|
{
|
|
public string UserId;
|
|
public string PlayerName;
|
|
|
|
public BlockUser() { }
|
|
|
|
public BlockUser(string uid, string strname)
|
|
{
|
|
UserId = uid;
|
|
PlayerName = strname;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class BlockUsers
|
|
{
|
|
public BlockUser[] items;
|
|
|
|
public BlockUsers() { }
|
|
|
|
public BlockUsers(BlockUser[] values)
|
|
{
|
|
items = values;
|
|
}
|
|
}
|
|
#endregion Chat
|
|
|
|
|
|
#region Trip & Life
|
|
public class dTrip
|
|
{
|
|
public int id;
|
|
public int idx;
|
|
public int tripPieceCount;
|
|
public bool[] islock = null;
|
|
public string txt;
|
|
|
|
public static dTrip[][] LocalDatas()
|
|
{
|
|
dTrip[][] datas = new dTrip[DataHandler.Const.TripChapterMaxsize][];
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new dTrip[DataHandler.Const.TripMaxsize];
|
|
for (int j = 0; j< datas[i].Length; j++)
|
|
{
|
|
datas[i][j] = new dTrip();
|
|
datas[i][j].id = i;
|
|
datas[i][j].idx = j;
|
|
datas[i][j].tripPieceCount = 0;
|
|
datas[i][j].islock = new bool[DataHandler.Const.TripPieceMaxsize];
|
|
datas[i][j].txt = LocalizationText.GetText("diary_trip" + (i+1) + "_" + (j+1));
|
|
for (int k = 0; k < DataHandler.Const.TripPieceMaxsize; k++)
|
|
{
|
|
datas[i][j].islock[k] = false;
|
|
}
|
|
}
|
|
}
|
|
return datas;
|
|
}
|
|
}
|
|
|
|
|
|
public class dLife
|
|
{
|
|
public int id;
|
|
public int idx;
|
|
public int lifePieceCount;
|
|
public bool[] islock = null;
|
|
public string txt;
|
|
|
|
public static dLife[][] LocalDatas()
|
|
{
|
|
dLife[][] datas = new dLife[DataHandler.Const.LifeChapterMaxsize][];
|
|
for (int i = 0; i < datas.Length; i++)
|
|
{
|
|
datas[i] = new dLife[DataHandler.Const.LifeMaxsize];
|
|
for (int j = 0; j < datas[i].Length; j++)
|
|
{
|
|
datas[i][j] = new dLife();
|
|
datas[i][j].id = i;
|
|
datas[i][j].idx = j;
|
|
datas[i][j].lifePieceCount = 0;
|
|
datas[i][j].islock = new bool[DataHandler.Const.LifePieceMaxsize];
|
|
datas[i][j].txt = LocalizationText.GetText("diary_life" + (i + 1) + "_" + (j + 1));
|
|
for (int k = 0; k < DataHandler.Const.LifePieceMaxsize; k++)
|
|
{
|
|
datas[i][j].islock[k] = false;
|
|
}
|
|
}
|
|
}
|
|
return datas;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region Json Utility
|
|
[Serializable] // List<T>
|
|
public class Serialization<T>
|
|
{
|
|
[SerializeField] List<T> items;
|
|
|
|
|
|
public List<T> ToList()
|
|
{
|
|
return items;
|
|
}
|
|
|
|
|
|
public Serialization(List<T> items)
|
|
{
|
|
this.items = items;
|
|
}
|
|
|
|
|
|
public Serialization(T[] items)
|
|
{
|
|
this.items = new List<T>(items);
|
|
}
|
|
}
|
|
|
|
[Serializable] // Dictionary<TKey, TValue>
|
|
public class Serialization<TKey, TValue> : ISerializationCallbackReceiver
|
|
{
|
|
[SerializeField] TKey[] keys;
|
|
[SerializeField] TValue[] values;
|
|
|
|
Dictionary<TKey, TValue> items;
|
|
public Dictionary<TKey, TValue> ToDictionary() { return items; }
|
|
|
|
|
|
public Serialization(Dictionary<TKey, TValue> items)
|
|
{
|
|
this.items = items;
|
|
}
|
|
|
|
|
|
public void OnBeforeSerialize()
|
|
{
|
|
keys = new List<TKey>(items.Keys).ToArray();
|
|
values = new List<TValue>(items.Values).ToArray();
|
|
}
|
|
|
|
|
|
public void OnAfterDeserialize()
|
|
{
|
|
int count = Math.Min(keys.Length, values.Length);
|
|
items = new Dictionary<TKey, TValue>(count);
|
|
for (int i = 0; i < count; ++i)
|
|
{
|
|
if (!items.ContainsKey(keys[i]))
|
|
items.Add(keys[i], values[i]);
|
|
}
|
|
}
|
|
}
|
|
#endregion Json Utility
|
|
|
|
}
|