C# Class DOL.GS.LootMgr

the LootMgr holds pointers to all LootGenerators at associates the correct LootGenerator with a given Mob
Afficher le fichier Open project: Los-Ojos/DOLSharp-1127

Méthodes publiques

Méthode Description
GetLoot ( GameNPC mob, GameObject killer ) : ItemTemplate[]

Returns the loot for the given Mob

GetLootGenerators ( GameNPC mob ) : IList

Returns the ILootGenerators for the given mobs

Init ( ) : bool

Initializes the LootMgr. This function must be called before the LootMgr can be used!

RefreshGenerators ( GameNPC mob ) : void

Call the refresh method for each generator to update loot, if implemented

RegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction, int mobregion ) : void

Register a generator for the given parameters, If all parameters are null a global generaotr for all mobs will be registered

UnRegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction ) : void
UnRegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction, int mobregion ) : void

Unregister a generator for the given parameters

Private Methods

Méthode Description
GetGeneratorInCache ( LootGenerator dbGenerator ) : ILootGenerator

Returns a generator from cache

PutGeneratorInCache ( LootGenerator dbGenerator, ILootGenerator generator ) : void

Stores a generator in a cache to reused the same generators multiple times

Method Details

GetLoot() public static méthode

Returns the loot for the given Mob
public static GetLoot ( GameNPC mob, GameObject killer ) : ItemTemplate[]
mob GameNPC
killer GameObject
Résultat ItemTemplate[]

GetLootGenerators() public static méthode

Returns the ILootGenerators for the given mobs
public static GetLootGenerators ( GameNPC mob ) : IList
mob GameNPC
Résultat IList

Init() public static méthode

Initializes the LootMgr. This function must be called before the LootMgr can be used!
public static Init ( ) : bool
Résultat bool

RefreshGenerators() public static méthode

Call the refresh method for each generator to update loot, if implemented
public static RefreshGenerators ( GameNPC mob ) : void
mob GameNPC
Résultat void

RegisterLootGenerator() public static méthode

Register a generator for the given parameters, If all parameters are null a global generaotr for all mobs will be registered
public static RegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction, int mobregion ) : void
generator ILootGenerator
mobname string
mobguild string
mobfaction string
mobregion int
Résultat void

UnRegisterLootGenerator() public static méthode

public static UnRegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction ) : void
generator ILootGenerator
mobname string
mobguild string
mobfaction string
Résultat void

UnRegisterLootGenerator() public static méthode

Unregister a generator for the given parameters
public static UnRegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction, int mobregion ) : void
generator ILootGenerator
mobname string
mobguild string
mobfaction string
mobregion int
Résultat void