Atavism Version 2018.1AGIS API

atavism.agis.plugins
Class ClassAbilityPlugin

java.lang.Object
  extended by atavism.server.engine.EnginePlugin
      extended by atavism.agis.plugins.ClassAbilityPlugin
All Implemented Interfaces:
MessageCallback, StatusMapCallback

public class ClassAbilityPlugin
extends EnginePlugin


Nested Class Summary
 class ClassAbilityPlugin.ClassAbilityAddAbilityHook
           
 class ClassAbilityPlugin.ClassAbilityHandleXpHook
           
 class ClassAbilityPlugin.ClassAbilitySubObjectHook
           
 
Nested classes/interfaces inherited from class atavism.server.engine.EnginePlugin
EnginePlugin.DeleteHook, EnginePlugin.DeleteSubObjHook, EnginePlugin.GenerateSubObjectHook, EnginePlugin.GetPropertyMessage, EnginePlugin.GetPropertyNamesMessage, EnginePlugin.LoadHook, EnginePlugin.LoadSubObjHook, EnginePlugin.PluginActivateHook, EnginePlugin.PluginStateMessage, EnginePlugin.SaveHook, EnginePlugin.SaveSubObjHook, EnginePlugin.SetPropertyMessage, EnginePlugin.SubObjData, EnginePlugin.TransferFilter, EnginePlugin.TransferObjectMessage, EnginePlugin.UnloadHook, EnginePlugin.UnloadSubObjHook
 
Field Summary
static boolean AUTO_ADD_ABILITIES_TO_ACTION_BAR
           
static int EXP_MAX_LEVEL_DIFFERENCE
           
static java.lang.String EXPERIENCE_MAX_STAT
           
static java.lang.String EXPERIENCE_STAT
           
static java.lang.String KILL_EXP_STAT
           
static java.lang.String LEVEL_STAT
           
static int MAX_SKILL_ABILITIES
           
static float MOB_EXP_RATE_BOSS
           
static float MOB_EXP_RATE_NORMAL
           
static float MOB_EXP_RATE_RARE
           
static int POINTS_PER_SKILL_LEVEL
           
protected static java.util.HashMap<java.lang.String,ProfessionObject> professions
          Holds the list of professions
static int SKILL_FOURTH_STAT_GAIN_INCREMENT
           
static int SKILL_POINTS_GIVEN_PER_LEVEL
           
static int SKILL_PRIMARY_STAT_GAIN_INCREMENT
           
static int SKILL_SECONDARY_STAT_GAIN_INCREMENT
           
static int SKILL_STARTING_MAX
           
static int SKILL_THIRD_STAT_GAIN_INCREMENT
           
static float SKILL_UP_RATE
           
protected static java.util.Map<java.lang.String,AgisStatDef> statDefMap
           
static int TOTAL_SKILL_MAX
           
static boolean USE_SKILL_MAX
           
static boolean USE_SKILL_PURCHASE_POINTS
           
 
Fields inherited from class atavism.server.engine.EnginePlugin
deleteSubObjectSubscription, dumpAllThreadSubscription, dumpAllThreadSubscriptionLock, loadSubObjectSubscription, lock, MSG_TYPE_DUMP_ALL_THREAD_STACKS, MSG_TYPE_GET_PROPERTY, MSG_TYPE_GET_PROPERTY_NAMES, MSG_TYPE_PLUGIN_STATE, MSG_TYPE_SET_PROPERTY, MSG_TYPE_SET_PROPERTY_NONBLOCK, MSG_TYPE_TRANSFER_OBJECT, pluginStateSubscription, propertySubscription, saveSubObjectSubscription, selectionFilter, selectionSubscription, setSubObjectPersistenceSubscription, subObjectSubscription, unloadSubObjectSubscription
 
Fields inherited from interface atavism.msgsys.MessageCallback
NO_FLAGS, RESPONSE_EXPECTED
 
Constructor Summary
ClassAbilityPlugin()
           
 
Method Summary
static void calculatePlayerStats(CombatInfo info, CharacterTemplate tmpl)
           
static void createStats(ClassAbilityObject caobj, AgisAbility ability, java.lang.Integer xp_use)
          This method creates stats based on the passed in ability, and assigns them to the player via the created players' ClassAbilityObject.
