C# Class FFACETools.FFACE.ParseResources

This class will parse the resources.xml file to translate ID <-> Names of spells/abilities/items
Afficher le fichier Open project: golfandsurf/Campah

Méthodes publiques

Свойство Type Description
LanguagePreference Languages
ResourcesCache string>.SortedDictionary
UseFFXIDatFiles bool

Private Properties

Свойство Type Description
CapitalizeWords string
DecodeBlock byte[]
DeleteInstance bool
FindKey int?
FindKeyStartsWith int?
GetFilePath String
GetFilePath String
GetRegistryKey string
IndexIsValid bool
Initialize void
InterpretPath string
LanguageIsValid bool
LoadDMSGFile void
LoadFileIDs void
LoadItemFile void
ParseActualFiles void
ParseResourceFiles void
ParseResources System
RotateRight byte

Méthodes publiques

Méthode Description
GetAbilityId ( String abil ) : AbilityList

Returns AbilityList for passed String

GetAbilityName ( AbilityList abil ) : String

Will get the name of the passed ability ID

GetAreaId ( String zone ) : Zone

Gets Zone ID for string passed (Exact case insensitive match)

GetAreaName ( Zone id ) : String

Will get the name of the passed area ID

GetDayId ( String day ) : Weekday

Returns Day for passed String

GetDayName ( Weekday day ) : String

Will get the name of the Weekday passed

GetItemID ( String item ) : int
GetItemId ( String item ) : int

Will get the id of the passed item name

GetItemIds ( String item ) : List

Returns a list of matching ids for the string passed. (Twashtar will return a list of 3 different IDs)

GetItemName ( int id ) : String

Will get the name of the passed item ID

GetJobId ( String job ) : Job

Returns Job ID matching string passed or 255 (byte -1) (Exact case insensitive match)

GetLongJobName ( Job job ) : String

Will return the Long Job name for the passed Job enum (Warrior, Monk, White Mage, Black Mage, etc)

GetMoonId ( String phase ) : MoonPhase

Returns MoonPhase id based on string passed. (NOTE: Will return *Gibbous if waxing/waning, never *Gibbous2)

GetMoonPhaseName ( MoonPhase phase ) : String

Will get the name of the Moon Phase passed as a String

GetNationId ( String nation ) : Nation

Returns Nation enum indicating the nation passed (Exact case insensitive match)

GetNationName ( Nation nation ) : String

Will get the name of the Nation passed

Protip: This actually returns the REGION NAME, but it happens to match the Nation enum as well.

GetRaceId ( String race ) : Race

Matches Race enum to beginning of string passed ('mithra female' and 'mithra' are the same)

GetRaceName ( Race race ) : String

Will get the name of the Race passed

GetShortJobName ( Job job ) : String

Will return the Short Job name for the passed Job enum (WAR, MNK, WHM, BLM etc)

GetSpellId ( String spell ) : SpellList

Returns SpellList for passed String

GetSpellName ( SpellList spell ) : String

Will get the name of the passed spell ID

GetStatusEffectName ( StatusEffect statusEffect ) : String

Will get the name of the passed status effect

GetStatusId ( String status ) : StatusEffect

Returns StatusEffect for passed String

GetWeatherId ( String weather ) : Weather

Returns Weather for passed String

GetWeatherName ( Weather weather ) : String

Will get the name of the Weather passed

Private Methods

Méthode Description
CapitalizeWords ( string value ) : string
DecodeBlock ( byte bytes, int shiftcount ) : byte[]

Decodes a data/text block by reversing the set bit rotation.

DeleteInstance ( ) : bool
FindKey ( String>.IDictionary lookup, String value ) : int?

Internal and private FindKey function for finding a key by value in a Dictionary

FindKeyStartsWith ( String>.IDictionary lookup, String value ) : int?

Internal and private FindKey function for finding a key by value in a Dictionary

GetFilePath ( FileTypes filetype, Languages language ) : String
GetFilePath ( int filetype, int language ) : String
GetRegistryKey ( ) : string

Locates the Registry Key for the FFXI Installation on this computer and pulls the installation folder from it.

IndexIsValid ( int index ) : bool
Initialize ( ) : void
InterpretPath ( UInt16 fileID ) : string

Returns a string in the format ROM\dir\file.DAT given a UInt16 fileID.

LanguageIsValid ( Languages language ) : bool
LoadDMSGFile ( FileTypes type, Languages language, ResourceBit rb ) : void
LoadFileIDs ( string s ) : void

Fills the FileList using the numbers in _fileNumberArray and FTABLE.DAT and VTABLE.DAT as reference.

LoadItemFile ( FileTypes filetype, Languages language ) : void

Generic loader for loading Item names

ParseActualFiles ( ) : void

Entry point into the whole thing.

ParseResourceFiles ( ) : void

Entry point for testing the old way

ParseResources ( ) : System
RotateRight ( byte b, int count ) : byte

Rotates the bits to the right by a set number of places.

Method Details

GetAbilityId() public static méthode

Returns AbilityList for passed String
public static GetAbilityId ( String abil ) : AbilityList
abil String String containing ability name (Exact case insensitive match)
Résultat AbilityList

GetAbilityName() public static méthode

Will get the name of the passed ability ID
public static GetAbilityName ( AbilityList abil ) : String
abil AbilityList AbilityList enum indicating the Ability to get the name of.
Résultat String

GetAreaId() public static méthode

Gets Zone ID for string passed (Exact case insensitive match)
public static GetAreaId ( String zone ) : Zone
zone String String for zone
Résultat Zone

GetAreaName() public static méthode

Will get the name of the passed area ID
public static GetAreaName ( Zone id ) : String
id Zone ID of the area to get the name for
Résultat String

GetDayId() public static méthode

Returns Day for passed String
public static GetDayId ( String day ) : Weekday
day String String containing day (fire = firesday, light will bring up Lightningsday, lights = Lightsday)
Résultat Weekday

GetDayName() public static méthode

Will get the name of the Weekday passed
public static GetDayName ( Weekday day ) : String
day Weekday Weekday enum indicating the String to return
Résultat String

GetItemID() public static méthode

public static GetItemID ( String item ) : int
item String
Résultat int

GetItemId() public static méthode

Will get the id of the passed item name
public static GetItemId ( String item ) : int
item String
Résultat int

GetItemIds() public static méthode

Returns a list of matching ids for the string passed. (Twashtar will return a list of 3 different IDs)
public static GetItemIds ( String item ) : List
item String String to match the ID for (Exact case insensitive match)
Résultat List

GetItemName() public static méthode

Will get the name of the passed item ID
public static GetItemName ( int id ) : String
id int ID of the item to get the name for
Résultat String

GetJobId() public static méthode

Returns Job ID matching string passed or 255 (byte -1) (Exact case insensitive match)
public static GetJobId ( String job ) : Job
job String String with either the short or long name of the Job to find.
Résultat Job

GetLongJobName() public static méthode

Will return the Long Job name for the passed Job enum (Warrior, Monk, White Mage, Black Mage, etc)
public static GetLongJobName ( Job job ) : String
job Job Job enum indicating job string requested.
Résultat String

GetMoonId() public static méthode

Returns MoonPhase id based on string passed. (NOTE: Will return *Gibbous if waxing/waning, never *Gibbous2)
public static GetMoonId ( String phase ) : MoonPhase
phase String String to return ID for. (Exact case insensitive match)
Résultat MoonPhase

GetMoonPhaseName() public static méthode

Will get the name of the Moon Phase passed as a String
public static GetMoonPhaseName ( MoonPhase phase ) : String
phase MoonPhase MoonPhase enum indicating the String to return
Résultat String

GetNationId() public static méthode

Returns Nation enum indicating the nation passed (Exact case insensitive match)
public static GetNationId ( String nation ) : Nation
nation String String containing nation to get enum for.
Résultat Nation

GetNationName() public static méthode

Will get the name of the Nation passed
Protip: This actually returns the REGION NAME, but it happens to match the Nation enum as well.
public static GetNationName ( Nation nation ) : String
nation Nation Nation enum indicating the String to return
Résultat String

GetRaceId() public static méthode

Matches Race enum to beginning of string passed ('mithra female' and 'mithra' are the same)
public static GetRaceId ( String race ) : Race
race String String containing race to get enum for.
Résultat Race

GetRaceName() public static méthode

Will get the name of the Race passed
public static GetRaceName ( Race race ) : String
race Race RaceNames enum indicating the String to return
Résultat String

GetShortJobName() public static méthode

Will return the Short Job name for the passed Job enum (WAR, MNK, WHM, BLM etc)
public static GetShortJobName ( Job job ) : String
job Job Job enum indicating job string requested.
Résultat String

GetSpellId() public static méthode

Returns SpellList for passed String
public static GetSpellId ( String spell ) : SpellList
spell String String containing spell name (Exact case insensitive match)
Résultat SpellList

GetSpellName() public static méthode

Will get the name of the passed spell ID
public static GetSpellName ( SpellList spell ) : String
spell SpellList SpellList enum indicating the Spell to get the name of.
Résultat String

GetStatusEffectName() public static méthode

Will get the name of the passed status effect
public static GetStatusEffectName ( StatusEffect statusEffect ) : String
statusEffect StatusEffect StatusEffect that you want the in-game name for.
Résultat String

GetStatusId() public static méthode

Returns StatusEffect for passed String
public static GetStatusId ( String status ) : StatusEffect
status String String containing status (Exact case insensitive match)
Résultat StatusEffect

GetWeatherId() public static méthode

Returns Weather for passed String
public static GetWeatherId ( String weather ) : Weather
weather String String containing weather (gloomy, stellar glare, etc) -- (gloom matches gloomy in this case)
Résultat Weather

GetWeatherName() public static méthode

Will get the name of the Weather passed
public static GetWeatherName ( Weather weather ) : String
weather Weather Weather enum indicating the String to return
Résultat String

Property Details

LanguagePreference public_oe static_oe property

Property for indicating preferred language for data to be retreived in.
public static Languages LanguagePreference
Résultat Languages

ResourcesCache public_oe property

public SortedDictionary ResourcesCache
Résultat string>.SortedDictionary

UseFFXIDatFiles public_oe static_oe property

Property for indicating whether to parse xml files or FFXI DAT Files
public static bool UseFFXIDatFiles
Résultat bool