public class QuestBehavior extends Behavior implements MessageCallback
Behavior.CommandMessage, Behavior.EventMessagelock, MSG_TYPE_COMMAND, MSG_TYPE_EVENT, objNO_FLAGS, RESPONSE_EXPECTED| Constructor and Description |
|---|
QuestBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate()
Removes the subscriptions this behavior has.
|
void |
endsQuest(AgisQuest quest) |
java.util.Collection<java.lang.Integer> |
getAllQuestRefs() |
java.util.Collection<AgisQuest> |
getAllQuests() |
AgisQuest |
getEndQuest(int questID) |
java.util.Collection<AgisQuest> |
getEndQuests() |
int |
getMerchantFaction() |
int |
getMerchantTable() |
java.util.ArrayList<java.lang.String> |
getOtherActions() |
AgisQuest |
getQuest(int questID) |
java.util.Collection<Dialogue> |
getStartDialogues() |
AgisQuest |
getStartQuest(java.lang.String questName) |
java.util.Collection<java.lang.Integer> |
getStartQuestRefs() |
java.util.Collection<AgisQuest> |
getStartQuests() |
protected void |
handleDialogueState(OID playerOid)
Checks a players faction and/or rep to determine whether this npc will sell items to the player in question.
|
protected void |
handleMerchantState(OID playerOid)
Checks a players faction and/or rep to determine whether this npc will sell items to the player in question.
|
void |
handleMessage(Message msg,
int flags)
Handle message.
|
protected void |
handleOtherActionsState(OID playerOid)
Checks a players faction and/or rep to determine whether this npc will sell items to the player in question.
|
protected void |
handleQuestState(OID playerOid) |
void |
initialize()
Sets up the subscription to receive messages the behavior needs to catch.
|
protected void |
offerDialogueToPlayer(OID playerOid,
Dialogue dialogue) |
protected void |
offerQuestToPlayer(OID playerOid,
java.util.LinkedList<AgisQuest> quests) |
void |
processLevelChangeMsg(ClassAbilityClient.levelChangeMessage msg) |
void |
processSkillLevelChangeMsg(ClassAbilityClient.skillLevelChangeMessage msg) |
void |
processUpdateMsg(AgisMobClient.DialogCheckMessage msg) |
void |
processUpdateMsg(WorldManagerClient.UpdateMessage msg) |
void |
setMerchantFaction(int factionNum) |
void |
setMerchantTable(MerchantTable table) |
void |
setOtherActions(java.util.ArrayList<java.lang.String> otherActions) |
void |
startsDialogue(Dialogue dialogue) |
void |
startsQuest(AgisQuest quest) |
dispatchMessage, getObjectStub, setObjectStubpublic void initialize()
initialize in class Behaviorpublic void deactivate()
deactivate in class Behaviorpublic void handleMessage(Message msg, int flags)
MessageCallbackhandleMessage in interface MessageCallbackhandleMessage in class Behaviormsg - Message sent from other agent.flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.protected void offerQuestToPlayer(OID playerOid, java.util.LinkedList<AgisQuest> quests)
public void processUpdateMsg(WorldManagerClient.UpdateMessage msg)
public void processUpdateMsg(AgisMobClient.DialogCheckMessage msg)
public void processLevelChangeMsg(ClassAbilityClient.levelChangeMessage msg)
public void processSkillLevelChangeMsg(ClassAbilityClient.skillLevelChangeMessage msg)
protected void handleQuestState(OID playerOid)
protected void handleMerchantState(OID playerOid)
playerOid - protected void handleOtherActionsState(OID playerOid)
playerOid - protected void handleDialogueState(OID playerOid)
playerOid - public void startsQuest(AgisQuest quest)
public void endsQuest(AgisQuest quest)
public AgisQuest getQuest(int questID)
public AgisQuest getStartQuest(java.lang.String questName)
public AgisQuest getEndQuest(int questID)
public java.util.Collection<AgisQuest> getStartQuests()
public java.util.Collection<AgisQuest> getEndQuests()
public java.util.Collection<AgisQuest> getAllQuests()
public java.util.Collection<java.lang.Integer> getAllQuestRefs()
public java.util.Collection<java.lang.Integer> getStartQuestRefs()
public void startsDialogue(Dialogue dialogue)
public java.util.Collection<Dialogue> getStartDialogues()
public void setMerchantTable(MerchantTable table)
public int getMerchantTable()
public void setMerchantFaction(int factionNum)
public int getMerchantFaction()
public void setOtherActions(java.util.ArrayList<java.lang.String> otherActions)
public java.util.ArrayList<java.lang.String> getOtherActions()