static void createStats(ClassAbilityObject caobj, AgisSkill skill, java.lang.Integer xp_use)
          This method creates stats based on the passed in skill, and assigns them to the player via the created players' ClassAbilityObject.
static CharacterTemplate getCharacterTemplate(java.lang.String key)
           
static ClassAbilityObject getClassAbilityObject(OID oid)
           
static int GetSkillPointCost(int pointsPurchased)
           
static int GetStartingXpReq()
           
static void handleLevelingProfessionPlayer(CombatInfo player, int lvl)
          This method handles leveling the player profession based on the level that they have reached.
static void handleLevelUp(CombatInfo player, int newLevel)
          This method calculates what a players stats should be based on their new level
static void handleSkillAbilityRanking(ClassAbilityObject player, int statid, int lvl)
           
static AgisStatDef lookupStatDef(java.lang.String name)
           
 void onActivate()
          for developers extending the EnginePlugin object, it may be easier to use the onActivate() method which gets called when the plugin is being activated by the Engine.
 void registerHooks()
           
static void registerProfession(ProfessionObject profession)
          This method allows registering a profession.
static void registerStat(AgisStatDef stat)
          Register the stat with the specific player, since only the player themselves have to be aware of what stats they should be paying attention to.
static void registerStat(AgisStatDef stat, java.lang.String... dependencies)
           
static void rewardExpForKill(CombatInfo target, OID attackerOid, float expPercent)
          This function is used when a target dies to give the player XP from the kill.
static void sendSkillUpdate(CombatInfo info)
           
 
Methods inherited from class atavism.server.engine.EnginePlugin
activate, createMBeanInstance, createSubscription, getHookManager, getMessageHandler, getName, getObjectLockManager, getObjectProperties, getObjectProperties, getObjectProperty, getObjectPropertyNames, getPercentCPULoad, getPluginAvailable, getPluginInfo, getPluginNamespaces, getPluginState, getPluginStatus, getPluginType, getPropertyImpl, getPropertyNamesImpl, getStatusMap, handleMessage, handleMessageImpl, logDepsOutstanding, processKeysAndValues, registerActivateHook, registerDeleteHook, registerLoadHook, registerPluginNamespace, registerPluginNamespaces, registerPluginNamespaces, registerPluginNamespaces, registerSaveHook, registerTransferHook, registerUnloadHook, sendSubObjectResponse, sendSubObjectResponse, sendSubObjectResponse, setMessageHandler, setName, setObjectProperties, setObjectProperties, setObjectProperties, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectProperty, setObjectPropertyNoResponse, setPercentCPULoad, setPluginAvailable, setPluginInfo, setPluginType, setPropertyImpl, transferObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

professions

protected static java.util.HashMap<java.lang.String,ProfessionObject> professions
Holds the list of professions


statDefMap

protected static java.util.Map<java.lang.String,AgisStatDef> statDefMap

POINTS_PER_SKILL_LEVEL

public static final int POINTS_PER_SKILL_LEVEL
See Also:
Constant Field Values

MAX_SKILL_ABILITIES

public static final int MAX_SKILL_ABILITIES
See Also:
Constant Field Values

TOTAL_SKILL_MAX

public static int TOTAL_SKILL_MAX

SKILL_UP_RATE

public static float SKILL_UP_RATE

USE_SKILL_PURCHASE_POINTS

public static boolean USE_SKILL_PURCHASE_POINTS

SKILL_POINTS_GIVEN_PER_LEVEL

public static int SKILL_POINTS_GIVEN_PER_LEVEL

USE_SKILL_MAX

public static boolean USE_SKILL_MAX

SKILL_STARTING_MAX

public static int SKILL_STARTING_MAX

EXP_MAX_LEVEL_DIFFERENCE

public static int EXP_MAX_LEVEL_DIFFERENCE

AUTO_ADD_ABILITIES_TO_ACTION_BAR

public static boolean AUTO_ADD_ABILITIES_TO_ACTION_BAR

MOB_EXP_RATE_NORMAL

public static float MOB_EXP_RATE_NORMAL

MOB_EXP_RATE_RARE

public static float MOB_EXP_RATE_RARE

