Beispiel #1
0
    void RPC_S2C_GenDunEntrance(uLink.BitStream stream, uLink.NetworkMessageInfo info)
    {
        Vector3         entrancePos = stream.Read <Vector3>();
        int             id          = stream.Read <int>();
        DungeonBaseData dbd         = RandomDungeonDataBase.GetDataFromId(id);

        RandomDungenMgr.Instance.GenDunEntrance(entrancePos, dbd);
    }
 public static void GenAllItem(List <DunRareItemGenerator> drigList, List <IdWeight> idWeightList, float chance, List <IdWeight> rareItemTags, System.Random rand, List <ItemIdCount> specifiedItems = null)
 {
     if (idWeightList == null || idWeightList.Count == 0)
     {
         return;
     }
     if (Pathea.PeGameMgr.IsSingle)
     {
         //--to do foreach gen
         int isoCount = 0;
         foreach (DunRareItemGenerator drig in drigList)
         {
             drig.GenItem(idWeightList, rand, specifiedItems);
             specifiedItems = null;
             if (rand.NextDouble() < chance)
             {
                 isoCount++;
             }
         }
         string isoTag = RandomDungeonDataBase.GetRandomIsoTag(rand, rareItemTags);
         if (SteamWorkShop.Instance != null)
         {
             SteamWorkShop.Instance.GetRandIsos(RandomDungenMgrData.DungeonId, isoCount, isoTag);
         }
     }
     else
     {
         List <Vector3> posList  = new List <Vector3> ();
         List <int>     idList   = new List <int> ();
         int            isoCount = 0;
         foreach (DunRareItemGenerator drig in drigList)
         {
             int     id;
             Vector3 pos = drig.pos;
             drig.RandomId(out id, idWeightList, rand);
             posList.Add(pos);
             idList.Add(id);
             if (rand.NextDouble() < chance)
             {
                 isoCount++;
             }
         }
         List <ItemIdCount> sItems = new List <ItemIdCount> ();
         if (specifiedItems != null && specifiedItems.Count > 0)
         {
             sItems = specifiedItems;
         }
         else
         {
             sItems.Add(new ItemIdCount(-1, 0));
         }
         //send to server
         string isoTag = RandomDungeonDataBase.GetRandomIsoTag(rand, rareItemTags);
         PlayerNetwork.mainPlayer.RPCServer(EPacketType.PT_InGame_RandomItemRareAry, RandomDungenMgrData.entrancePos, isoCount, isoTag, posList.ToArray(), idList.ToArray(), sItems.ToArray());
     }
 }
Beispiel #3
0
    void RPC_S2C_GenDunEntranceList(uLink.BitStream stream, uLink.NetworkMessageInfo info)
    {
        List <Vector3> entrancePosList = stream.Read <Vector3[]>().ToList();
        List <int>     idList          = stream.Read <int[]>().ToList();

        for (int i = 0; i < entrancePosList.Count; i++)
        {
            DungeonBaseData dbd = RandomDungeonDataBase.GetDataFromId(idList[i]);
            RandomDungenMgr.Instance.GenDunEntrance(entrancePosList[i], dbd);
        }
    }
Beispiel #4
0
    public void LoadDataFromId(int id)
    {
        DungeonBaseData dbd = RandomDungeonDataBase.GetDataFromId(id);
        DungeonFlow     df  = Resources.Load(dbd.dungeonFlowPath) as DungeonFlow;

        if (df == null)
        {
            Debug.LogError("flow null: " + dbd.dungeonFlowPath);
            dbd.dungeonFlowPath = dungeonFlowPath;
        }
        dungeonData = dbd;
    }
