Exemplo n.º 1
0
        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.Close:
                enchantment.Close(paramerter.Performer, paramerter.Item);
                break;

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

            case EventType.DamageBeforeDefense:
                enchantment.DamageBeforeDefense(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, paramerter.Container);
                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.Open:
                enchantment.Open(paramerter.Performer, paramerter.Item);
                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.Put:
                enchantment.Put(paramerter.Performer, paramerter.Item, paramerter.Container);
                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;
            }
        }