Exemplo n.º 1
0
 public void AffactByTargetSpell(SpellDescriptor sd)
 {
     if (sd.Damage != 0)
     {
         _stat.ChangeHealth(-sd.Damage, sd.EnergyType);
     }
     foreach (var buff in sd.ApplyBuff)
     {
         _buffHandler.ApplyBuff(buff);
     }
     _cEffects.ActivateOneTimeEffect(sd.EffectName);
 }
Exemplo n.º 2
0
    private void ApplyBuffEffect(BuffInstance buff)
    {
        switch (buff.buffDescriptor.BuffType)
        {
        case BuffCategory.PositiveEnergyWave:
            switch (buff.buffDescriptor.BuffChangeType)
            {
            case BuffChangeType.StatPercentChange:
                _stat.ChangeHealth(-buff.buffDescriptor.Change * Time.deltaTime, EnergyType.Positive);
                //_stat.photonView.RPC("RPC_ChangeHealthPercent", PhotonTargets.AllBuffered, buff.buffDescriptor.Change, EnergyType.Positive.ToString());
                break;

            case BuffChangeType.StatChange:
                _stat.ChangeHealthPercent(-buff.buffDescriptor.Change * Time.deltaTime, EnergyType.Positive);
                //_stat.photonView.RPC("RPC_ChangeHealth", PhotonTargets.AllBuffered, buff.buffDescriptor.Change, EnergyType.Positive.ToString());
                break;

            default:
                break;
            }
            break;

        case BuffCategory.NegativeEnergyWave:
            switch (buff.buffDescriptor.BuffChangeType)
            {
            case BuffChangeType.StatPercentChange:
                _stat.ChangeHealth(-buff.buffDescriptor.Change * Time.deltaTime, EnergyType.Negative);
                //_stat.photonView.RPC("RPC_ChangeHealthPercent", PhotonTargets.AllBuffered, buff.buffDescriptor.Change, EnergyType.Positive.ToString());
                break;

            case BuffChangeType.StatChange:
                _stat.ChangeHealthPercent(-buff.buffDescriptor.Change * Time.deltaTime, EnergyType.Negative);
                //_stat.photonView.RPC("RPC_ChangeHealth", PhotonTargets.AllBuffered, buff.buffDescriptor.Change, EnergyType.Positive.ToString());
                break;

            default:
                break;
            }
            break;

        case BuffCategory.ManaRegen:
            break;

        case BuffCategory.DamageChange:
            break;

        case BuffCategory.Bleed:
            break;

        case BuffCategory.Poison:
            break;

        case BuffCategory.Burn:
            break;

        case BuffCategory.Freeze:
            break;

        case BuffCategory.MoveChange:
            break;

        case BuffCategory.Inmobile:
            break;

        case BuffCategory.Stun:
            break;

        default:
            break;
        }
    }