Example #1
0
    public List <string> FillLabyrithBuffAsset()
    {
        List <string> list = new List <string>();

        if (reopenPanelType == PVEReOpenPanel.Labyrinth && propToBuffDic != null && labyrinthBuffPropIds != null)
        {
            for (int i = 0; i < labyrinthBuffPropIds.Count; i++)
            {
                PropToBuffInfo info = propToBuffDic.Get(labyrinthBuffPropIds[i]);
                if (!info)
                {
                    continue;
                }

                if (info.buffId > 0)
                {
                    BuffInfo buff = ConfigManager.Get <BuffInfo>(info.buffId);
                    if (buff)
                    {
                        list.AddRange(buff.GetAllAssets());
                    }
                }

                if (!string.IsNullOrEmpty(info.effect))
                {
                    list.Add(info.effect);
                }
            }
        }

        return(list);
    }
Example #2
0
    /// <summary>
    /// 缓冲配置表中的道具ID和buffid的映射
    /// </summary>
    private void InitBuffDic()
    {
        List <PropToBuffInfo> list = ConfigManager.GetAll <PropToBuffInfo>();

        for (int i = 0; i < list.Count; i++)
        {
            PropToBuffInfo item = list[i];
            if (propToBuffDic.ContainsKey(item.propId))
            {
                Logger.LogError("id = {0},prop id = {0} has repitition data", item.ID, item.propId);
                continue;
            }

            propToBuffDic.Add(item.propId, item);
        }
    }
Example #3
0
    public List <string> FillLabyrithBuffAsset()
    {
        List <string> list = new List <string>();

        short[] props = moduleLabyrinth.sneakPlayerDetail.propIds;
        if (props == null || props.Length == 0)
        {
            return(list);
        }

        List <PropToBuffInfo> configs = ConfigManager.GetAll <PropToBuffInfo>();

        foreach (var item in configs)
        {
            propToBuffDic.Add(item.propId, item);
        }

        for (int i = 0; i < props.Length; i++)
        {
            PropToBuffInfo info = propToBuffDic.Get(props[i]);
            if (!info)
            {
                continue;
            }

            if (info.buffId > 0)
            {
                BuffInfo buff = ConfigManager.Get <BuffInfo>(info.buffId);
                if (buff)
                {
                    list.AddRange(buff.GetAllAssets());
                }
            }

            if (!string.IsNullOrEmpty(info.effect))
            {
                list.Add(info.effect);
            }
        }

        return(list);
    }
Example #4
0
    private void RefreshAllBuff()
    {
        short[] props = moduleLabyrinth.sneakPlayerDetail.propIds;
        if (props == null || props.Length == 0)
        {
            return;
        }

        for (int i = 0; i < props.Length; i++)
        {
            PropToBuffInfo info = propToBuffDic.Get(props[i]);
            if (!info)
            {
                continue;
            }

            if (info.buffId > 0)
            {
                BuffInfo buff = ConfigManager.Get <BuffInfo>(info.buffId);
                if (buff)
                {
                    Buff.Create(buff, player);
                }
            }

            if (!string.IsNullOrEmpty(info.effect))
            {
                StateMachineInfo.Effect e = new StateMachineInfo.Effect();
                e.effect = info.effect;
                e.follow = true;
                if (player && player.behaviour)
                {
                    player.behaviour.effects.PlayEffect(e);
                }
            }
        }
    }