Example #1
0
        private void _init(string roomId, long accontId, BaseRoleAction role, RoleType roleType)
        {
            this.accontId = accontId;
            this.id       = CommonUtil.getUUID();
            this.role     = role;
            this.roomId   = roomId;
            this.roleType = roleType;
            //初始化房间角色信息
            // 信息托管
            this.cardList  = role.GetBaseCards();
            this.skillList = role.GetBaseSkills();
            //TODO 如果技能和卡牌为空,那么设置一个默认的技能(搏命!每次消耗10%的最大生命值,造成其同等伤害!)

            //判断buff效果
            foreach (var item in buffs)
            {
                if (item.buffType == BuffType.ONE_EFFECT)
                {
                    item.effect(this.role, this.role);
                }
            }
        }