Class HasSpentMoneyCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.AbstractChatCondition
games.stendhal.server.entity.npc.condition.HasSpentMoneyCondition
- All Implemented Interfaces:
ChatCondition,PreTransitionCondition
Condition to check if a player has spent an amount of money by
buying from NPCs.
-
Constructor Summary
ConstructorsConstructorDescriptionHasSpentMoneyCondition(int amount) Creates a condition that checks if player has spent an amount of money with any NPC.HasSpentMoneyCondition(int amount, String... npcs) Creates a condition that checks if player has spent an amount of money with each NPC.HasSpentMoneyCondition(int amount, List<String> npcs) Creates a condition that checks if player has spent an amount of money with each NPC.HasSpentMoneyCondition(Map<String, Integer> amounts) Creates a condition that checks if player has spent an amount of money with each NPC. -
Method Summary
Methods inherited from class games.stendhal.server.entity.npc.condition.AbstractChatCondition
getNextUniqueHashModifier
-
Constructor Details
-
HasSpentMoneyCondition
public HasSpentMoneyCondition(int amount) Creates a condition that checks if player has spent an amount of money with any NPC.- Parameters:
amount- The minimum amount required.
-
HasSpentMoneyCondition
Creates a condition that checks if player has spent an amount of money with each NPC.- Parameters:
amount- The minimum amount required.npcs- NPC seller names.
-
HasSpentMoneyCondition
Creates a condition that checks if player has spent an amount of money with each NPC.- Parameters:
amount- The minimum amount required.npcs- NPC seller names.
-
HasSpentMoneyCondition
Creates a condition that checks if player has spent an amount of money with each NPC.- Parameters:
amounts- NPC seller names & amount required for each.
-
-
Method Details
-
fire
Description copied from interface:PreTransitionConditioncan the transition be done?- Parameters:
player- player who caused the transitionsentence- text he/she saidentity- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
toString
-
hashCode
public int hashCode() -
equals
-