Class QuestStateGreaterThanCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.QuestStateGreaterThanCondition
- All Implemented Interfaces:
ChatCondition
,PreTransitionCondition
@Dev(category=QUEST_SLOT,
label="State?")
public class QuestStateGreaterThanCondition
extends Object
implements ChatCondition
Condition to check if the value in a quest slot is greater than an expected value. If the value is not a number, it is treated as 0.
- Author:
- madmetzger
-
Constructor Summary
ConstructorDescriptionQuestStateGreaterThanCondition(String quest, int index, int expectedSmallerValue)
Create a new QuestStateGreaterThanCondition -
Method Summary
-
Constructor Details
-
QuestStateGreaterThanCondition
Create a new QuestStateGreaterThanCondition- Parameters:
quest
- name of the quest slotindex
- index where the number is stored in the quest slotexpectedSmallerValue
- expected smaller value to compare
-
-
Method Details
-
fire
Description copied from interface:PreTransitionCondition
can the transition be done?- Specified by:
fire
in interfaceChatCondition
- Specified by:
fire
in interfacePreTransitionCondition
- Parameters:
player
- player who caused the transitionsentence
- text he/she saidnpc
- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
hashCode
public int hashCode() -
equals
-