C# Class Tibialyzer.StorageManager

Show file Open project: Mytherin/Tibialyzer

Public Properties

Property Type Description
DATABASE_NULL int
DATABASE_STRING_NULL string
achievementsLoaded bool
cityIdMap City>.Dictionary
cityNameMap City>.Dictionary
creaturesLoaded bool
eventIdMap Event>.Dictionary
guildHallIdMap House>.Dictionary
helpCommands List
houseIdMap House>.Dictionary
huntsLoaded bool
itemsLoaded bool
mapFiles List
mountsLoaded bool
npcsLoaded bool
outfitsLoaded bool
questIdMap Quest>.Dictionary
questNameMap Quest>.Dictionary
spellsLoaded bool
taskGroups string>.Dictionary
taskIdMap Task>.Dictionary
taskList List>.Dictionary
worldObjectsLoaded bool

Public Methods

Method Description
ExecuteCommand ( string query ) : void
ExecuteCommandReader ( string query ) : SQLiteDataReader
ExecuteQuery ( string query ) : SQLiteDataReader
InitializeStorage ( ) : void
ReloadItems ( ) : void
UpdateConvertQuery ( string query ) : void
UpdateDatabase ( SQLiteConnection databaseConnection ) : void

Update the current (new) database from an older database (by importing user-specified values such as item value and discard/convert flags)

UpdateDiscardQuery ( string query ) : void
creatureExists ( string str ) : bool
getAchievement ( int id ) : Achievement
getAchievement ( string name ) : Achievement
getCreature ( int id ) : Tibialyzer.Creature
getCreature ( string name ) : Tibialyzer.Creature
getHouseByCity ( string city, bool guildhall ) : List
getHunt ( int id ) : Tibialyzer.HuntingPlace
getHunt ( string name ) : Tibialyzer.HuntingPlace
getHuntsForCreature ( int creatureid ) : List
getHuntsForLevels ( int minlevel, int maxlevel ) : List
getHuntsInCity ( string city ) : List
getItem ( int id ) : Item
getItem ( string name ) : Item
getItemFromTibiaID ( int id ) : Item
getItemsByCategory ( string str ) : List
getMap ( int z ) : Tibialyzer.Map
getMount ( int id ) : Tibialyzer.Mount
getMount ( string name ) : Tibialyzer.Mount
getNPC ( int id ) : Tibialyzer.NPC
getNPC ( string name ) : Tibialyzer.NPC
getNPCSellingItemInCity ( int itemid, string city ) : Tibialyzer.NPC
getNPCTeachingSpellInCity ( int spellid, string city ) : Tibialyzer.NPC
getNPCWithCity ( string city ) : List
getOutfit ( int id ) : Tibialyzer.Outfit
getOutfit ( string name ) : Tibialyzer.Outfit
getQuest ( int id ) : Tibialyzer.Quest
getQuest ( string name ) : Tibialyzer.Quest
getSpell ( int id ) : Tibialyzer.Spell
getSpell ( string name ) : Tibialyzer.Spell
getSpellsForVocation ( string vocation ) : List
getTask ( int taskid ) : Tibialyzer.Task
getTask ( string task ) : Tibialyzer.Task
getWorldObject ( string name ) : Tibialyzer.WorldObject
itemExists ( string str ) : bool
loadCreatureImage ( int id ) : void
loadItemImage ( int id ) : void
searchAchievement ( string str ) : List
searchCreature ( string str ) : List
searchHouse ( string str, bool guildhall ) : List
searchHunt ( string str ) : List
searchItem ( string str ) : List
searchMount ( string str ) : List
searchNPC ( string str ) : List
searchOutfit ( string str ) : List
searchQuest ( string str ) : List
searchSpell ( string str ) : List
searchSpellWords ( string str ) : List
setConvertRatio ( double ratio, bool stackable ) : void
setGoldRatio ( double ratio ) : void
setItemConvert ( Item item, bool convert ) : void
setItemDiscard ( Item item, bool discard ) : void
setItemValue ( Item item, long value ) : void

Private Methods

