Ejemplo n.º 1
0
        private void DoDice(int nSkillID, byte nSLV)
        {
            Parent.Buffs.Remove(nSkillID);

            var newBuff = new BuffSkill(nSkillID, nSLV);

            newBuff.State = (byte)(Constants.Rand.Next(6) + 1);

            var effect = new UserEffectPacket(UserEffect.SkillAffectedSelect)
            {
                nSelect  = (byte)newBuff.State,
                nSkillID = nSkillID,
                nSLV     = nSLV
            };

            effect.BroadcastEffect(Parent);

            if (newBuff.State <= 1)
            {
                return;
            }

            newBuff.GenerateDice();

            Parent.Buffs.Add(newBuff);
        }