Package games.stendhal.server.entity
Class DressedEntity
- All Implemented Interfaces:
Killer
,Cloneable
,Iterable<String>
,Serializable
Defines an entity whose appearance (outfit) can be changed.
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.game.RPObject
RPObject.ID
-
Field Summary
Fields inherited from class games.stendhal.server.entity.RPEntity
atk, ATTR_TITLE, damageReceived, def, level, lv_cap, ratk, statusAttackers, statusList, totalDamageReceived
Fields inherited from class games.stendhal.server.entity.GuidedEntity
baseSpeed, pathnotifier
Fields inherited from class marauroa.common.game.RPObject
INVALID_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
dropItemsOn(Corpse corpse)
static void
Gets this entity's outfit.gets the color mapboolean
isNaked()
Checks if the entity is not wearing clothes.abstract void
logic()
Perform cycle logic.void
This is simply for backwards compatibility to update a user's outfit with the "outfit" attribute.void
void
Makes this player wear the given outfit.void
Sets this entity's outfit.void
Makes this player wear the given outfit.void
Makes this player wear the given outfit.void
Sets the entity's outfit using a string code.void
Sets the entity's outfit using a string code.void
setOutfitColor(String part, int color)
Set color for single outfit layer.void
setOutfitColor(String part, Color color)
Set color for single outfit layer.void
setOutfitColor(String part, String color)
void
setOutfitColors(Map<String,Integer> parts)
Set colors for the entire outfit.void
setOutfitWithDetail(Outfit outfit, boolean temporary)
void
unsetOutfitColor(String part)
Unset color of a single layer.Methods inherited from class games.stendhal.server.entity.RPEntity
addAtkXP, addBaseMana, addDefXP, addKarma, addMana, addRatkXP, addStatusAttacker, addXP, applyDefXP, applyDistanceAttackModifiers, attack, canDoRangeAttack, canHit, damage, damageDone, delayedDamage, describe, drop, drop, drop, dropDroppableItem, dropWithInfostring, dropWithInfostring, entityAsOnlinePlayer, entityAsPet, equip, equipOrPutOnGround, equipToInventoryOnly, getAllEquipped, getAllEquippedWithInfostring, getAmmunition, getArmor, getAtk, getAtkXP, getAttackingRPEntities, getAttackRate, getAttackSources, getAttackTarget, getBaseHP, getBaseMana, getBloodClass, getBoots, getCappedAtk, getCappedDef, getCappedRatk, getCloak, getCorpseDeserver, getCorpseHeight, getCorpseName, getCorpseWidth, getDamageType, getDeathSound, getDef, getDefenseItems, getDefXP, getDescriptionName, getDroppables, getEquippedItemClass, getFirstEquipped, getHarmlessCorpseName, getHelmet, getHP, getItemAtk, getItemDef, getItemRatk, getKarma, getLanguage, getLegs, getLevel, getLVCap, getMana, getMaxRangeForArcher, getMissileIfNotHoldingOtherWeapon, getName, getNumberOfEquipped, getRangedDamageType, getRangeWeapon, getRatk, getRatkXP, getRing, getsFightXpFrom, getShield, getSlotToEquip, getStatusList, getSusceptibility, getTitle, getTotalNumberOf, getWeapon, getWeapons, getXP, handleLifesteal, handlePortal, hasArmor, hasBoots, hasCloak, hasHelmet, hasLegs, hasLineOfSight, hasRing, hasShield, hasStatus, heal, heal, heal, incAtkXP, incDefXP, incRatkXP, initHP, isAttackable, isAttacked, isAttacking, isEquipped, isEquipped, isEquippedItemClass, isEquippedItemInSlot, isEquippedWithInfostring, isEquippedWithInfostring, isInvisibleToCreatures, makeCorpse, maybeDropDroppables, onAdded, onDamaged, onDead, onDead, onRemoved, rememberAttacker, rewardKillerAnimals, rewardKillers, sendPrivateText, sendPrivateText, setAtk, setAtkInternal, setAtkXP, setBaseHP, setBaseMana, setBlood, setDeathSound, setDef, setDefInternal, setDefXP, setHP, setLevel, setLVCap, setMana, setName, setRatk, setRatkInternal, setRatkXP, setRatkXPInternal, setShadowStyle, setTarget, setTitle, setXP, stopAttack, stopAttacking, subXP, update, updateItemAtkDef, updateLevel, useKarma, useKarma, useKarma
Methods inherited from class games.stendhal.server.entity.GuidedEntity
addSuspend, addSuspend, applyMovement, atMovementRadius, clearPath, followPath, getBaseSpeed, getCollisionAction, getDirectionFromOrigin, getDistanceFromOrigin, getGuide, getPath, getPathPosition, handleObjectCollision, hasPath, isPathLoop, onFinishedPath, onMoved, onNodeReached, onOutsideMovementRadius, removeSuspend, reroute, retracePath, setBaseSpeed, setCollisionAction, setPath, setPath, setPathAndPosition, setPathPosition, setRandomMovementRadius, setRandomMovementRadius, setRetracePath, setUsesRandomPath, stop, updateModifiedAttributes, usesRandomPath
Methods inherited from class games.stendhal.server.entity.ActiveEntity
canMoveTo, canMoveTo, faceto, faceToward, getDirection, getDirectionToward, getDirectionToward, getResistance, getSpeed, getStepsTaken, handleLeaveZone, handleSimpleCollision, ignoresCollision, isFacingToward, isGhost, isMoveCompleted, isZoneChangeAllowed, move, setDirection, setIgnoresCollision, setSpeed, stopped
Methods inherited from class games.stendhal.server.entity.Entity
getAdjacentNodes, getArea, getArea, getCursor, getDescription, getEntitySlot, getHeight, getOrigin, getResistance, getWidth, getX, getY, getZone, hasDescription, isInSight, isObstacle, nextTo, nextTo, notifyWorldAboutChanges, setCursor, setDescription, setEntityClass, setEntitySubclass, setMenu, setPosition, setResistance, setSize, setVisibility, slotIterator, slots, squaredDistance, squaredDistance
Methods inherited from class marauroa.common.game.RPObject
addEvent, addLink, addLink, addMap, addSlot, addSlot, applyDifferences, clearEvents, clearVisible, clone, containsKey, equals, events, eventsIterator, fill, get, getBaseContainer, getBoolean, getContainer, getContainerBaseOwner, getContainerOwner, getContainerSlot, getDifferences, getDouble, getFromSlots, getID, getInt, getLink, getLinkedObject, getMap, getSlot, has, hashCode, hasLink, hasMap, hasSlot, hide, isContained, isEmpty, isHidden, isStorable, maps, put, put, put, put, readObject, remove, removeLink, removeMap, removeSlot, resetAddedAndDeleted, resetAddedAndDeletedMaps, resetAddedAndDeletedRPLink, resetAddedAndDeletedRPSlot, setAddedMaps, setAddedRPSlot, setContainer, setDeletedMaps, setDeletedRPSlot, setID, size, slots, slotsIterator, store, toString, unhide, unstore, writeObject, writeObject, writeToJson
Methods inherited from class marauroa.common.game.SlotOwner
deserializeRPSlots, fill, serializeRPSlots
Methods inherited from class marauroa.common.game.Attributes
add, applyDifferences, get, getBool, getDouble, getInt, getList, getLong, getRPClass, has, instanceOf, iterator, put, put, put, put, readFromMap, remove, resetAddedAndDeletedAttributes, setAddedAttributes, setDeletedAttributes, setRPClass, setRPClass, toAttributeString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DressedEntity
public DressedEntity() -
DressedEntity
-
-
Method Details
-
generateRPClass
public static void generateRPClass() -
put
This is simply for backwards compatibility to update a user's outfit with the "outfit" attribute.- Overrides:
put
in classAttributes
- Parameters:
attr
- the attribute to be set.value
- the value we want to set.
-
getOutfit
Gets this entity's outfit. Note: some entities (e.g. sheep, many NPC's, all monsters) don't use the outfit system.- Returns:
- The outfit, or null if this RPEntity is represented as a single sprite rather than an outfit combination.
-
getOriginalOutfit
-
getOutfitColors
gets the color map- Returns:
- color map
-
setOutfit
Sets this entity's outfit. Note: some entities (e.g. sheep, many NPC's, all monsters) don't use the outfit system.- Parameters:
outfit
- The new outfit.
-
setOutfit
Makes this player wear the given outfit. If the given outfit contains null parts, the current outfit will be kept for these parts. If the outfit change includes any colors, they should be changed after calling this.- Parameters:
outfit
- The new outfit.temporary
- If true, the original outfit will be stored so that it can be restored later.
-
setOutfit
Makes this player wear the given outfit. If the given outfit contains null parts, the current outfit will be kept for these parts. If the outfit change includes any colors, they should be changed after calling this. Currently supported layers should be in this order: body, dress, head, mouth, eyes, mask, hair, hat, detail- Parameters:
layers
- Integer indexes of each outfit layer or null.
-
setOutfit
Makes this player wear the given outfit. If the given outfit contains null parts, the current outfit will be kept for these parts. If the outfit change includes any colors, they should be changed after calling this. Currently supported layers should be in this order: body, dress, head, mouth, eyes, mask, hair, hat, detail- Parameters:
temporary
- If true, the original outfit will be stored so that it can be restored later.layers
- Integer indexes of each outfit layer or null.
-
setOutfit
Sets the entity's outfit using a string code. E.g.: body=1,hair=5,dress=13- Parameters:
strcode
-
-
setOutfit
Sets the entity's outfit using a string code. E.g.: body=1,hair=5,dress=13- Parameters:
strcode
- String code representing outfit.temporary
- If true, the original outfit will be stored so that it can be restored later.
-
setOutfitWithDetail
-
setOutfitColor
Set color for single outfit layer.- Parameters:
part
- Layer to be colored.color
-Integer
value color to use.
-
setOutfitColor
Set color for single outfit layer.- Parameters:
part
- Layer to be colored.color
-Color
value color to use.
-
setOutfitColor
-
setOutfitColors
Set colors for the entire outfit.- Parameters:
parts
-Map
of layers & colors (Integer
).
-
isNaked
public boolean isNaked()Checks if the entity is not wearing clothes. -
unsetOutfitColor
Unset color of a single layer.- Parameters:
part
- Layer to be unset.
-
restoreOriginalOutfit
public void restoreOriginalOutfit() -
dropItemsOn
- Specified by:
dropItemsOn
in classRPEntity
-
logic
public abstract void logic()Description copied from class:RPEntity
Perform cycle logic.
-