Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.ScriptMgr Class Reference

List of all members.

Classes

class  GameCommand
 This class will hold all info about a gamecommand. More...

Static Public Member Functions

static GameCommand GetCommand (string commandName)
 Gets the requested command if it exists.
static GameCommand GuessCommand (string commandName)
 Looking for exact match first, then, if nothing found, trying to guess command using first letters.
static string[] GetCommandList (ePrivLevel plvl, bool addDesc)
 Returns an array of all the available commands with the specified plvl and their descriptions.
static bool LoadCommands (bool quiet=false)
 Searches the script assembly for all command handlers.
static bool HandleCommand (GameClient client, string cmdLine)
 Called when a command needs to be handled.
static bool HandleCommandNoPlvl (GameClient client, string cmdLine)
 Called when a command needs to be handled without plvl being taken into consideration.
static bool CompileScripts (bool compileVB, string path, string dllName, string[] asm_names)
 Compiles the scripts into an assembly.
static void AddOrReplaceAssembly (Assembly assembly)
 Add or replace an assembly in the collection of compiled assemblies.
static bool RemoveAssembly (string fullName)
 Removes an assembly from the game servers list of usable assemblies.
static Hashtable FindAllAbilityActionHandler (Assembly asm)
 searches the given assembly for AbilityActionHandlers
static Hashtable FindAllSpecActionHandler (Assembly asm)
 searches the script directory for SpecActionHandlers
static ICharacterClass FindCharacterClass (int id)
 Searches for ClassSpec's by id in a given assembly.
static Type FindNPCGuildScriptClass (string guild, eRealm realm)
 searches for a npc guild script
static IControlledBrain CreateControlledBrain (GamePlayer owner)
 Constructs a new brain for player controlled npcs.
static ISpellHandler CreateSpellHandler (GameLiving caster, Spell spell, SpellLine line)
 Create a spell handler for caster with given spell.
static void ClearSpellHandlerCache ()
 Clear all spell handlers from the cashe, forcing a reload when a spell is cast.
static IServerRules CreateServerRules (eGameServerType serverType)
 Create server rules handler for specified server type.
static Type GetType (string name)
 Search for a type by name; first in GameServer assembly then in scripts assemblies.
static Type[] GetDerivedClasses (Type baseType)
 Finds all classes that derive from given type. First check scripts then GameServer assembly.

Static Protected Member Functions

static Hashtable FindAllNPCGuildScriptClasses (eRealm realm, Assembly asm)
 Searches for NPC guild scripts.

Static Protected Attributes

static Hashtable[] m_gs_guilds = new Hashtable[(int)eRealm._Last + 1]
static Hashtable[] m_script_guilds = new Hashtable[(int)eRealm._Last + 1]

Properties

static Assembly[] Scripts [get]
 Get an array of all script assemblies.
static Type DefaultControlledBrainType [get, set]

Member Function Documentation

static void DOL.GS.ScriptMgr.AddOrReplaceAssembly ( Assembly  assembly) [static]

Add or replace an assembly in the collection of compiled assemblies.

Parameters:
assembly
static void DOL.GS.ScriptMgr.ClearSpellHandlerCache ( ) [static]

Clear all spell handlers from the cashe, forcing a reload when a spell is cast.

static bool DOL.GS.ScriptMgr.CompileScripts ( bool  compileVB,
string  path,
string  dllName,
string[]  asm_names 
) [static]

Compiles the scripts into an assembly.

Parameters:
compileVBTrue if the source files will be in VB.NET
pathPath to the source files
dllNameName of the assembly to be generated
asm_namesReferences to other assemblies
Returns:
True if succeeded
static IControlledBrain DOL.GS.ScriptMgr.CreateControlledBrain ( GamePlayer  owner) [static]

Constructs a new brain for player controlled npcs.

Parameters:
owner
Returns:
static IServerRules DOL.GS.ScriptMgr.CreateServerRules ( eGameServerType  serverType) [static]

Create server rules handler for specified server type.

Parameters:
serverTypeserver type used to look for rules handler
Returns:
server rules handler or normal server type handler if errors
static ISpellHandler DOL.GS.ScriptMgr.CreateSpellHandler ( GameLiving  caster,
Spell  spell,
SpellLine  line 
) [static]