Beispiel #5
0
    void InstantiateEntrance(Vector3 genPos, int level = -1)
    {
        if (level == -1)
        {
            level = RandomDunGenUtil.GetEntranceLevel(genPos);
        }
        DungeonBaseData bd = RandomDungeonDataBase.GetDataFromLevel(level);

        if (bd != null)
        {
            if (PeGameMgr.IsSingle)
            {
                GenDunEntrance(genPos, bd);
            }
            else
            {
                PlayerNetwork.mainPlayer.RequestGenDunEntrance(genPos, bd.id);
            }
        }
    }
    public static void LoadAllData()
    {
        if (s_localDatabase != null)
        {
            return;
        }

#if UNITY_EDITOR
        System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
        sw.Start();
#endif
        s_localDatabase = LoadDb();
        SkillSystem.SkData.LoadData();
        Pathea.Effect.EffectData.LoadData();
        Pathea.Projectile.ProjectileData.LoadData();
        Pathea.RequestRelation.LoadData();
        Pathea.CampData.LoadData();
        Pathea.ThreatData.LoadData();
        Pathea.DamageData.LoadData();
        HumanSoundData.LoadData();
        ItemDropData.LoadData();

        PELocalization.LoadData();

        NaturalResAsset.NaturalRes.LoadData();
        //SkillAsset.EffCastData.LoadData();
        //SkillAsset.EffSkill.LoadData();
        //SkillAsset.MergeSkill.LoadData();
        //AnimData.LoadData();
        //AnimSoundData.LoadData();

        AiAsset.AiData.LoadData();

        SoundAsset.SESoundBuff.LoadData();
        SoundAsset.SESoundStory.LoadData();
        //CharacterData.LoadCharacterData();
        StoryDoodadMap.LoadData();
        StoreRepository.LoadData();
        NpcMissionDataRepository.LoadData();
        //PlayerAttribute.LoadData();
        MissionRepository.LoadData();
        TalkRespository.LoadData();
        //NpcRandomRepository.LoadData();
        ShopRespository.LoadData();
        WareHouseManager.LoadData();
        //HeroTalkRepository.LoadData();
        MutiPlayRandRespository.LoadData();
        PromptRepository.LoadData();

        //MapIconData.LoadDate();
        //MapMaskData.LoadDate();
        CampPatrolData.LoadDate();
        Camp.LoadData();
        RepProcessor.LoadData();

        CloudManager.LoadData();
        //BattleUnitData.LoadData();
        TutorialData.LoadData();
        //RepairMachineManager.LoadData();
        MapMaskData.LoadDate();
        MessageData.LoadData();         //lz-2016.07.13 Add it
        MonsterHandbookData.LoadData(); //lz-2016.07.20 Add it
        StoryRepository.LoadData();
        RMRepository.LoadRandMission();
        MisInitRepository.LoadData();
        CameraRepository.LoadCameraPlot();
        AdRMRepository.LoadData();
        VCConfig.InitConfig();
        Cutscene.LoadData();

//		BuildBrushData.LoadBrush();
        BSPattern.LoadBrush();
        BSVoxelMatMap.Load();
        BSBlockMatMap.Load();
        BlockBuilding.LoadBuilding();
        LifeFormRule.LoadData();
        PlantInfo.LoadData();
        MetalScanData.LoadData();
        BattleConstData.LoadData();
        CustomCharactor.CustomMetaData.LoadData();
        SkillTreeInfo.LoadData();
        VArtifactUtil.LoadData();
        Pathea.ActionRelationData.LoadActionRelation();

        //colony
        CSInfoMgr.LoadData();
        ProcessingObjInfo.LoadData();
        CSTradeInfoData.LoadData();
        CampTradeIdData.LoadData();
        AbnormalTypeTreatData.LoadData();
        CSMedicineSupport.LoadData();
        //RandomItemMgr
        RandomItemDataMgr.LoadData();
        FecesData.LoadData();
        //randomdungeon
        RandomDungeonDataBase.LoadData();
        AbnormalData.LoadData();
        PEAbnormalNoticeData.LoadData();

        RelationInfo.LoadData();
        EquipSetData.LoadData();
        SuitSetData.LoadData();

        CheatData.LoadData();

        Pathea.NpcProtoDb.Load();
        Pathea.MonsterProtoDb.Load();
        Pathea.MonsterRandomDb.Load();
        Pathea.MonsterGroupProtoDb.Load();
        Pathea.RandomNpcDb.Load();
        Pathea.PlayerProtoDb.Load();
        Pathea.TowerProtoDb.Load();
        Pathea.DoodadProtoDb.Load();
        Pathea.AttPlusNPCData.Load();
        Pathea.AttPlusBuffDb.Load();
        Pathea.NpcTypeDb.Load();
        Pathea.NpcRandomTalkDb.Load();
        Pathea.NpcThinkDb.LoadData();
        Pathea.NpcEatDb.LoadData();
        Pathea.NpcRobotDb.Load();
        Pathea.NPCScheduleData.Load();
        Pathea.NpcVoiceDb.LoadData();
        InGameAidData.LoadData(); //lz-2016.08.21 add it
        MountsSkillDb.LoadData();

#if UNITY_EDITOR
        sw.Stop();
        Debug.Log("Database Loaded : " + sw.ElapsedMilliseconds);
        sw.Reset();
#else
        Debug.Log("Database Loaded");
#endif
    }