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.
288 lines
10 KiB
288 lines
10 KiB
using System;
|
|
|
|
namespace IVServerFormat
|
|
{
|
|
#region URL
|
|
public static class UrlApi
|
|
{
|
|
#region URL Base
|
|
private static System.Text.StringBuilder sb = new System.Text.StringBuilder(128);
|
|
|
|
#if UNITY_EDITOR
|
|
public static string _PreUrl = "http://223.130.140.241/api/";
|
|
public static string _AssetPreUrl = "https://kr.object.ncloudstorage.com/zombie-good-dev/";
|
|
#else
|
|
public static string _PreUrl = "http://223.130.140.241/api/";
|
|
public static string _AssetPreUrl = "https://kr.object.ncloudstorage.com/zombie-good-dev/";
|
|
#endif
|
|
|
|
public const string AsLocalize = "Localization.xml";
|
|
public const string AsBanWord = "BanWord.xml";
|
|
public const string AsImageList = "ImgList.txt";
|
|
public const string AsEventImage = "event/{0}";
|
|
#endregion URL Base
|
|
|
|
public static string GetAssetUrl(string url)
|
|
{
|
|
sb.Length = 0;
|
|
sb.Append(_AssetPreUrl);
|
|
sb.Append(url);
|
|
return sb.ToString();
|
|
}
|
|
|
|
public static string GetUrl(string url)
|
|
{
|
|
sb.Length = 0;
|
|
sb.Append(_PreUrl);
|
|
sb.Append(url);
|
|
return sb.ToString();
|
|
}
|
|
|
|
public const string ResetMission = "test/resetmission";
|
|
public const string Property = "test/property";
|
|
public const string Refresh = "test/refresh";
|
|
public const string ResetGoodsAll = "test/resetproperty";
|
|
public const string ResetGoods = "test/resetpropertybyid";
|
|
|
|
public const string Time = "game/time";
|
|
public const string GameVer = "game/info";
|
|
public const string MasterLogin = "game/master/login";
|
|
public const string Login = "game/login";
|
|
public const string System = "game/system";
|
|
public const string Play = "game/play";
|
|
|
|
public const string MailList = "mail/info";
|
|
public const string MailReadOne = "mail/readone";
|
|
public const string MailReadAll = "mail/readall";
|
|
public const string MailReadList = "mail/past";
|
|
|
|
public const string GoldEnhance = "char/enhance/gold";
|
|
public const string PointEnhance = "char/enhance/point";
|
|
public const string PointReset = "char/enhance/point/reset";
|
|
public const string AwakenUp = "awaken";
|
|
public const string AwakenEnhance = "awaken/change";
|
|
|
|
public const string BagGearEquip = "gear/";
|
|
public const string BagGearEnhance = "gear/enhance/";
|
|
public const string BagGearAwaken = "gear/awaken/";
|
|
public const string BagGearCompose = "gear/compose/";
|
|
public const string BagGearComposeAll = "gear/compose/{0}all";
|
|
public const string BagGearEfcAdd = "gear/extra/";
|
|
public const string BagTreasureEnhance = "gear/enhance/treasure";
|
|
public const string BagTreasureSell = "gear/treasure/sell";
|
|
public const string BagConsume = "box/open";
|
|
|
|
public const string BagWeapon = "weapon";
|
|
public const string BagCape = "cape";
|
|
public const string BagHat = "hat";
|
|
public const string BagShoes = "shoes";
|
|
public const string BagEar = "earring";
|
|
public const string BagNeck = "necklace";
|
|
public const string BagRing = "ring";
|
|
public const string BagTreasure = "treasure";
|
|
|
|
public const string ProfileIcon = "profile/icon";
|
|
public const string ProfileTitle = "profile/title";
|
|
public const string ProfileIconChange = "profile/change/icon";
|
|
public const string ProfileTitleChange = "profile/change/title";
|
|
|
|
public const string QuestDaily = "quest/daily";
|
|
public const string QuestRepeat = "quest/repeat";
|
|
public const string QuestDailyAll = "quest/dailyall";
|
|
public const string QuestRepeatAll = "quest/repeatall";
|
|
public const string QuestEventGrow = "event/mission";
|
|
public const string QuestEventGrowAll = "event/missionAll";
|
|
|
|
public const string QuestMission = "mission";
|
|
|
|
public const string SkillEnhanceActive = "skill/enhance/active";
|
|
public const string SkillEnhancePassive = "skill/enhance/passive";
|
|
public const string SkillAwakenActive = "skill/awaken";
|
|
|
|
public const string PetEnhance = "pet/enhance";
|
|
public const string PetAwaken = "pet/awaken";
|
|
public const string PetEfcAdd = "pet/extra";
|
|
public const string PetSpiritCompose = "pet/compose";
|
|
public const string PetSpiritComposeAll = "pet/composeall";
|
|
|
|
public const string DungeonGold = "dg/gold";
|
|
public const string DungeonReinStone = "dg/reinstone";
|
|
public const string DungeonPet = "dg/pet";
|
|
public const string DungeonAwakenStone = "dg/awakenstone";
|
|
public const string DungeonAwaken = "dg/awaken";
|
|
public const string DungeonRelic = "dg/relic";
|
|
public const string DungeonGuardian = "guardian/dg";
|
|
public const string GuardianGrow = "guardian/growth";
|
|
public const string GuardianAwaken = "guardian/extra";
|
|
|
|
public const string MaskEnhance = "relic/enhance";
|
|
|
|
public const string GachaWeapon = "gacha/weapon/";
|
|
public const string GachaArmor = "gacha/armor/";
|
|
public const string GachaAcce = "gacha/acc/";
|
|
public const string GachaTreasure = "gacha/treasure/";
|
|
public const string GachaRewardWeapon = "gacha/reward/weapon";
|
|
public const string GachaRewardArmor = "gacha/reward/armor";
|
|
public const string GachaRewardAcce = "gacha/reward/acc";
|
|
|
|
public const string CosClothEquip = "costume/outfit";
|
|
public const string CosWeaponEquip = "costume/weapon";
|
|
public const string ColorSet = "costume/color";
|
|
public const string ColorComposeHair = "costume/compose/hair";
|
|
public const string ColorComposeTop = "costume/compose/top";
|
|
public const string ColorComposeEye = "costume/compose/eye";
|
|
public const string ColorPaletteOpenHair = "costume/slot/hair";
|
|
public const string ColorPaletteOpenTop = "costume/slot/top";
|
|
public const string ColorPaletteOpenEye = "costume/slot/eye";
|
|
public const string ColorPaletteHair = "costume/palette/hair";
|
|
public const string ColorPaletteTop = "costume/palette/top";
|
|
public const string ColorPaletteEye = "costume/palette/eye";
|
|
|
|
public const string SaveData = "user/save";
|
|
public const string Notice = "game/notice";
|
|
public const string ChatNotice = "game/noticechat";
|
|
|
|
public const string SaveAdBuffLevel = "buff/up";
|
|
public const string Attend = "attend/info";
|
|
public const string AttendGet = "attend/get";
|
|
|
|
// 이하 URL 수정 필요.
|
|
//public const string Attend = "refresh/attend";
|
|
public const string GetTime = "game/time";
|
|
public const string SaveGold = "user/currency/save";
|
|
|
|
public const string NameCheck = "user/player-name/check";
|
|
public const string NameSave = "user/player-name";
|
|
public const string NameChange = "user/rename";
|
|
public const string Coupon = "coupon/use";
|
|
|
|
public const string StageSave = "user/stage/save";
|
|
|
|
public const string CurrentStageSave = "user/stage";
|
|
|
|
public const string ShopBuy = "shop/buy";
|
|
public const string PassReward = "pass/reward";
|
|
|
|
public const string PvpRank = "pvp/rank";
|
|
public const string PvpSpec = "pvp/spec";
|
|
public const string PvpJoin = "pvp/join";
|
|
public const string PvpResult = "pvp/result";
|
|
public const string PvpRew = "pvp/reward/mission";
|
|
public const string PvpTierRew = "pvp/reward/tier";
|
|
|
|
public const string EventTrade = "event/trade";
|
|
public const string EventRaise = "event/raise/{0}";
|
|
public const string EventRoulette = "event/roulette/{0}";
|
|
public const string EventRouletteCountReward = "event/roulette";
|
|
public const string EventReward = "event/reward";
|
|
|
|
public const string DeleteServer = "game/removedata";
|
|
public const string DeleteAccount = "game/removeaccount";
|
|
}
|
|
#endregion URL
|
|
|
|
|
|
#region Response
|
|
public class ResCode
|
|
{
|
|
public const int NONE = -99;
|
|
public const int SUCCESS = 200;
|
|
public const int SUCCESS2 = 201;
|
|
|
|
public const int INVALID_REQUEST_FORMAT = 400;
|
|
public const int INVALID_TOKEN = 401;
|
|
public const int NO_AUTHORITY = 403;
|
|
public const int NO_FILE = 404;
|
|
|
|
public const int AWS_EXCEPTION = 500;
|
|
public const int API_EXCEPTION = 503;
|
|
}
|
|
|
|
public enum eErrorCode
|
|
{
|
|
NONE = 0,
|
|
NULL_OR_EMPTY = -1,
|
|
UNKNOWN = -99,
|
|
DISPOSED = -98,
|
|
|
|
PARSE_ERROR = -100,
|
|
DATA_ERROR = -101,
|
|
INVALID_USER = -189,
|
|
NETWORK_RESTART = 199,
|
|
|
|
#region 400
|
|
BAD_REQUEST_VALIDATION = 40000,
|
|
NOT_ENOUGH_CURRENCY = 40010,
|
|
FAILED_PURCHASE = 40011,
|
|
NOT_MATCHED_USERDATA = 40020,
|
|
NOT_MATCHED_QUEST = 40021,
|
|
NOT_MATCHED_STAGE = 40022,
|
|
DUPLICATED_NAME = 40024,
|
|
FORBIDDEN_NAME = 40025,
|
|
NOT_MATCHED_SPEC = 40030,
|
|
NOT_ENOUGH_DG_JOIN = 40090,
|
|
NOT_MATCHED_DG_DIFF = 40091,
|
|
|
|
UNAUTHORIZED_ACCESS_TOKEN = 40101,
|
|
FORBIDDEN_OS = 40301,
|
|
FORBIDDEN_GAME_VERSION_FORMAT = 40311,
|
|
FORBIDDEN_GAME_VERSION = 40312,
|
|
FORBIDDEN_GAME_MAINTENANCE = 40313,
|
|
FORBIDDEN_BAN_USER = 40331,
|
|
FORBIDDEN_ACCESS_TOKEN = 40332,
|
|
MULTI_CONNECTION = 40333,
|
|
FORBIDDEN_NOT_ALLOWED = 40399,
|
|
EMPTY_DATA = 40401,
|
|
NOT_OPEN_PVP = 40481,
|
|
#endregion 400
|
|
|
|
#region 500
|
|
UNABLE_REWARD = 102,
|
|
COUPON_INVALID = 103,
|
|
|
|
DB_ROLLBACK = 50001,
|
|
DUPLICATED_NAME_UPDATE = 50001,
|
|
DEFAULT_INTERNAL_ERROR = 50099
|
|
#endregion 500
|
|
}
|
|
|
|
[Serializable]
|
|
public class SvError
|
|
{
|
|
public int status;
|
|
public eErrorCode code;
|
|
public string message;
|
|
|
|
public SvError(eErrorCode errtype)
|
|
{
|
|
if (errtype == eErrorCode.NONE)
|
|
{
|
|
status = ResCode.SUCCESS;
|
|
this.code = errtype;
|
|
}
|
|
else
|
|
{
|
|
status = ResCode.NONE;
|
|
this.code = errtype;
|
|
}
|
|
}
|
|
}
|
|
#endregion Response
|
|
|
|
|
|
[Serializable]
|
|
public class ABInfo
|
|
{
|
|
public int Type;
|
|
public string Name;
|
|
public string HashVersion;
|
|
public long Size;
|
|
}
|
|
|
|
[Serializable]
|
|
public class ABInfoList
|
|
{
|
|
public int AssetVersion;
|
|
public ABInfo[] items;
|
|
}
|
|
}
|