func GetAllSkills() types.SkillList { ids := db.FindAll(types.SkillType) skills := make(types.SkillList, len(ids)) for i, id := range ids { skills[i] = GetSkill(id) } return skills }
func GetAreas(zone types.Zone) types.AreaList { ids := db.FindAll(types.AreaType) areas := make(types.AreaList, len(ids)) for i, id := range ids { areas[i] = GetArea(id) } return areas }
func GetAllTemplates() types.TemplateList { ids := db.FindAll(types.TemplateType) templates := make(types.TemplateList, len(ids)) for i, id := range ids { templates[i] = GetTemplate(id) } sort.Sort(templates) return templates }
func GetNpcs() types.NPCList { ids := db.FindAll(types.NpcType) npcs := make(types.NPCList, len(ids)) for i, id := range ids { npcs[i] = GetNpc(id) } return npcs }
func GetSpawners() types.SpawnerList { ids := db.FindAll(types.SpawnerType) spawners := make(types.SpawnerList, len(ids)) for i, id := range ids { spawners[i] = GetSpawner(id) } return spawners }
func GetZones() types.ZoneList { ids := db.FindAll(types.ZoneType) zones := make(types.ZoneList, len(ids)) for i, id := range ids { zones[i] = GetZone(id) } return zones }
func GetRooms() types.RoomList { ids := db.FindAll(types.RoomType) rooms := make(types.RoomList, len(ids)) for i, id := range ids { rooms[i] = GetRoom(id) } return rooms }
func GetUsers() types.UserList { ids := db.FindAll(types.UserType) users := make(types.UserList, len(ids)) for i, id := range ids { users[i] = GetUser(id) } return users }
func GetOnlinePlayerCharacters() []types.PC { var pcs []types.PC for _, id := range db.FindAll(types.PcType) { pc := GetPlayerCharacter(id) if pc.IsOnline() { pcs = append(pcs, pc) } } return pcs }
func UserCount() int { return len(db.FindAll(types.UserType)) }