C# Class DOL.GS.LootMgr

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

Public Methods

Method 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

Method 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 method

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

GetLootGenerators() public static method

Returns the ILootGenerators for the given mobs
public static GetLootGenerators ( GameNPC mob ) : IList
mob GameNPC
return IList

Init() public static method

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

RefreshGenerators() public static method

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

RegisterLootGenerator() public static method

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
return void

UnRegisterLootGenerator() public static method

public static UnRegisterLootGenerator ( ILootGenerator generator, string mobname, string mobguild, string mobfaction ) : void
generator ILootGenerator
mobname string
mobguild string
mobfaction string
return void

UnRegisterLootGenerator() public static method

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
return void