Method Description
UpdateItem ( string title, bool discard, bool convert, long value, System.Data.SQLite.SQLiteTransaction transaction ) : void
createAchievement ( SQLiteDataReader reader ) : Achievement
createCreature ( SQLiteDataReader reader ) : Tibialyzer.Creature
createHunt ( SQLiteDataReader reader ) : Tibialyzer.HuntingPlace
createItem ( SQLiteDataReader reader ) : Item
createMount ( SQLiteDataReader reader ) : Tibialyzer.Mount
createNPC ( SQLiteDataReader reader ) : Tibialyzer.NPC
createOutfit ( SQLiteDataReader reader ) : Tibialyzer.Outfit
createSpell ( SQLiteDataReader reader ) : Tibialyzer.Spell
createWorldObject ( SQLiteDataReader reader ) : Tibialyzer.WorldObject
registerAchievement ( Achievement achievement ) : Achievement
registerCreature ( Tibialyzer.Creature cr ) : Tibialyzer.Creature
registerHunt ( Tibialyzer.HuntingPlace h ) : Tibialyzer.HuntingPlace
registerItem ( Item item ) : Item
registerMount ( Tibialyzer.Mount h ) : Tibialyzer.Mount
registerNPC ( Tibialyzer.NPC npc ) : Tibialyzer.NPC
registerOutfit ( Tibialyzer.Outfit h ) : Tibialyzer.Outfit
registerSpell ( Tibialyzer.Spell h ) : Tibialyzer.Spell
registerWorldObject ( Tibialyzer.WorldObject h ) : Tibialyzer.WorldObject

Method Details

ExecuteCommand() public static method

public static ExecuteCommand ( string query ) : void
query string
return void

ExecuteCommandReader() public static method

public static ExecuteCommandReader ( string query ) : SQLiteDataReader
query string
return System.Data.SQLite.SQLiteDataReader

ExecuteQuery() public static method

public static ExecuteQuery ( string query ) : SQLiteDataReader
query string
return System.Data.SQLite.SQLiteDataReader

InitializeStorage() public static method

public static InitializeStorage ( ) : void
return void

ReloadItems() public static method

public static ReloadItems ( ) : void
return void

UpdateConvertQuery() public static method

public static UpdateConvertQuery ( string query ) : void
query string
return void

UpdateDatabase() public static method

Update the current (new) database from an older database (by importing user-specified values such as item value and discard/convert flags)
public static UpdateDatabase ( SQLiteConnection databaseConnection ) : void
databaseConnection System.Data.SQLite.SQLiteConnection
return void

UpdateDiscardQuery() public static method

public static UpdateDiscardQuery ( string query ) : void
query string
return void

creatureExists() public static method

public static creatureExists ( string str ) : bool
str string
return bool

getAchievement() public static method

public static getAchievement ( int id ) : Achievement
id int
return Achievement

getAchievement() public static method

public static getAchievement ( string name ) : Achievement
name string
return Achievement

getCreature() public static method

public static getCreature ( int id ) : Tibialyzer.Creature
id int
return Tibialyzer.Creature

getCreature() public static method

public static getCreature ( string name ) : Tibialyzer.Creature
name string
return Tibialyzer.Creature

getHouseByCity() public static method

public static getHouseByCity ( string city, bool guildhall ) : List
city string
guildhall bool
return List

getHunt() public static method

public static getHunt ( int id ) : Tibialyzer.HuntingPlace
id int
return Tibialyzer.HuntingPlace

getHunt() public static method

public static getHunt ( string name ) : Tibialyzer.HuntingPlace
name string
return Tibialyzer.HuntingPlace

getHuntsForCreature() public static method

public static getHuntsForCreature ( int creatureid ) : List
creatureid int
return List

getHuntsForLevels() public static method

public static getHuntsForLevels ( int minlevel, int maxlevel ) : List
minlevel int
maxlevel int
return List

getHuntsInCity() public static method

public static getHuntsInCity ( string city ) : List
city string
return List

getItem() public static method

public static getItem ( int id ) : Item
id int
return Item

getItem() public static method

public static getItem ( string name ) : Item
name string
return Item

getItemFromTibiaID() public static method

public static getItemFromTibiaID ( int id ) : Item
id int
return Item

getItemsByCategory() public static method

public static getItemsByCategory ( string str ) : List
str string
return List

getMap() public static method

public static getMap ( int z ) : Tibialyzer.Map
z int
return Tibialyzer.Map

getMount() public static method

public static getMount ( int id ) : Tibialyzer.Mount
id int
return Tibialyzer.Mount

getMount() public static method

public static getMount ( string name ) : Tibialyzer.Mount
name string
return Tibialyzer.Mount

getNPC() public static method

public static getNPC ( int id ) : Tibialyzer.NPC
id int
return Tibialyzer.NPC

getNPC() public static method

public static getNPC ( string name ) : Tibialyzer.NPC
name string
return Tibialyzer.NPC

getNPCSellingItemInCity() public static method

public static getNPCSellingItemInCity ( int itemid, string city ) : Tibialyzer.NPC
itemid int
city string
return Tibialyzer.NPC

getNPCTeachingSpellInCity() public static method

public static getNPCTeachingSpellInCity ( int spellid, string city ) : Tibialyzer.NPC
spellid int
city string
return Tibialyzer.NPC

getNPCWithCity() public static method

public static getNPCWithCity ( string city ) : List
city string
return List

getOutfit() public static method

