public void HandleRequest(IRequest request)
        {
            var character = request.Session.Character;
            var result    = _standingHandler.GetStandingForDefaultAlliances(character) ?? new Dictionary <string, object>();

            Message.Builder.FromRequest(request).WithData(result).WithEmpty().Send();
        }
        public Dictionary <string, object> RunningMissionList(Character character)
        {
            //obtain my info
            var missionsInfo = GetRunningMissionsInfo(character);

            var bonusDict = new Dictionary <string, object>();
            MissionBonusCollector missionBonusCollector;

            if (_missionBonuses.TryGetValue(character.Id, out missionBonusCollector))
            {
                bonusDict =
                    missionBonusCollector.ToDictionary();
            }

            //gang members' running missions
            var gangMissions = CollectRunningGangMissions(character);

            var totalDict = new Dictionary <string, object>
            {
                { k.missions, missionsInfo },
                { "gangMissions", gangMissions },
                { k.count, GetMissionCountData(character) },
                { k.bonus, bonusDict },
                { k.standing, _standingHandler.GetStandingForDefaultAlliances(character) },
            };

            return(totalDict);
        }
Esempio n. 3
0
 public static void SendStandingToDefaultAlliances(this IStandingHandler standingHandler, Character character)
 {
     //refresh standings
     Message.Builder.SetCommand(Commands.GetStandingForDefaultAlliances)
     .WithData(standingHandler.GetStandingForDefaultAlliances(character))
     .ToCharacter(character)
     .Send();
 }