Crossfire JXClient, Trunk  R20561
Model.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff.
19  * Copyright (C) 2006-2011 Andreas Kirschbaum.
20  */
21 
22 package com.realtime.crossfire.jxclient.server.crossfire;
23 
38 import org.jetbrains.annotations.NotNull;
39 
44 public class Model {
45 
46  @NotNull
48 
49  @NotNull
50  private final SkillSet skillSet = new SkillSet(guiStateManager);
51 
52  @NotNull
54 
55  @NotNull
56  private final Stats stats = new Stats(experienceTable, skillSet, guiStateManager);
57 
58  @NotNull
59  private final SpellsManager spellsManager = new SpellsManager(guiStateManager, skillSet, stats);
60 
61  @NotNull
62  private final QuestsManager questsManager = new QuestsManager(guiStateManager);
63 
64  @NotNull
65  private final KnowledgeManager knowledgeManager = new KnowledgeManager(guiStateManager);
66 
67  @NotNull
68  private final FaceCache faceCache = new FaceCache();
69 
70  @NotNull
71  private final SmoothFaces smoothFaces = new SmoothFaces();
72 
73  @NotNull
75 
76  @NotNull
77  private final ItemSet itemSet = new ItemSet();
78 
79  @NotNull
81 
85  @NotNull
87 
88  @Deprecated
89  public void setItemsManager(@NotNull final FacesManager facesManager) {
90  itemsManager = new ItemsManager(facesManager, stats, skillSet, guiStateManager, itemSet);
91  }
92 
93  @Deprecated
94  public void setAskfaceFaceQueue(@NotNull final AskfaceFaceQueue askfaceFaceQueue) {
95  this.askfaceFaceQueue = askfaceFaceQueue;
96  }
97 
98  @NotNull
99  public SkillSet getSkillSet() {
100  return skillSet;
101  }
102 
103  @NotNull
104  public Stats getStats() {
105  return stats;
106  }
107 
108  @NotNull
110  return experienceTable;
111  }
112 
113  @NotNull
115  return guiStateManager;
116  }
117 
118  @NotNull
120  return spellsManager;
121  }
122 
123  @NotNull
125  return questsManager;
126  }
127 
128  @NotNull
130  return knowledgeManager;
131  }
132 
133  @NotNull
135  return faceCache;
136  }
137 
138  @NotNull
140  return smoothFaces;
141  }
142 
143  @NotNull
145  return itemsManager;
146  }
147 
148  @NotNull
149  public ItemSet getItemSet() {
150  return itemSet;
151  }
152 
153  @NotNull
155  return askfaceFaceQueue;
156  }
157 
162  @NotNull
165  }
166 
167 }
Manages items known to the character.
Manages image information ("faces") needed to display the map view, items, and spell icons...
final NewCharacterInformation newCharacterInformation
The NewCharacterInformation for creating new characters.
Definition: Model.java:86
Combines all model classes that are updated.
Definition: Model.java:44
void setItemsManager(@NotNull final FacesManager facesManager)
Definition: Model.java:89
A FaceQueue requesting faces by "askface" commands sent to the Crossfire server.
Model class maintaining the CfItems known to the player.
Definition: ItemSet.java:43
This is the representation of all the statistics of a player, like its speed or its experience...
Definition: Stats.java:43
void setAskfaceFaceQueue(@NotNull final AskfaceFaceQueue askfaceFaceQueue)
Definition: Model.java:94
Maintain the set of skills as sent by the server.
Definition: SkillSet.java:38
NewCharacterInformation getNewCharacterInformation()
Returns the NewCharacterInformation for creating new characters.
Definition: Model.java:163
Maintains smoothing information received from the Crossfire server.
Maintains a mapping of face numbers to face data.