Class TransactionBehaviour
java.lang.Object
games.stendhal.common.grammar.ItemParser
games.stendhal.server.entity.npc.behaviour.impl.Behaviour
games.stendhal.server.entity.npc.behaviour.impl.TransactionBehaviour
- Direct Known Subclasses:
MerchantBehaviour
,MultiProducerBehaviour
,ProducerBehaviour
,RepairerBehaviour
-
Field Summary
Fields inherited from class games.stendhal.common.grammar.ItemParser
itemNames
-
Constructor Summary
ConstructorDescriptionTransactionBehaviour(String itemName)
TransactionBehaviour(Set<String> itemNames)
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
transactAgreedDeal(ItemParserResult res, EventRaiser seller, Player player)
Transacts the deal that is described in BehaviourResult.Methods inherited from class games.stendhal.server.entity.npc.behaviour.impl.Behaviour
getRejectedTransactionAction, getTransactionCondition
Methods inherited from class games.stendhal.common.grammar.ItemParser
getErrormessage, getItemNames, parse
-
Constructor Details
-
TransactionBehaviour
-
TransactionBehaviour
-
-
Method Details
-
transactAgreedDeal
public abstract boolean transactAgreedDeal(ItemParserResult res, EventRaiser seller, Player player)Transacts the deal that is described in BehaviourResult.- Parameters:
res
- result of the Behaviour parsingseller
- The NPC who sells/buysplayer
- The player who buys/sells- Returns:
- true if the transaction was successful.
-