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

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

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

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

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

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

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

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

            return(new List <DropDTO>());
        }
Exemple #9
0
 internal List <TeleporterDTO> GetTeleportersByNpcVNum(short npcMonsterVNum)
 {
     if (_teleporters != null && _teleporters.ContainsKey(npcMonsterVNum))
     {
         return(_teleporters[npcMonsterVNum]);
     }
     else
     {
         return(new List <TeleporterDTO>());
     }
 }
Exemple #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);
        }
 public bool IsMemberOfGroup(long characterId)
 {
     return(_characters.ContainsKey(characterId));
 }
 public ClientSession GetSessionByCharacterId(long characterId) => _sessions.ContainsKey(characterId) ? _sessions[characterId] : null;
Exemple #13
0
 public bool IsMemberOfRaid(long characterId)
 {
     return(_characters != null && (_characters.ContainsKey(characterId) || _leader.Character.CharacterId == characterId));
 }
Exemple #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;
         }
     }
 }