public static getOutfit ( int id ) : Tibialyzer.Outfit
id int
return Tibialyzer.Outfit

getOutfit() public static method

public static getOutfit ( string name ) : Tibialyzer.Outfit
name string
return Tibialyzer.Outfit

getQuest() public static method

public static getQuest ( int id ) : Tibialyzer.Quest
id int
return Tibialyzer.Quest

getQuest() public static method

public static getQuest ( string name ) : Tibialyzer.Quest
name string
return Tibialyzer.Quest

getSpell() public static method

public static getSpell ( int id ) : Tibialyzer.Spell
id int
return Tibialyzer.Spell

getSpell() public static method

public static getSpell ( string name ) : Tibialyzer.Spell
name string
return Tibialyzer.Spell

getSpellsForVocation() public static method

public static getSpellsForVocation ( string vocation ) : List
vocation string
return List

getTask() public static method

public static getTask ( int taskid ) : Tibialyzer.Task
taskid int
return Tibialyzer.Task

getTask() public static method

public static getTask ( string task ) : Tibialyzer.Task
task string
return Tibialyzer.Task

getWorldObject() public static method

public static getWorldObject ( string name ) : Tibialyzer.WorldObject
name string
return Tibialyzer.WorldObject

itemExists() public static method

public static itemExists ( string str ) : bool
str string
return bool

loadCreatureImage() public static method

public static loadCreatureImage ( int id ) : void
id int
return void

loadItemImage() public static method

public static loadItemImage ( int id ) : void
id int
return void

searchAchievement() public static method

public static searchAchievement ( string str ) : List
str string
return List

searchCreature() public static method

public static searchCreature ( string str ) : List
str string
return List

searchHouse() public static method

public static searchHouse ( string str, bool guildhall ) : List
str string
guildhall bool
return List

searchHunt() public static method

public static searchHunt ( string str ) : List
str string
return List

searchItem() public static method

public static searchItem ( string str ) : List
str string
return List

searchMount() public static method

public static searchMount ( string str ) : List
str string
return List

searchNPC() public static method

public static searchNPC ( string str ) : List
str string
return List

searchOutfit() public static method

public static searchOutfit ( string str ) : List
str string
return List

searchQuest() public static method

public static searchQuest ( string str ) : List
str string
return List

searchSpell() public static method

public static searchSpell ( string str ) : List
str string
return List

searchSpellWords() public static method

public static searchSpellWords ( string str ) : List
str string
return List

setConvertRatio() public static method

public static setConvertRatio ( double ratio, bool stackable ) : void
ratio double
stackable bool
return void

setGoldRatio() public static method

public static setGoldRatio ( double ratio ) : void
ratio double
return void

setItemConvert() public static method

public static setItemConvert ( Item item, bool convert ) : void
item Item
convert bool
return void

setItemDiscard() public static method

public static setItemDiscard ( Item item, bool discard ) : void
item Item
discard bool
return void

setItemValue() public static method

public static setItemValue ( Item item, long value ) : void
item Item
value long
return void

Property Details

DATABASE_NULL public static property

public static int DATABASE_NULL
return int

DATABASE_STRING_NULL public static property

public static string DATABASE_STRING_NULL
return string

achievementsLoaded public static property

public static bool achievementsLoaded
return bool

cityIdMap public static property

public static Dictionary cityIdMap
return City>.Dictionary

cityNameMap public static property

public static Dictionary cityNameMap
return City>.Dictionary

creaturesLoaded public static property

public static bool creaturesLoaded
return bool

eventIdMap public static property

public static Dictionary eventIdMap
return Event>.Dictionary

guildHallIdMap public static property

public static Dictionary guildHallIdMap
return House>.Dictionary

helpCommands public static property

public static List helpCommands
return List

houseIdMap public static property

public static Dictionary houseIdMap
return House>.Dictionary

huntsLoaded public static property

public static bool huntsLoaded
return bool

itemsLoaded public static property

public static bool itemsLoaded
return bool

mapFiles public static property

public static List mapFiles
return List

mountsLoaded public static property

public static bool mountsLoaded
return bool

npcsLoaded public static property

public static bool npcsLoaded
return bool

outfitsLoaded public static property

public static bool outfitsLoaded
return bool

questIdMap public static property

public static Dictionary questIdMap
return Quest>.Dictionary

questNameMap public static property

public static Dictionary questNameMap
return Quest>.Dictionary

spellsLoaded public static property

public static bool spellsLoaded
return bool

taskGroups public static property

public static Dictionary taskGroups
return string>.Dictionary

taskIdMap public static property

public static Dictionary taskIdMap
return Task>.Dictionary

taskList public static property

public static Dictionary> taskList
return List>.Dictionary

worldObjectsLoaded public static property

public static bool worldObjectsLoaded
return bool