|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.server.engine.Behavior
atavism.agis.behaviors.QuestBehavior
public class QuestBehavior
Controls both Quest and Dialogue interactions for an NPC. This needs to be given to any mob that can start or end Quests and Dialogues. Should be renamed to InteractionBehavior at some point in the future.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class atavism.server.engine.Behavior |
---|
Behavior.CommandMessage, Behavior.EventMessage |
Field Summary |
---|
Fields inherited from class atavism.server.engine.Behavior |
---|
lock, MSG_TYPE_COMMAND, MSG_TYPE_EVENT, obj |
Fields inherited from interface atavism.msgsys.MessageCallback |
---|
NO_FLAGS, RESPONSE_EXPECTED |
Constructor Summary | |
---|---|
QuestBehavior()
|
Method Summary | |
---|---|
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(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)
|
Methods inherited from class atavism.server.engine.Behavior |
---|
dispatchMessage, getObjectStub, setObjectStub |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuestBehavior()
Method Detail |
---|
public void initialize()
initialize
in class Behavior
public void activate()
activate
in class Behavior
public void deactivate()
deactivate
in class Behavior
public void handleMessage(Message msg, int flags)
MessageCallback
handleMessage
in interface MessageCallback
handleMessage
in class Behavior
msg
- 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)
protected void offerDialogueToPlayer(OID playerOid, Dialogue dialogue)
public void processUpdateMsg(WorldManagerClient.UpdateMessage 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()
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |