Beispiel #1
0
        private UserAction EventManager(ActionType type, List <HungerGameProfile> users, HungerGameProfile profile,
                                        ItemDrop drops, UserAction activity)
        {
            switch (type)
            {
            case ActionType.Loot:
            {
                return(_loot.LootEvent(profile, drops, activity));
            }

            case ActionType.Attack:
            {
                activity.Action = ActionType.Attack;
                return(_attack.AttackEvent(users, profile, activity));
            }

            case ActionType.Idle:
            {
                activity.Action = ActionType.Idle;
                return(activity);
            }

            case ActionType.Meet:
            {
                activity.Action = ActionType.Meet;
                return(activity);
            }

            case ActionType.Hack:
            {
                activity.Action = ActionType.Hack;
                return(_hack.HackEvent(profile, drops, activity));
            }

            case ActionType.Die:
            {
                activity.Action = ActionType.Die;
                _die.DieEvent(profile);
                return(activity);
            }

            case ActionType.Sleep:
            {
                activity.Action = ActionType.Sleep;
                _sleep.SleepEvent(profile);
                return(activity);
            }

            case ActionType.Eat:
            {
                activity.Action = ActionType.Eat;
                _eat.EatEvent(profile);
                return(activity);
            }

            default:
                activity.Action = ActionType.Idle;
                return(activity);
            }
        }