public class ArenaPlugin extends 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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARENA_PLUGIN_NAME |
protected static java.util.Map<java.lang.Integer,ArenaCategory> |
arenaCategories |
protected int |
arenaCheckType |
protected static java.util.Map<OID,java.lang.Integer> |
arenaOids |
protected static java.util.Map<java.lang.Integer,Arena> |
arenas |
protected static java.util.ArrayList<ArenaTemplate> |
arenaTemplates |
static int |
CTF_ARENA |
static int |
DEATHMATCH_ARENA |
protected static java.util.Map<java.lang.Integer,DuelChallenge> |
duelChallenges |
static int |
duelFlagTemplateID |
protected static java.util.Map<java.lang.Integer,Duel> |
duels |
static int |
FIRST_GAME_MULTIPLIER |
protected static int |
hour |
protected static Logger |
log |
protected static int |
minute |
static int |
MUNCHER_ARENA |
protected static java.util.Map<java.lang.Integer,ArenaQueue> |
queues |
static java.lang.String |
RACE_SMOO |
static int |
SECOND_GAME_MULTIPLIER |
protected static java.util.HashMap<OID,ArenaStats> |
statsMap |
static int |
THIRD_GAME_MULTIPLIER |
protected static java.lang.String |
WORLD_TIME_ZONE |
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
NO_FLAGS, RESPONSE_EXPECTED
Constructor and Description |
---|
ArenaPlugin() |
Modifier and Type | Method and Description |
---|---|
static void |
addArenaTemplate(ArenaTemplate template)
Adds the given arenaTemplate to the ArrayList of arenaTemplates then
creates a new ArenaQueue object to handle players queuing for that
arena type.
|
void |
checkArenas()
Checks all queues to see if there are any that have enough players in them to start an arena.
|
static ArenaCategory |
getArenaCategory(int categoryID)
Gets the ArenaCategory object for the given category id.
|
static java.util.Map<java.lang.Integer,ArenaQueue> |
getArenaQueues() |
static java.util.Map<java.lang.Integer,Arena> |
getArenas() |
static java.util.Map<java.lang.Integer,DuelChallenge> |
getDuelChallenges() |
static java.util.Map<java.lang.Integer,Duel> |
getDuels() |
java.lang.String |
getName()
Returns the name of the plugin.
|
static int |
getNextArenaID() |
static ArenaStats |
getPlayerArenaStats(OID oid) |
void |
loadArenasFromDatabase() |
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.
|
protected void |
registerHooks() |
void |
SendArenasQueued(OID oid)
Whenever a player joins or leaves an arena queue this function should be called so the current list
of arenas currently queued for can be sent down to the client.
|
static void |
sendChangePlayerRaceMessage(OID oid,
java.lang.String race,
boolean temporary) |
void |
serverTimeUpdate(int wHour,
int wMinute) |
static void |
updateArenaStats(int arenaType,
int arenaSubType,
OID oid,
int kills,
int deaths,
boolean wonArena,
int expAwarded,
int ratingAdjustment)
Updates the players stats for this arena type based on their performance in the arena battle.
|
activate, createMBeanInstance, createSubscription, getHookManager, getMessageHandler, 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
public static java.lang.String ARENA_PLUGIN_NAME
protected static final Logger log
protected static int hour
protected static int minute
protected static java.util.Map<java.lang.Integer,ArenaCategory> arenaCategories
protected static java.util.ArrayList<ArenaTemplate> arenaTemplates
protected static java.util.Map<java.lang.Integer,Arena> arenas
protected static java.util.Map<OID,java.lang.Integer> arenaOids
protected static java.util.Map<java.lang.Integer,ArenaQueue> queues
protected int arenaCheckType
protected static java.util.HashMap<OID,ArenaStats> statsMap
protected static java.util.Map<java.lang.Integer,DuelChallenge> duelChallenges
protected static java.util.Map<java.lang.Integer,Duel> duels
public static final int MUNCHER_ARENA
public static final int DEATHMATCH_ARENA
public static final int CTF_ARENA
public static int duelFlagTemplateID
public static int FIRST_GAME_MULTIPLIER
public static int SECOND_GAME_MULTIPLIER
public static int THIRD_GAME_MULTIPLIER
protected static java.lang.String WORLD_TIME_ZONE
public static java.lang.String RACE_SMOO
public java.lang.String getName()
EnginePlugin
getName
in class EnginePlugin
EnginePlugin.setName(String)
public void onActivate()
EnginePlugin
onActivate
in class EnginePlugin
protected void registerHooks()
public void loadArenasFromDatabase()
public void serverTimeUpdate(int wHour, int wMinute)
public static void sendChangePlayerRaceMessage(OID oid, java.lang.String race, boolean temporary)
public void checkArenas()
public static ArenaCategory getArenaCategory(int categoryID)
public static void updateArenaStats(int arenaType, int arenaSubType, OID oid, int kills, int deaths, boolean wonArena, int expAwarded, int ratingAdjustment)
oid
- public static ArenaStats getPlayerArenaStats(OID oid)
public static void addArenaTemplate(ArenaTemplate template)
template:
- the ArenaTemplate to addpublic void SendArenasQueued(OID oid)
oid:
- the oid of the player who needs their arenas queued for data sentpublic static java.util.Map<java.lang.Integer,Arena> getArenas()
public static java.util.Map<java.lang.Integer,ArenaQueue> getArenaQueues()
public static java.util.Map<java.lang.Integer,DuelChallenge> getDuelChallenges()
public static java.util.Map<java.lang.Integer,Duel> getDuels()
public static int getNextArenaID()