|
|||||||||
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.EnginePlugin
atavism.agis.plugins.ArenaPlugin
public class ArenaPlugin
This class is responsible for catching the messages sent out by the ArenaClient then dealing with the data received appropriately. In particular, this class handles the queuing for arenas and will create new arenas when enough players are queued.
Nested Class Summary |
---|
Field Summary | |
---|---|
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 Logger |
log
|
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
|
Fields inherited from interface atavism.msgsys.MessageCallback |
---|
NO_FLAGS, RESPONSE_EXPECTED |
Constructor Summary | |
---|---|
ArenaPlugin()
|
Method Summary | |
---|---|
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)
|
static void |
serverTimeUpdate(int hour,
int minute)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String ARENA_PLUGIN_NAME
protected static final Logger log
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
Constructor Detail |
---|
public ArenaPlugin()
Method Detail |
---|
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 static void serverTimeUpdate(int hour, int minute)
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()
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |