Esempio n. 1
0
        public List <string> GetOnlineList()
        {
            if (!Authed.ContainsKey(CurrentClient.ClientId))
            {
                return(null);
            }

            return(Global.PlayerService.GetOnline().Select(p => p.PlayerData.Name).ToList());
        }
Esempio n. 2
0
        public ClientSession GetSessionByCharacterId(long characterId)
        {
            if (_sessions.ContainsKey(characterId))
            {
                return(_sessions[characterId]);
            }

            return(null);
        }
Esempio n. 3
0
        internal List <ShopSkillDTO> GetShopSkillsByShopId(int shopId)
        {
            if (_shopSkills.ContainsKey(shopId))
            {
                return(_shopSkills[shopId]);
            }

            return(new List <ShopSkillDTO>());
        }
Esempio n. 4
0
        internal Shop GetShopByMapNpcId(int mapNpcId)
        {
            if (_shops.ContainsKey(mapNpcId))
            {
                return(_shops[mapNpcId]);
            }

            return(null);
        }
Esempio n. 5
0
        internal List <NpcMonsterSkill> GetNpcMonsterSkillsByMonsterVNum(short npcMonsterVNum)
        {
            if (_monsterSkills.ContainsKey(npcMonsterVNum))
            {
                return(_monsterSkills[npcMonsterVNum]);
            }

            return(new List <NpcMonsterSkill>());
        }
Esempio n. 6
0
        internal IEnumerable <MapNpc> GetMapNpcsByMapId(short mapId)
        {
            if (_mapNpcs.ContainsKey(mapId))
            {
                return(_mapNpcs[mapId]);
            }

            return(new List <MapNpc>());
        }
Esempio n. 7
0
        public List <Recipe> GetReceipesByMapNpcId(int mapNpcId)
        {
            if (_recipes.ContainsKey(mapNpcId))
            {
                return(_recipes[mapNpcId]);
            }

            return(new List <Recipe>());
        }
Esempio n. 8
0
        public List <DropDTO> GetDropsByMonsterVNum(short monsterVNum)
        {
            if (_monsterDrops.ContainsKey(monsterVNum))
            {
                return(_generalDrops.Concat(_monsterDrops[monsterVNum]).ToList());
            }

            return(new List <DropDTO>());
        }
Esempio n. 9
0
 internal List <TeleporterDTO> GetTeleportersByNpcVNum(short npcMonsterVNum)
 {
     if (_teleporters != null && _teleporters.ContainsKey(npcMonsterVNum))
     {
         return(_teleporters[npcMonsterVNum]);
     }
     else
     {
         return(new List <TeleporterDTO>());
     }
 }
Esempio n. 10
0
        public TServiceInterface GetService <TServiceInterface>()
            where TServiceInterface : class
        {
            var type = typeof(TServiceInterface).Name;

            if (_serviceObjects.ContainsKey(type) == false)
            {
                throw new ArgumentOutOfRangeException("Service of type \"" + type + "\" not installed yet.");
            }

            return(_serviceObjects[type] as TServiceInterface);
        }
Esempio n. 11
0
 public bool IsMemberOfGroup(long characterId)
 {
     return(_characters.ContainsKey(characterId));
 }
Esempio n. 12
0
 public ClientSession GetSessionByCharacterId(long characterId) => _sessions.ContainsKey(characterId) ? _sessions[characterId] : null;
Esempio n. 13
0
 public bool IsMemberOfRaid(long characterId)
 {
     return(_characters != null && (_characters.ContainsKey(characterId) || _leader.Character.CharacterId == characterId));
 }
Esempio n. 14
0
 public void LoadSkills()
 {
     Skills = new ThreadSafeSortedList<int, CharacterSkill>();
     IEnumerable<CharacterSkillDTO> characterskillDTO = DAOFactory.CharacterSkillDAO.LoadByCharacterId(CharacterId).ToList();
     foreach (CharacterSkillDTO characterskill in characterskillDTO.OrderBy(s => s.SkillVNum))
     {
         if (!Skills.ContainsKey(characterskill.SkillVNum))
         {
             Skills[characterskill.SkillVNum] = characterskill as CharacterSkill;
         }
     }
 }