Exemplo n.º 1
0
    public static List <string> BuildPlayerSimplePreloadAssets(PMatchProcessInfo info, List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        // Player model
        var model = ConfigManager.Get <CreatureInfo>(info.roleProto);

        if (model)
        {
            assets.AddRange(model.models);
        }

        var w = WeaponInfo.GetWeapon(0, info.fashion.weapon);

        // Player weapons
        BuildWeaponSimplePreloadAssets(info.roleProto, info.gender, w.weaponID, w.weaponItemId, assets);

        // Equipments
        assets.AddRange(CharacterEquip.GetEquipAssets(info.fashion));

        return(assets);
    }
Exemplo n.º 2
0
    public static List <string> BuildPlayerPreloadAssets(List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        // Player shadow
        assets.Add(CombatConfig.sdefaultSelfShadow);

        // Player model
        var model = ConfigManager.Get <CreatureInfo>(modulePlayer.proto);

        if (model)
        {
            assets.AddRange(model.models);
        }

        // Player weapons
        BuildWeaponPreloadAssets(modulePlayer.proto, modulePlayer.gender, moduleEquip.weaponID, moduleEquip.weaponItemID, moduleEquip.offWeaponID, moduleEquip.offWeaponItemID, assets, true);

        // Buff effects
        BuildBuffPreloadAssets(modulePlayer.buffs, assets);

        // Equipments
        assets.AddRange(CharacterEquip.GetEquipAssets(moduleEquip.currentDressClothes));

        // Pet
        BuildPetPreloadAssets(assets, modulePet.FightingPet);

        return(assets);
    }
Exemplo n.º 3
0
    protected override List <string> OnBuildPreloadAssets(List <string> assets = null)
    {
        base.OnBuildPreloadAssets(assets);

        PropItemInfo weaponInfo = ConfigManager.Get <PropItemInfo>(moduleLabyrinth.sneakPlayerDetail.fashion.weapon);

        LoadStateMachineEffect(assets, weaponInfo.subType, weaponInfo.ID, 0, 1);  // @TODO: 尽管现在性别绑定到职业了,但逻辑上必须使用性别
        LoadAllBuffAsset(assets);

        // enermy model
        var model = ConfigManager.Get <CreatureInfo>(moduleLabyrinth.lastSneakPlayer.GetProto());

        if (model)
        {
            assets.AddRange(model.models);
        }
        //添加装备和时装
        assets.AddRange(CharacterEquip.GetEquipAssets(moduleLabyrinth.sneakPlayerDetail.fashion));
        assets.AddRange(CharacterEquip.GetAnimatorAssets(moduleLabyrinth.sneakPlayerDetail.fashion));

        var pet = moduleLabyrinth.lastSneakPlayer.pet;

        if (pet != null && pet.itemId > 0)
        {
            var petInfo = PetInfo.Create(pet);
            if (petInfo != null)
            {
                Module_Battle.BuildPetPreloadAssets(assets, petInfo);
            }
        }

        assets.AddRange(FillLabyrithBuffAsset());
        return(assets);
    }
Exemplo n.º 4
0
    public static List <string> BuildPlayerSimplePreloadAssets(PRoleSummary info, List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        // Player model
        var model = ConfigManager.Get <CreatureInfo>(info.proto);

        if (model)
        {
            assets.Add(model.models[0]);
        }

        var w = WeaponInfo.GetWeapon(0, info.fashion.weapon);

        // Player weapons
        BuildWeaponSimplePreloadAssets(info.proto, info.gender, w.weaponID, w.weaponItemId, assets);

        // Equipments
        assets.AddRange(CharacterEquip.GetEquipAssets(info.fashion));

        if (info.pet == null || info.pet.itemId == 0)
        {
            return(assets);
        }

        var rPet = PetInfo.Create(info.pet);

        BuildPetSimplePreloadAssets(rPet, assets, 2);

        return(assets);
    }
Exemplo n.º 5
0
    protected override List <string> BuildPreloadAssets()
    {
        var assets = base.BuildPreloadAssets();

        assets.Add(Module_Bordlands.BORDLAND_MONSTER_ANIMATOR_NAME);
        //add player data
        var c = ConfigManager.Get <CreatureInfo>(modulePlayer.proto);

        assets.AddRange(c.models);
        assets.Add(Creature.GetAnimatorName(moduleEquip.weaponID, modulePlayer.gender));
        assets.AddRange(CharacterEquip.GetEquipAssets(moduleEquip.currentDressClothes));
        assets.Add(headPanelName);
        assets.Add(GeneralConfigInfo.ssceneTextObject);
        // Player shadow
        assets.Add(CombatConfig.sdefaultSelfShadow);

        if (moduleBordlands.bordlandsSettlementReward != null)
        {
            assets.Add(Window_RandomReward.ASSET_NAME);
        }

        if (modulePet.FightingPet != null)
        {
            Module_Battle.BuildPetSimplePreloadAssets(modulePet.FightingPet, assets, 1);
        }

        var emjioList = ConfigManager.GetAll <FaceName>();

        for (int i = 0; i < emjioList.Count; i++)
        {
            assets.Add(emjioList[i]?.head_icon);
        }

        return(assets);
    }
