22 package com.realtime.crossfire.jxclient.server.crossfire;
26 import java.util.ArrayList;
27 import java.util.HashMap;
28 import java.util.List;
30 import org.jetbrains.annotations.NotNull;
55 private String
msg =
"";
61 private final Map<Integer, Long>
stats =
new HashMap<>();
67 private final List<Choice>
choices =
new ArrayList<>();
84 return new ClassRaceInfo(archName, name, msg, stats, choices);
91 public void setName(@NotNull
final String name) {
99 public void setMsg(@NotNull
final String msg) {
109 stats.put(statNo, adjustment);
void setStatAdjustment(final int statNo, final long adjustment)
Sets a stat adjustment.
ClassRaceInfo finish()
Finishes parsing an entry an returns the ClassRaceInfo for the entry.
String name
The human readable race name.
ClassRaceInfoBuilder(@NotNull final String archName)
Creates a new instance.
void setName(@NotNull final String name)
Sets the human readable stat name.
Builder for ClassRaceInfo instances while parsing an "replyinfo race_info" packet.
void setMsg(@NotNull final String msg)
Sets the long description.
A choice for character creation.
final Map< Integer, Long > stats
The stat adjustments.
final String archName
The name of the race being parsed.
final List< Choice > choices
The available choices.
void addChoice(@NotNull final Choice choice)
Adds a choice.
String msg
The long description.
One possible class or race for character creation.