Beispiel #1
0
        public CharacterCostume(CostumeInfo c, string name)
        {
            this.Id                   = ObjectId.GenerateNewId();
            this.CharacterID          = name;
            this.BodyPaintingMode     = c.BodyPaintingMode;
            this.BodyPaintingClip     = c.BodyPaintingClip;
            this.BodyPaintingSide     = c.BodyPaintingSide;
            this.BodyPaintingSize     = c.BodyPaintingSize;
            this.BodyPaintingRotation = c.BodyPaintingRotation;
            this.BodyPaintingPosY     = c.BodyPaintingPosY;
            this.BodyPaintingPosX     = c.BodyPaintingPosX;
            this.VIPCode              = c.VIPCode;
            this.IsReturn             = c.IsReturn;
            this.CafeType             = c.CafeType;
            this.HideHeadCostume      = c.HideHeadCostume;
            this.PaintingSize         = c.PaintingSize;
            this.PaintingRotation     = c.PaintingRotation;
            this.PaintingPosY         = c.PaintingPosY;
            this.PaintingPosX         = c.PaintingPosX;
            this.Bust                 = c.Bust;
            this.Height               = c.Height;
            this.Shineness            = c.Shineness;

            this.DecorationColorInfo = DictToBsonDoc <int, int>(c.DecorationColorInfo);
            this.DecorationInfo      = DictToBsonDoc <int, int>(c.DecorationInfo);
            this.EffectInfo          = DictToBsonDoc <int, int>(c.EffectInfo);
            this.PollutionInfo       = DictToBsonDoc <int, byte>(c.PollutionInfo);
            this.AvatarHideInfo      = DictToBsonDoc <int, int>(c.AvatarHideInfo);
            this.AvatarInfo          = DictToBsonDoc <int, bool>(c.AvatarInfo);
            this.ColorInfo           = DictToBsonDoc <int, int>(c.ColorInfo);
            this.CostumeTypeInfo     = DictToBsonDoc <int, int>(c.CostumeTypeInfo);
            this.BodyShapeInfo       = DictToBsonDoc <int, float>(c.BodyShapeInfo);
            this.TownEffect          = c.TownEffect;
        }
    // 일단은 이렇게
    public CostumeInfo GetCostumeByChar(ulong charIdx)
    {
        Dictionary <ulong, CostumeInfo> .ValueCollection values = costumeDic.Values;

        for (int i = 0; i < values.Count; i++)
        {
            CostumeInfo info = values.ElementAt(i);
            if (info.c_usn == charIdx)
            {
                return(info);
            }
        }

        return(null);
    }
 public void AddCostume(CostumeInfo info, bool overwrite = true)
 {
     if (costumeDic.ContainsKey(info.c_usn))
     {
         if (overwrite)
         {
             costumeDic[info.c_usn].Set(info);
         }
         else
         {
             costumeDic[info.c_usn] = info;
         }
     }
     else
     {
         costumeDic.Add(info.c_usn, info);
     }
 }
    public void LoadLowData()
    {
        {
            TextAsset    data    = Resources.Load("TestJson/Item_Costume", typeof(TextAsset)) as TextAsset;
            StringReader sr      = new StringReader(data.text);
            string       strSrc  = sr.ReadToEnd();
            JSONObject   Costume = new JSONObject(strSrc);

            for (int i = 0; i < Costume.list.Count; i++)
            {
                CostumeInfo tmpInfo = new CostumeInfo();
                tmpInfo.Id               = (uint)Costume[i]["Id_ui"].n;
                tmpInfo.NameId           = (uint)Costume[i]["NameId_ui"].n;
                tmpInfo.DescriptionId    = (uint)Costume[i]["DescriptionId_ui"].n;
                tmpInfo.Class            = (byte)Costume[i]["Class_b"].n;
                tmpInfo.Faceprefab       = Costume[i]["Faceprefab_c"].str;
                tmpInfo.Bodyprefab       = Costume[i]["Bodyprefab_c"].str;
                tmpInfo.Weaprefab        = Costume[i]["Weaprefab_c"].str;
                tmpInfo.LeftWeaDummy     = Costume[i]["LeftWeaDummy_c"].str;
                tmpInfo.RightWeaDummy    = Costume[i]["RightWeaDummy_c"].str;
                tmpInfo.Icon             = (uint)Costume[i]["Icon_ui"].n;
                tmpInfo.LimitLevel       = (byte)Costume[i]["LimitLevel_b"].n;
                tmpInfo.ShardIdx         = (uint)Costume[i]["ShardIdx_ui"].n;
                tmpInfo.NeedShardValue   = (uint)Costume[i]["NeedShardValue_ui"].n;
                tmpInfo.BasicGrade       = (byte)Costume[i]["BasicGrade_b"].n;
                tmpInfo.BasicOptionIndex = (uint)Costume[i]["BasicOptionIndex_ui"].n;
                tmpInfo.evolveId         = (uint)Costume[i]["evolveId_ui"].n;

                CostumeInfoDic.Add(tmpInfo.Id, tmpInfo);
            }
        }

        {
            TextAsset    data      = Resources.Load("TestJson/Item_Equipment", typeof(TextAsset)) as TextAsset;
            StringReader sr        = new StringReader(data.text);
            string       strSrc    = sr.ReadToEnd();
            JSONObject   Equipment = new JSONObject(strSrc);

            for (int i = 0; i < Equipment.list.Count; i++)
            {
                EquipmentInfo tmpInfo = new EquipmentInfo();
                tmpInfo.Id               = (uint)Equipment[i]["Id_ui"].n;
                tmpInfo.EquipSetId       = (ushort)Equipment[i]["EquipSetId_us"].n;
                tmpInfo.SerialId         = (ushort)Equipment[i]["SerialId_us"].n;
                tmpInfo.NameId           = (uint)Equipment[i]["NameId_ui"].n;
                tmpInfo.DescriptionId    = (uint)Equipment[i]["DescriptionId_ui"].n;
                tmpInfo.Type             = (byte)Equipment[i]["Type_b"].n;
                tmpInfo.prefab           = Equipment[i]["prefab_c"].str;
                tmpInfo.LeftWeaDummy     = Equipment[i]["LeftWeaDummy_c"].str;
                tmpInfo.RightWeaDummy    = Equipment[i]["RightWeaDummy_c"].str;
                tmpInfo.Class            = (byte)Equipment[i]["Class_b"].n;
                tmpInfo.UseParts         = (byte)Equipment[i]["UseParts_b"].n;
                tmpInfo.LimitLevel       = (byte)Equipment[i]["LimitLevel_b"].n;
                tmpInfo.Grade            = (byte)Equipment[i]["Grade_b"].n;
                tmpInfo.SetType          = (byte)Equipment[i]["SetType_b"].n;
                tmpInfo.Icon             = (uint)Equipment[i]["Icon_ui"].n;
                tmpInfo.SellPrice        = (ushort)Equipment[i]["SellPrice_us"].n;
                tmpInfo.BasicOptionIndex = (uint)Equipment[i]["BasicOptionIndex_ui"].n;
                tmpInfo.OptionIndex2     = (uint)Equipment[i]["OptionIndex2_ui"].n;
                tmpInfo.OptionIndex3     = (uint)Equipment[i]["OptionIndex3_ui"].n;
                tmpInfo.OptionIndex4     = (uint)Equipment[i]["OptionIndex4_ui"].n;
                tmpInfo.EnchantId        = (uint)Equipment[i]["EnchantId_ui"].n;
                tmpInfo.MaxEnchant       = (uint)Equipment[i]["MaxEnchant_ui"].n;
                tmpInfo.EvolveId         = (uint)Equipment[i]["EvolveId_ui"].n;
                tmpInfo.GradeUpLevel     = (uint)Equipment[i]["GradeUpLevel_ui"].n;
                tmpInfo.NextPartsId      = (uint)Equipment[i]["NextPartsId_ui"].n;
                tmpInfo.Break            = (uint)Equipment[i]["break_ui"].n;
                tmpInfo.UseTime          = (uint)Equipment[i]["UseTime_ui"].n;

                EquipmentInfoDic.Add(tmpInfo.Id, tmpInfo);
            }
        }

        {
            TextAsset    data         = Resources.Load("TestJson/Item_EquipmentSet", typeof(TextAsset)) as TextAsset;
            StringReader sr           = new StringReader(data.text);
            string       strSrc       = sr.ReadToEnd();
            JSONObject   EquipmentSet = new JSONObject(strSrc);

            for (int i = 0; i < EquipmentSet.list.Count; i++)
            {
                EquipmentSetInfo tmpInfo = new EquipmentSetInfo();
                tmpInfo.Id               = (uint)EquipmentSet[i]["Id_ui"].n;
                tmpInfo.Class            = (byte)EquipmentSet[i]["Class_b"].n;
                tmpInfo.Type             = (byte)EquipmentSet[i]["Type_b"].n;
                tmpInfo.Default          = (byte)EquipmentSet[i]["Default_b"].n;
                tmpInfo.SetName          = (uint)EquipmentSet[i]["SetName_ui"].n;
                tmpInfo.SetDescriptionId = (uint)EquipmentSet[i]["SetDescriptionId_ui"].n;
                tmpInfo.ItemIdx1         = (uint)EquipmentSet[i]["ItemIdx1_ui"].n;
                tmpInfo.ItemIdx2         = (uint)EquipmentSet[i]["ItemIdx2_ui"].n;
                tmpInfo.ItemIdx3         = (uint)EquipmentSet[i]["ItemIdx3_ui"].n;
                tmpInfo.ItemIdx4         = (uint)EquipmentSet[i]["ItemIdx4_ui"].n;
                tmpInfo.ItemIdx5         = (uint)EquipmentSet[i]["ItemIdx5_ui"].n;
                tmpInfo.ItemIdx6         = (uint)EquipmentSet[i]["ItemIdx6_ui"].n;

                EquipmentSetInfoDic.Add(tmpInfo.Id, tmpInfo);
            }
        }

        {
            TextAsset    data   = Resources.Load("TestJson/Item_fusion", typeof(TextAsset)) as TextAsset;
            StringReader sr     = new StringReader(data.text);
            string       strSrc = sr.ReadToEnd();
            JSONObject   fusion = new JSONObject(strSrc);

            for (int i = 0; i < fusion.list.Count; i++)
            {
                fusionInfo tmpInfo = new fusionInfo();
                tmpInfo.Id         = (uint)fusion[i]["Id_ui"].n;
                tmpInfo.group      = (ushort)fusion[i]["group_us"].n;
                tmpInfo.num        = (byte)fusion[i]["num_b"].n;
                tmpInfo.ItemIdx1   = (uint)fusion[i]["ItemIdx1_ui"].n;
                tmpInfo.ItemValue1 = (uint)fusion[i]["ItemValue1_ui"].n;
                tmpInfo.ItemIdx2   = (uint)fusion[i]["ItemIdx2_ui"].n;
                tmpInfo.ItemValue2 = (uint)fusion[i]["ItemValue2_ui"].n;
                tmpInfo.ItemIdx3   = (uint)fusion[i]["ItemIdx3_ui"].n;
                tmpInfo.ItemValue3 = (uint)fusion[i]["ItemValue3_ui"].n;
                tmpInfo.ItemIdx4   = (uint)fusion[i]["ItemIdx4_ui"].n;
                tmpInfo.ItemValue4 = (uint)fusion[i]["ItemValue4_ui"].n;
                tmpInfo.ItemIdx5   = (uint)fusion[i]["ItemIdx5_ui"].n;
                tmpInfo.ItemValue5 = (uint)fusion[i]["ItemValue5_ui"].n;

                fusionInfoDic.Add(tmpInfo.Id, tmpInfo);
            }
        }


        {
            TextAsset    data   = Resources.Load("TestJson/Item_Item", typeof(TextAsset)) as TextAsset;
            StringReader sr     = new StringReader(data.text);
            string       strSrc = sr.ReadToEnd();
            JSONObject   Item   = new JSONObject(strSrc);

            for (int i = 0; i < Item.list.Count; i++)
            {
                ItemInfo tmpInfo = new ItemInfo();
                tmpInfo.Id            = (uint)Item[i]["Id_ui"].n;
                tmpInfo.NameId        = (uint)Item[i]["NameId_ui"].n;
                tmpInfo.DescriptionId = (uint)Item[i]["DescriptionId_ui"].n;
                tmpInfo.Class         = (byte)Item[i]["Class_b"].n;
                tmpInfo.Type          = (byte)Item[i]["Type_b"].n;
                tmpInfo.LimitLevel    = (byte)Item[i]["LimitLevel_b"].n;
                tmpInfo.Grade         = (byte)Item[i]["Grade_b"].n;
                tmpInfo.Icon          = (uint)Item[i]["Icon_ui"].n;
                tmpInfo.maxstack      = (uint)Item[i]["maxstack_ui"].n;
                tmpInfo.SellPrice     = (ushort)Item[i]["SellPrice_us"].n;
                tmpInfo.OptionType    = (ushort)Item[i]["OptionType_us"].n;
                tmpInfo.value         = (uint)Item[i]["value_ui"].n;
                tmpInfo.UseTime       = (uint)Item[i]["UseTime_ui"].n;

                ItemInfoDic.Add(tmpInfo.Id, tmpInfo);
            }
        }

        {
            TextAsset    data      = Resources.Load("TestJson/Item_ItemValue", typeof(TextAsset)) as TextAsset;
            StringReader sr        = new StringReader(data.text);
            string       strSrc    = sr.ReadToEnd();
            JSONObject   ItemValue = new JSONObject(strSrc);

            for (int i = 0; i < ItemValue.list.Count; i++)
            {
                ItemValueInfo tmpInfo = new ItemValueInfo();
                tmpInfo.Idx        = (uint)ItemValue[i]["Idx_ui"].n;
                tmpInfo.OptionId   = (ushort)ItemValue[i]["OptionId_us"].n;
                tmpInfo.BasicValue = (uint)ItemValue[i]["BasicValue_ui"].n;
                tmpInfo.MinValue   = (uint)ItemValue[i]["MinValue_ui"].n;
                tmpInfo.MaxValue   = (uint)ItemValue[i]["MaxValue_ui"].n;

                ItemValueInfoDic.Add(tmpInfo.Idx, tmpInfo);
            }
        }

        {
            TextAsset    data         = Resources.Load("TestJson/Item_ContentsList", typeof(TextAsset)) as TextAsset;
            StringReader sr           = new StringReader(data.text);
            string       strSrc       = sr.ReadToEnd();
            JSONObject   ContentsList = new JSONObject(strSrc);

            for (int i = 0; i < ContentsList.list.Count; i++)
            {
                ContentsListInfo tmpInfo = new ContentsListInfo();
                tmpInfo.Idx              = (uint)ContentsList[i]["Idx_ui"].n;
                tmpInfo.ItemIdx          = (uint)ContentsList[i]["ItemIdx_ui"].n;
                tmpInfo.ContentsType     = (byte)ContentsList[i]["ContentsType_b"].n;
                tmpInfo.ContentsIdx      = (uint)ContentsList[i]["ContentsIdx_ui"].n;
                tmpInfo.ContentsLinkType = (byte)ContentsList[i]["ContentsLinkType_b"].n;
                tmpInfo.ContentsName     = (uint)ContentsList[i]["ContentsName_ui"].n;
                tmpInfo.ContentsParam    = new JsonCustomData(ContentsList[i]["ContentsParam_j"].ToString());
                tmpInfo.ConditionName    = (uint)ContentsList[i]["ConditionName_ui"].n;
                tmpInfo.ConditionParam   = new JsonCustomData(ContentsList[i]["ConditionParam_j"].ToString());

                ContentsListInfoList.Add(tmpInfo);
            }
        }

        {
            TextAsset    data         = Resources.Load("TestJson/Item_CategoryList", typeof(TextAsset)) as TextAsset;
            StringReader sr           = new StringReader(data.text);
            string       strSrc       = sr.ReadToEnd();
            JSONObject   CategoryList = new JSONObject(strSrc);

            for (int i = 0; i < CategoryList.list.Count; i++)
            {
                CategoryListInfo tmpInfo = new CategoryListInfo();
                tmpInfo.Idx          = (uint)CategoryList[i]["Idx_ui"].n;
                tmpInfo.CategoryName = (uint)CategoryList[i]["CategoryName_ui"].n;
                tmpInfo.CategoryDesc = (uint)CategoryList[i]["CategoryDesc_ui"].n;
                tmpInfo.ItemList     = new JsonCustomData(CategoryList[i]["ItemList_j"].ToString());

                CategoryListInfoList.Add(tmpInfo);
            }
        }
    }
