c2ephp
|
Class for DSEX (DS Export) blocks. More...
Public Member Functions | |
DSEXBlock ($prayfile, $name, $content, $flags) | |
Instantiates a DSEXBlock. | |
EXPCBlock ($prayfile, $name, $content, $flags) | |
Creates a new EXPCBlock. | |
GetAgeInTicks () | |
Gets the age of the creature. | |
GetLifeStage () | |
Gets the life stage of the creature. | |
GetExportUNIXTime () | |
Gets the time the creature was exported. | |
GetExportWorldTime () | |
Gets the world-time when the creature was exported. | |
GetGender () | |
Gets the gender of the creature. | |
GetGenus () | |
Gets the genus of the creature. | |
GetPregnancyStatus () | |
Gets whether the creature is pregnant. | |
GetVariant () | |
Gets the variant (breed) of the creature. | |
GetCreatureName () | |
Gets the creature's name. | |
GetWorldName () | |
Gets the name of the world the creature was exported from. | |
GetWorldUID () | |
Gets the UID of the world the creature was exported from. | |
GetHeadGallery () | |
Gets the gallery for the creature's head sprites. | |
GetTag ($key) | |
Gets the tag with the given name. | |
GetTags () | |
Gets all the tags from this block as an array of tags. | |
SetTag ($tag, $value) | |
Sets a tag. | |
GetName () | |
Gets the PRAY block's name. | |
GetData () | |
Gets the PRAY block's binary data if the PRAYBlock is decompiled. | |
GetType () | |
Gets the type of PrayBlock this is. | |
GetFlags () | |
Returns the flag bitfield used to determine flags. | |
IsFlagSet ($flag) | |
Tells you whether $flag is set on this PRAY block. | |
Compile () | |
Compile this PrayBlock. | |
Related Functions | |
(Note that these are not member functions.) | |
Block Types | |
Constants for the various PRAY block types | |
enum | PRAY_BLOCK_AGNT |
enum | PRAY_BLOCK_CREA |
enum | PRAY_BLOCK_DFAM |
enum | PRAY_BLOCK_DSAG |
enum | PRAY_BLOCK_DSEX |
enum | PRAY_BLOCK_EGGS |
enum | PRAY_BLOCK_EXPC |
enum | PRAY_BLOCK_FILE |
enum | PRAY_BLOCK_GENE |
enum | PRAY_BLOCK_GLST |
enum | PRAY_BLOCK_LIVE |
enum | PRAY_BLOCK_PHOT |
enum | PRAY_BLOCK_SFAM |
Flags | |
Flags used to specify how the block's data is stored. | |
enum | PRAY_FLAG_ZLIB_COMPRESSED |
Whether or not the block is zLib compressed. More... |
Class for DSEX (DS Export) blocks.
DSEX and EXPC seem to contain identical tags, so this class simple extends EXPC.
Definition at line 10 of file DSEXBlock.php.
PrayBlock::Compile | ( | ) | [inherited] |
Compile this PrayBlock.
Compiles the PrayBlock's data if necessary, then adds the header and returns the binary pray block.
This function is mainly intended for use by PRAYFiles.
Reimplemented in BinaryBlock.
Definition at line 253 of file PrayBlock.php.
DSEXBlock::DSEXBlock | ( | $ | prayfile, |
$ | name, | ||
$ | content, | ||
$ | flags | ||
) |
Instantiates a DSEXBlock.
If $prayfile is not null, all the data for this block will be read from the PRAYFile.
$prayfile | The PRAYFile that this DFAM block belongs to. |
$name | The block's name. |
$content | The binary data of this block. May be null. |
$flags | The block's flags |
Definition at line 20 of file DSEXBlock.php.
EXPCBlock::EXPCBlock | ( | $ | prayfile, |
$ | name, | ||
$ | content, | ||
$ | flags | ||
) | [inherited] |
Creates a new EXPCBlock.
If $prayfile is not null, all the data for this block will be read from the PRAYFile.
$prayfile | The PRAYFile that this DFAM block belongs to. |
$name | The block's name. |
$content | The binary data of this block. May be null. |
$flags | The block's flags |
Definition at line 39 of file EXPCBlock.php.
EXPCBlock::GetAgeInTicks | ( | ) | [inherited] |
Gets the age of the creature.
Definition at line 47 of file EXPCBlock.php.
EXPCBlock::GetCreatureName | ( | ) | [inherited] |
Gets the creature's name.
Definition at line 109 of file EXPCBlock.php.
PrayBlock::GetData | ( | ) | [inherited] |
Gets the PRAY block's binary data if the PRAYBlock is decompiled.
It will decompress automatically if necessary, then unset the compressed flag. TODO: I'm not 100% sure I should keep this public... return the PRAY block's binary data.
Definition at line 153 of file PrayBlock.php.
EXPCBlock::GetExportUNIXTime | ( | ) | [inherited] |
Gets the time the creature was exported.
Definition at line 63 of file EXPCBlock.php.
EXPCBlock::GetExportWorldTime | ( | ) | [inherited] |
Gets the world-time when the creature was exported.
Definition at line 70 of file EXPCBlock.php.
PrayBlock::GetFlags | ( | ) | [inherited] |
Returns the flag bitfield used to determine flags.
Prefer using IsFlagSet. (This may be deprecated/removed in future releases) Least Significant Bit determines whether the block is compressed (1) or not. All other bits are 0 in all c2e-compatible PRAY blocks.
Definition at line 179 of file PrayBlock.php.
EXPCBlock::GetGender | ( | ) | [inherited] |
Gets the gender of the creature.
Definition at line 78 of file EXPCBlock.php.
EXPCBlock::GetGenus | ( | ) | [inherited] |
Gets the genus of the creature.
I.e. whether it's a norn, grendel, ettin, or geat.
Most likely in that order. I think 1 is Norn.
Definition at line 87 of file EXPCBlock.php.
EXPCBlock::GetHeadGallery | ( | ) | [inherited] |
Gets the gallery for the creature's head sprites.
This does not include the file extension.
Definition at line 127 of file EXPCBlock.php.
EXPCBlock::GetLifeStage | ( | ) | [inherited] |
Gets the life stage of the creature.
Definition at line 55 of file EXPCBlock.php.
PrayBlock::GetName | ( | ) | [inherited] |
Gets the PRAY block's name.
return the PRAY block's name
Definition at line 144 of file PrayBlock.php.
EXPCBlock::GetPregnancyStatus | ( | ) | [inherited] |
Gets whether the creature is pregnant.
0 = not pregnant, 1 = pregnant.
Definition at line 95 of file EXPCBlock.php.
TagBlock::GetTag | ( | $ | key | ) | [inherited] |
Gets the tag with the given name.
Returns the tag's value as a string, or nothing if the tag doesn't exist.
Definition at line 44 of file TagBlock.php.
TagBlock::GetTags | ( | ) | [inherited] |
Gets all the tags from this block as an array of tags.
This is mainly useful for people writing subclasses of TagBlock. If you have to write code that uses GetTags in your application, please file a bug report!
Definition at line 57 of file TagBlock.php.
PrayBlock::GetType | ( | ) | [inherited] |
Gets the type of PrayBlock this is.
Gives the type as one of the PRAY_BLOCK_* constants - a four-character string, all in caps. These are defined above.
Definition at line 170 of file PrayBlock.php.
EXPCBlock::GetVariant | ( | ) | [inherited] |
Gets the variant (breed) of the creature.
Definition at line 104 of file EXPCBlock.php.
EXPCBlock::GetWorldName | ( | ) | [inherited] |
Gets the name of the world the creature was exported from.
Definition at line 114 of file EXPCBlock.php.
EXPCBlock::GetWorldUID | ( | ) | [inherited] |
Gets the UID of the world the creature was exported from.
Definition at line 119 of file EXPCBlock.php.
PrayBlock::IsFlagSet | ( | $ | flag | ) | [inherited] |
Tells you whether $flag is set on this PRAY block.
$flag | the bitfield to compare $flags to. As such can be multiple flags OR'd together. |
Definition at line 187 of file PrayBlock.php.
TagBlock::SetTag | ( | $ | tag, |
$ | value | ||
) | [inherited] |
Sets a tag.
Sets the tag with the given value, overwriting or creating the tag as needed. Generally setters ought to be used in subclasses of TagBlock.
$tag | Name of the tag to set |
$value | The value to set the tag to |
Definition at line 69 of file TagBlock.php.
enum PRAY_BLOCK_AGNT [related, inherited] |
Value: 'AGNT'
Definition at line 27 of file PrayBlock.php.
enum PRAY_BLOCK_CREA [related, inherited] |
Value: 'CREA'
Definition at line 29 of file PrayBlock.php.
enum PRAY_BLOCK_DFAM [related, inherited] |
Value: 'DFAM'
Definition at line 31 of file PrayBlock.php.
enum PRAY_BLOCK_DSAG [related, inherited] |
Value: 'DSAG'
Definition at line 33 of file PrayBlock.php.
enum PRAY_BLOCK_DSEX [related, inherited] |
Value: 'DSEX'
Definition at line 35 of file PrayBlock.php.
enum PRAY_BLOCK_EGGS [related, inherited] |
Value: 'EGG'
Definition at line 37 of file PrayBlock.php.
enum PRAY_BLOCK_EXPC [related, inherited] |
Value: 'EXPC'
Definition at line 39 of file PrayBlock.php.
enum PRAY_BLOCK_FILE [related, inherited] |
Value: 'FILE'
Definition at line 41 of file PrayBlock.php.
enum PRAY_BLOCK_GENE [related, inherited] |
Value: 'GENE'
Definition at line 43 of file PrayBlock.php.
enum PRAY_BLOCK_GLST [related, inherited] |
Value: 'GLST'
Definition at line 45 of file PrayBlock.php.
enum PRAY_BLOCK_LIVE [related, inherited] |
Value: 'LIVE'
Definition at line 47 of file PrayBlock.php.
enum PRAY_BLOCK_PHOT [related, inherited] |
Value: 'PHOT'
Definition at line 49 of file PrayBlock.php.
enum PRAY_BLOCK_SFAM [related, inherited] |
Value: 'SFAM'
Definition at line 51 of file PrayBlock.php.
enum PRAY_FLAG_ZLIB_COMPRESSED [related, inherited] |