Beispiel #1
0
        private byte GetLeaderRace(SelectCharacterApplication app, NebulaCommon.Group.Group group)
        {
            var leader = group.leaderMember;

            if (leader != null)
            {
                var character = app.Players.GetCharacter(leader.gameRefID, leader.characterID);
                if (character != null)
                {
                    return((byte)character.Race);
                }
            }
            return((byte)Race.None);
        }
Beispiel #2
0
 public bool TryGetGroupForCharacter(string characterID, out NebulaCommon.Group.Group group)
 {
     foreach (var pair in groups)
     {
         foreach (var mem in pair.Value.members)
         {
             if (mem.Key == characterID)
             {
                 group = pair.Value;
                 return(true);
             }
         }
     }
     group = null;
     return(false);
 }
Beispiel #3
0
 public bool TryAddGroup(NebulaCommon.Group.Group group)
 {
     return(groups.TryAdd(group.groupID, group));
 }
Beispiel #4
0
 public bool TryGetGroup(string groupID, out NebulaCommon.Group.Group group)
 {
     return(groups.TryGetValue(groupID, out group));
 }