Search in sources :

Example 1 with Profession

use of de.gg.game.model.entities.Profession in project ProjektGG by eskalon.

the class WorldGenerator method generatePlayers.

private void generatePlayers() {
    for (Entry<Short, LobbyPlayer> entry : players.entrySet()) {
        LobbyPlayer lp = entry.getValue();
        Profession profession = new Profession(ProfessionType.values()[lp.getProfessionTypeIndex()]);
        Character character = CharacterFactory.createPlayerCharacter(random, profession.getProfession(), setup.getDifficulty(), lp.isMale(), lp.getReligion(), lp.getName(), lp.getSurname());
        world.characters.put(world.characterIndex, character);
        // TODO 1. Skill-Werte aus LobbyPlayer hinzufügen (Reihenfolge:
        // agility, bargain, combat, crafting, rhetorical, stealth)
        // TODO 2. House-IDS setzen
        Player player = PlayerFactory.createPlayerCharacter(world.characterIndex, lp.getIcon(), profession, (short) 0, (short) 0, 1, 1, 1, 1, 1, 1);
        world.players.put(entry.getKey(), player);
        world.characterIndex++;
    }
}
Also used : Profession(de.gg.game.model.entities.Profession) LobbyPlayer(de.gg.game.network.LobbyPlayer) Player(de.gg.game.model.entities.Player) Character(de.gg.game.model.entities.Character) LobbyPlayer(de.gg.game.network.LobbyPlayer)

Aggregations

Character (de.gg.game.model.entities.Character)1 Player (de.gg.game.model.entities.Player)1 Profession (de.gg.game.model.entities.Profession)1 LobbyPlayer (de.gg.game.network.LobbyPlayer)1