Exemplo n.º 6
0
    private List <string> GetPlayerPreloadAssets(List <PMazePlayer> infos)
    {
        List <string> list = new List <string>();

        string temp = string.Empty;

        foreach (var p in infos)
        {
            //add creature
            var c = ConfigManager.Get <CreatureInfo>(p.GetProto());
            if (!c)
            {
                Logger.LogError("wrong player proto with pmazePlayer : id:{0},name:{1},gender:{2} proto:{3}",
                                p.roleId, p.roleName, p.gender, p.GetProto());
                continue;
            }
            list.AddRange(c.models);

            if (p.fashion != null)
            {
                //add animator asset
                var prop = ConfigManager.Get <PropItemInfo>(p.fashion.weapon);
                if (prop)
                {
                    temp = Creature.GetAnimatorName(prop.subType, p.gender);
                    if (!list.Contains(temp))
                    {
                        list.Add(temp);
                    }
                }

                //equip assets
                List <string> equips = CharacterEquip.GetEquipAssets(p.fashion);
                foreach (var e in equips)
                {
                    if (!list.Contains(e))
                    {
                        list.Add(e);
                    }
                }
            }

            //pet assets
            if (p.pet != null && p.pet.itemTypeId != 0)
            {
                var pet = PetInfo.Create(p.pet);
                Module_Battle.BuildPetSimplePreloadAssets(pet, list, 1);
            }
        }
        list.Distinct();
        return(list);
    }
Exemplo n.º 7
0
    public static List <string> BuildPlayerPreloadAssets(PTeamMemberInfo info, List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }
        if (info == null)
        {
            return(assets);
        }

        // Player shadow
        if (info.roleId == modulePlayer.id_)
        {
            assets.Add(CombatConfig.sdefaultSelfShadow);
        }

        // Player model
        var model = ConfigManager.Get <CreatureInfo>(info.roleProto);

        if (model)
        {
            assets.AddRange(model.models);
        }

        var w  = WeaponInfo.GetWeapon(0, info.fashion.weapon);
        var ww = WeaponInfo.GetWeapon(0, info.fashion.gun);

        // Player weapons
        BuildWeaponPreloadAssets(info.roleProto, info.gender, w.weaponID, w.weaponItemId, ww.weaponID, ww.weaponItemId, assets);

        // Buff effects
        BuildBuffPreloadAssets(info.buffs, assets);

        // Equipments
        assets.AddRange(CharacterEquip.GetEquipAssets(info.fashion));

        // Pet
        BuildPetPreloadAssets(assets, info.pet != null && info.pet.itemTypeId != 0 ? PetInfo.Create(info.pet) : null);

        return(assets);
    }
Exemplo n.º 8
0
    private List <string> GetPlayerPreloadAssets(PNmlPlayer[] infos)
    {
        List <string> list = new List <string>();

        string temp = string.Empty;

        foreach (var p in infos)
        {
            //add creature
            var c = ConfigManager.Get <CreatureInfo>(p.GetProto());
            list.AddRange(c.models);

            //add animator asset
            var prop = ConfigManager.Get <PropItemInfo>(p.fashion.weapon);
            if (prop)
            {
                temp = Creature.GetAnimatorName(prop.subType, p.gender);
                if (!list.Contains(temp))
                {
                    list.Add(temp);
                }
            }

            //equip assets
            List <string> equips = CharacterEquip.GetEquipAssets(p.fashion);
            foreach (var e in equips)
            {
                if (!list.Contains(e))
                {
                    list.Add(e);
                }
            }

            if (p.pet != null && p.pet.itemTypeId != 0)
            {
                var pet = PetInfo.Create(p.pet);
                Module_Battle.BuildPetSimplePreloadAssets(pet, list, 1);
            }
        }
        list.Distinct();
        return(list);
    }
Exemplo n.º 9
0
    public static List <string> BuildPlayerSimplePreloadAssets(List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        // Player model
        var model = ConfigManager.Get <CreatureInfo>(modulePlayer.proto);

        if (model)
        {
            assets.AddRange(model.models);
        }

        // Player weapons
        BuildWeaponSimplePreloadAssets(modulePlayer.proto, modulePlayer.gender, moduleEquip.weaponID, moduleEquip.weaponItemID, assets);

        // Equipments
        assets.AddRange(CharacterEquip.GetEquipAssets(moduleEquip.currentDressClothes));

        return(assets);
    }