Beispiel #5
0
 public CharacterSummary(long cid, int nexonSN, string characterID, int characterSN, BaseCharacter baseCharacter, int level, int exp, int levelUpExp, int title, int titleCount, CostumeInfo costume, int dailyMicroPlayCount, int dailyFreePlayCount, int totalUsedAP, string quote, int gid, string gname, int cafeType, bool isPremium, bool hasBonusEffect, bool isReturn, bool isDeleting, int deleteWaitLeftSec, bool isShouldNameChange, int VIPCode, VocationEnum vocationClass, int vocationLevel, int vocationExp, int vocationLevelUpExp, int vocationSkillPointAvailable, int freeMatchWinCount, int freeMatchLoseCount, PetStatusInfo pet, bool isEventJumping, string FreeTitleName, int pattern, int arenaWinCount, int arenaLoseCount, int arenaSuccessiveWinCount)
 {
     this.CID                         = cid;
     this.NexonSN                     = nexonSN;
     this.CharacterID                 = characterID;
     this.CharacterSN                 = characterSN;
     this.BaseCharacter               = baseCharacter;
     this.Level                       = level;
     this.Exp                         = exp;
     this.LevelUpExp                  = levelUpExp;
     this.Title                       = title;
     this.TitleCount                  = titleCount;
     this.Costume                     = (costume ?? new CostumeInfo());
     this.DailyMicroPlayCount         = dailyMicroPlayCount;
     this.DailyFreePlayCount          = dailyFreePlayCount;
     this.TotalUsedAP                 = totalUsedAP;
     this.Quote                       = (quote ?? "");
     this.GuildId                     = gid;
     this.GuildName                   = (gname ?? "");
     this.CafeType                    = cafeType;
     this.IsPremium                   = isPremium;
     this.HasBonusEffect              = hasBonusEffect;
     this.IsReturn                    = isReturn;
     this.IsDeleting                  = isDeleting;
     this.DeleteWaitLeftSec           = deleteWaitLeftSec;
     this.IsShouldNameChange          = isShouldNameChange;
     this.VIPCode                     = VIPCode;
     this.VocationClass               = vocationClass;
     this.VocationExp                 = vocationExp;
     this.VocationLevel               = vocationLevel;
     this.VocationLevelUpExp          = vocationLevelUpExp;
     this.VocationSkillPointAvailable = vocationSkillPointAvailable;
     this.FreeMatchWinCount           = freeMatchWinCount;
     this.FreeMatchLoseCount          = freeMatchLoseCount;
     this.Pet                         = pet;
     this.IsEventJumping              = isEventJumping;
     this.FreeTitleName               = (FreeTitleName ?? "");
     this.Pattern                     = pattern;
     this.ArenaWinCount               = arenaWinCount;
     this.ArenaLoseCount              = arenaLoseCount;
     this.ArenaSuccessiveWinCount     = arenaSuccessiveWinCount;
 }