MOB_EXP_RATE_BOSS

public static float MOB_EXP_RATE_BOSS

SKILL_PRIMARY_STAT_GAIN_INCREMENT

public static int SKILL_PRIMARY_STAT_GAIN_INCREMENT

SKILL_SECONDARY_STAT_GAIN_INCREMENT

public static int SKILL_SECONDARY_STAT_GAIN_INCREMENT

SKILL_THIRD_STAT_GAIN_INCREMENT

public static int SKILL_THIRD_STAT_GAIN_INCREMENT

SKILL_FOURTH_STAT_GAIN_INCREMENT

public static int SKILL_FOURTH_STAT_GAIN_INCREMENT

KILL_EXP_STAT

public static final java.lang.String KILL_EXP_STAT
See Also:
Constant Field Values

EXPERIENCE_STAT

public static final java.lang.String EXPERIENCE_STAT
See Also:
Constant Field Values

EXPERIENCE_MAX_STAT

public static final java.lang.String EXPERIENCE_MAX_STAT
See Also:
Constant Field Values

LEVEL_STAT

public static final java.lang.String LEVEL_STAT
See Also:
Constant Field Values
Constructor Detail

ClassAbilityPlugin

public ClassAbilityPlugin()
Method Detail

onActivate

public void onActivate()
Description copied from class: EnginePlugin
for developers extending the EnginePlugin object, it may be easier to use the onActivate() method which gets called when the plugin is being activated by the Engine. this is an alternative to calling registerActivateHook()

Overrides:
onActivate in class EnginePlugin

registerHooks

public void registerHooks()

createStats

public static void createStats(ClassAbilityObject caobj,
                               AgisSkill skill,
                               java.lang.Integer xp_use)
This method creates stats based on the passed in skill, and assigns them to the player via the created players' ClassAbilityObject.

Parameters:
caobj -
skill -
xp_use -

createStats

public static void createStats(ClassAbilityObject caobj,
                               AgisAbility ability,
                               java.lang.Integer xp_use)
This method creates stats based on the passed in ability, and assigns them to the player via the created players' ClassAbilityObject.

Parameters:
caobj -
ability -
xp_use -

registerStat

public static void registerStat(AgisStatDef stat)
Register the stat with the specific player, since only the player themselves have to be aware of what stats they should be paying attention to.

Parameters:
stat -

registerStat

public static void registerStat(AgisStatDef stat,
                                java.lang.String... dependencies)

registerProfession

public static void registerProfession(ProfessionObject profession)
This method allows registering a profession.

Parameters:
profession -

lookupStatDef

public static AgisStatDef lookupStatDef(java.lang.String name)

sendSkillUpdate

public static void sendSkillUpdate(CombatInfo info)

getClassAbilityObject

public static ClassAbilityObject getClassAbilityObject(OID oid)

rewardExpForKill

public static void rewardExpForKill(CombatInfo target,
                                    OID attackerOid,
                                    float expPercent)
This function is used when a target dies to give the player XP from the kill. It is in the CombatAPI to allow for modification as systems are added to the combat.

Parameters:
attacker -
target -
numAttackers -

handleLevelUp

public static void handleLevelUp(CombatInfo player,
                                 int newLevel)
This method calculates what a players stats should be based on their new level

Parameters:
player - - the combat Info of the player levelling up
newLevel - - the level the player is now

calculatePlayerStats

public static void calculatePlayerStats(CombatInfo info,
                                        CharacterTemplate tmpl)

handleLevelingProfessionPlayer

public static void handleLevelingProfessionPlayer(CombatInfo player,
                                                  int lvl)
This method handles leveling the player profession based on the level that they have reached. Modifications are based on the leveling map for the profession in question as well as the stat's own leveling map, if applicable.

Parameters:
player -
lvl -

handleSkillAbilityRanking

public static void handleSkillAbilityRanking(ClassAbilityObject player,
                                             int statid,
                                             int lvl)

GetSkillPointCost

public static int GetSkillPointCost(int pointsPurchased)

GetStartingXpReq

public static int GetStartingXpReq()

getCharacterTemplate

public static CharacterTemplate getCharacterTemplate(java.lang.String key)


Copyright © 2018 Dragonsan Studios Sp. z o.o.