Class KillsQuestSlotNeedUpdateCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.KillsQuestSlotNeedUpdateCondition
- All Implemented Interfaces:
ChatCondition
,PreTransitionCondition
@Dev(category=IGNORE,
label="Kills?")
public class KillsQuestSlotNeedUpdateCondition
extends Object
implements ChatCondition
Checking if player's quest slot need update with newer creatures and update it if required
Quest string should have in proper quest index string like "creature1,w,x,y,z,creature2,a,b,c,d,creature3,..."
Where creature1, creature2 - names of creatures to kill;
w,x and a,b - number of creatures to kill, solo and shared;
y,z and c,d - number of creatures killed by player before starting this quest, both solo and shared.
- Author:
- yoriy
- See Also:
StartRecordingKillsAction
,KilledForQuestCondition
,KilledInSumForQuestCondition
-
Constructor Summary
ConstructorDescriptionKillsQuestSlotNeedUpdateCondition(String quest, int index, List<String> creatures, boolean do_update)
Creates a new KillsQuestSlotNeedUpdateCondition.KillsQuestSlotNeedUpdateCondition(String quest, int index, Map<String,List<String>> allcreatures, boolean do_update)
Creates a new KillsQuestSlotNeedUpdateCondition. -
Method Summary
-
Constructor Details
-
KillsQuestSlotNeedUpdateCondition
public KillsQuestSlotNeedUpdateCondition(String quest, int index, List<String> creatures, boolean do_update)Creates a new KillsQuestSlotNeedUpdateCondition.- Parameters:
quest
- - the quest slotindex
- - quest slot index where information stored (creatures records)creatures
- - list of creatures required to kill by npcdo_update
- - if true then player's quest slot would update
-
KillsQuestSlotNeedUpdateCondition
public KillsQuestSlotNeedUpdateCondition(String quest, int index, Map<String,List<String>> allcreatures, boolean do_update)Creates a new KillsQuestSlotNeedUpdateCondition.- Parameters:
quest
- - the quest slotindex
- - quest slot index where information stored (creatures group string followed by creatures records)allcreatures
- - map of creatures groups, required to kill by npcdo_update
- - if true then player's quest slot would update
-
-
Method Details
-
fire
return true if player need update, or if required update was unsuccessful.- 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
-
toString
-
hashCode
public int hashCode() -
equals
-