Version 1.5APIs subject to change!

multiverse.mars.plugins
Class ClassAbilityPlugin

java.lang.Object
  extended by multiverse.server.engine.EnginePlugin
      extended by multiverse.mars.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 multiverse.server.engine.EnginePlugin
EnginePlugin.DeleteHook, EnginePlugin.DeleteSubObjHook, EnginePlugin.GenerateSubObjectHook, EnginePlugin.GetPropertyMessage, 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 java.lang.String EXPERIENCE_STAT
           
static java.lang.String KILL_EXP_STAT
           
static java.lang.String LEVEL_STAT
           
protected static java.util.HashMap<java.lang.String,ProfessionObject> professions
          Holds the list of professions
protected static java.util.Map<java.lang.String,MarsStatDef> statDefMap
           
 
Fields inherited from class multiverse.server.engine.EnginePlugin
deleteSubObjectSubscription, dumpAllThreadSubscription, dumpAllThreadSubscriptionLock, loadSubObjectSubscription, lock, MSG_TYPE_DUMP_ALL_THREAD_STACKS, MSG_TYPE_GET_PROPERTY, 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 multiverse.msgsys.MessageCallback
NO_FLAGS, RESPONSE_EXPECTED
 
Constructor Summary
ClassAbilityPlugin()
           
 
Method Summary
static void createStats(ClassAbilityObject caobj, MarsAbility 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, MarsSkill 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 ClassAbilityObject getClassAbilityObject(java.lang.Long oid)
           
static void handleLevelIncrement(ClassAbilityObject cao)
           
static void handleLevelingPlayer(CombatInfo player, int lvl)
          This method handles leveling the player profession based on the level that they have reached.
static void handlePlayerXP(CombatInfo target, java.util.Set<java.lang.Long> attackers)
          This function is used when a target dies to give the player XP from the kill.
static void handleSkillAbilityRanking(ClassAbilityObject player, java.lang.String statname, int lvl)
           
static MarsStatDef 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(MarsStatDef 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(MarsStatDef stat, java.lang.String... dependencies)
           
static void sendSkillUpdate(CombatInfo info)
           
 
Methods inherited from class multiverse.server.engine.EnginePlugin
activate, createMBeanInstance, createSubscription, getHookManager, getMessageHandler, getName, getObjectLockManager, getObjectProperties, getObjectProperties, getObjectProperty, getPercentCPULoad, getPluginInfo, getPluginNamespaces, getPluginState, getPluginStatus, getPluginType, getPropertyImpl, getStatusMap, handleMessage, handleMessageImpl, logDepsOutstanding, processKeysAndValues, registerActivateHook, registerDeleteHook, registerLoadHook, registerPluginNamespace, registerPluginNamespaces, registerPluginNamespaces, registerPluginNamespaces, registerSaveHook, registerTransferHook, registerUnloadHook, sendSubObjectResponse, sendSubObjectResponse, sendSubObjectResponse, setMessageHandler, setName, setObjectProperties, setObjectProperties, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectProperty, setObjectPropertyNoResponse, setPercentCPULoad, 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,MarsStatDef> statDefMap

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

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,
                               MarsSkill 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,
                               MarsAbility 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(MarsStatDef 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(MarsStatDef stat,
                                java.lang.String... dependencies)

handleLevelIncrement

public static void handleLevelIncrement(ClassAbilityObject cao)

registerProfession

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

Parameters:
profession -

lookupStatDef

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

sendSkillUpdate

public static void sendSkillUpdate(CombatInfo info)

getClassAbilityObject

public static ClassAbilityObject getClassAbilityObject(java.lang.Long oid)

handlePlayerXP

public static void handlePlayerXP(CombatInfo target,
                                  java.util.Set<java.lang.Long> attackers)
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:
target - Mob killed.
attackers - Objects (oids) that attacked mob.

handleLevelingPlayer

public static void handleLevelingPlayer(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,
                                             java.lang.String statname,
                                             int lvl)


Copyright © 2008 The Multiverse Network, Inc.