Ejemplo n.º 1
0
Archivo: Event.cs Proyecto: crybx/mud
        private static void RunEnchantment(IEnchantment enchantment, EventType eventType, EventParamerters paramerter)
        {
            switch (eventType)
            {
            case EventType.AttemptToFollow:
                enchantment.AttemptToFollow(paramerter.Direction, paramerter.Performer, paramerter.FollowedTarget);
                break;

            case EventType.Cast:
                enchantment.Cast(paramerter.Performer, paramerter.SpellName);
                break;

            case EventType.DamageDealtAfterDefense:
                enchantment.DamageDealtAfterDefense(paramerter.Attacker, paramerter.Defender, paramerter.DamageAmount);
                break;

            case EventType.DamageDealtBeforeDefense:
                enchantment.DamageDealtBeforeDefense(paramerter.Attacker, paramerter.Defender, paramerter.DamageAmount);
                break;

            case EventType.DamageReceivedAfterDefense:
                enchantment.DamageReceivedAfterDefense(paramerter.Attacker, paramerter.Defender, paramerter.DamageAmount);
                break;

            case EventType.DamageReceivedBeforeDefense:
                enchantment.DamageReceivedBeforeDefense(paramerter.Attacker, paramerter.Defender, paramerter.DamageAmount);
                break;

            case EventType.Drop:
                enchantment.Drop(paramerter.Performer, paramerter.Item);
                break;

            case EventType.EnterRoom:
                enchantment.EnterRoom(paramerter.Performer);
                break;

            case EventType.Equip:
                enchantment.Equip(paramerter.Performer, paramerter.Item);
                break;

            case EventType.Get:
                enchantment.Get(paramerter.Performer, paramerter.Item);
                break;

            case EventType.HeartbeatBigTick:
                enchantment.HeartbeatBigTick(paramerter.Performer);
                break;

            case EventType.LeaveRoom:
                enchantment.LeaveRoom(paramerter.Performer, paramerter.Direction);
                break;

            case EventType.OnDeath:
                enchantment.OnDeath(paramerter.Performer);
                break;

            case EventType.Perform:
                enchantment.Perform(paramerter.Performer, paramerter.SkillName);
                break;

            case EventType.ProcessedCommand:
                enchantment.ProcessedCommand(paramerter.Performer, paramerter.Command);
                break;

            case EventType.ProcessedCommunication:
                enchantment.ProcessedCommunication(paramerter.Performer, paramerter.Communication);
                break;

            case EventType.Relax:
                enchantment.Relax(paramerter.Performer);
                break;

            case EventType.ReturnedMessage:
                enchantment.ReturnedMessage(paramerter.Performer, paramerter.Message);
                break;

            case EventType.Sit:
                enchantment.Sit(paramerter.Performer);
                break;

            case EventType.Sleep:
                enchantment.Sleep(paramerter.Performer);
                break;

            case EventType.Stand:
                enchantment.Stand(paramerter.Performer);
                break;

            case EventType.Unequip:
                enchantment.Unequip(paramerter.Performer, paramerter.Item);
                break;
            }
        }