Create a spell handler for caster with given spell.

Parameters:
castercaster that uses the spell
spellthe spell itself
linethe line that spell belongs to or null
Returns:
spellhandler or null if not found
static Hashtable DOL.GS.ScriptMgr.FindAllAbilityActionHandler ( Assembly  asm) [static]

searches the given assembly for AbilityActionHandlers

Parameters:
asmThe assembly to search through
Returns:
Hashmap consisting of keyName => AbilityActionHandler Type
static Hashtable DOL.GS.ScriptMgr.FindAllNPCGuildScriptClasses ( eRealm  realm,
Assembly  asm 
) [static, protected]

Searches for NPC guild scripts.

Parameters:
realmRealm for searching handlers
asmThe assembly to search through
Returns:
all handlers that were found, guildname(string) => classtype(Type)
static Hashtable DOL.GS.ScriptMgr.FindAllSpecActionHandler ( Assembly  asm) [static]

searches the script directory for SpecActionHandlers

Parameters:
asmThe assembly to search through
Returns:
Hashmap consisting of keyName => SpecActionHandler Type
static ICharacterClass DOL.GS.ScriptMgr.FindCharacterClass ( int  id) [static]

Searches for ClassSpec's by id in a given assembly.

Parameters:
asmthe assembly to search through
idthe classid to search
Returns:
ClassSpec that was found or null if not found
static Type DOL.GS.ScriptMgr.FindNPCGuildScriptClass ( string  guild,
eRealm  realm 
) [static]

searches for a npc guild script

Parameters:
guild
realm
Returns:
type of class for searched npc guild or null
static GameCommand DOL.GS.ScriptMgr.GetCommand ( string  commandName) [static]

Gets the requested command if it exists.

Parameters:
commandNameThe command to retrieve
Returns:
Returns the command if it exists, otherwise the return value is null
static string [] DOL.GS.ScriptMgr.GetCommandList ( ePrivLevel  plvl,
bool  addDesc 
) [static]

Returns an array of all the available commands with the specified plvl and their descriptions.

Parameters:
plvlplvl of the commands to get
addDesc
Returns:
static Type [] DOL.GS.ScriptMgr.GetDerivedClasses ( Type  baseType) [static]

Finds all classes that derive from given type. First check scripts then GameServer assembly.

Parameters:
baseTypeThe base class type.
Returns:
Array of types or empty array
static Type DOL.GS.ScriptMgr.GetType ( string  name) [static]

Search for a type by name; first in GameServer assembly then in scripts assemblies.

Parameters:
nameThe type name
Returns:
Found type or null
static GameCommand DOL.GS.ScriptMgr.GuessCommand ( string  commandName) [static]

Looking for exact match first, then, if nothing found, trying to guess command using first letters.

Parameters:
commandNameThe command to retrieve
Returns:
Returns the command if it exists, otherwise the return value is null
static bool DOL.GS.ScriptMgr.HandleCommand ( GameClient  client,
string  cmdLine 
) [static]

Called when a command needs to be handled.

Parameters:
clientClient executing the command
cmdLineArgs for the command
Returns:
True if succeeded
static bool DOL.GS.ScriptMgr.HandleCommandNoPlvl ( GameClient  client,
string  cmdLine 
) [static]

Called when a command needs to be handled without plvl being taken into consideration.

Parameters:
clientClient executing the command
cmdLineArgs for the command
Returns:
True if succeeded
static bool DOL.GS.ScriptMgr.LoadCommands ( bool  quiet = false) [static]

Searches the script assembly for all command handlers.

Returns:
True if succeeded
static bool DOL.GS.ScriptMgr.RemoveAssembly ( string  fullName) [static]

Removes an assembly from the game servers list of usable assemblies.

Parameters:
fullName

Property Documentation

Assembly [] DOL.GS.ScriptMgr.Scripts [static, get]

Get an array of all script assemblies.


The documentation for this class was generated from the following file:
All Classes Namespaces Functions Variables Enumerations Properties Events