21 package com.realtime.crossfire.jxclient.items;
28 import org.jetbrains.annotations.NotNull;
29 import org.jetbrains.annotations.Nullable;
60 public void spellAdded(
final int index) {
65 public void spellRemoved(
final int index) {
71 if (spellsManager.displaysFace(face.getFaceNum())) {
96 return new CfItem(0, spell.
getTag(), 0, 0, face, spell.
getName(), spell.
getName(), 0, 0, 0, 0);
String getName()
Returns the spell name.
Interface for listeners interested in SpellsManager events.
int getSpells()
Returns the number of known spells.
SpellsView(@NotNull final SpellsManager spellsManager, @NotNull final FacesManager facesManager)
Creates a new instance.
Manages image information ("faces") needed to display the map view, items, and spell icons...
int getFaceNum()
Returns the face number.
Manages all known spells.
Provides a view of all spells a character knows.
int getSize()
Returns the number of items.the number of items
Describes a Crossfire spell.
void addModifiedRange(final int firstIndex, final int lastIndex)
Marks a range of slots as modified.
int getTag()
Returns the tag ID.
final FacesManager facesManager
The FacesManager for retrieving face information.
CfItem getItem(final int index)
Returns the CfItem in a given slot.the slot index the item ornull if the slot is empty ...
Face getFace(int faceNum)
Returns the Face instance for a given face ID.
Abstract base class for ItemView implementing classes.
final SpellsManager spellsManager
The spells to display.
The representation of a Crossfire Item, client-side.
void addFacesManagerListener(@NotNull FacesManagerListener facesManagerListener)
Adds a FacesManagerListener to be notified about updated faces.
Spell getSpell(@NotNull final String spellName)
Returns a Spell instance by spell name.
Maintains a mapping of face numbers to face data.