本文整理汇总了PHP中Character::setBirthGuardianCompany方法的典型用法代码示例。如果您正苦于以下问题:PHP Character::setBirthGuardianCompany方法的具体用法?PHP Character::setBirthGuardianCompany怎么用?PHP Character::setBirthGuardianCompany使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character::setBirthGuardianCompany方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseProfile
public function parseProfile($ID)
{
$this->log(__LINE__, 'function: parseProfile() - parsing profile: ' . $ID);
if (!$ID) {
echo "error: No ID Set.";
}
// Get the source
$this->log(__LINE__, 'function: parseProfile() - get source');
$this->getSource($this->URL['character']['profile'] . $ID);
$this->log(__LINE__, 'function: parseProfile() - obtained source');
if ($this->errorPage($ID)) {
echo "error: Character page does not exist.";
} else {
$this->log(__LINE__, 'function: parseProfile() - starting parse');
// Create a new character object
$Character = new Character();
$this->log(__LINE__, 'function: parseProfile() - new character object');
// Set Character Data
$Character->setID(trim($ID), $this->URL['character']['profile'] . $ID);
$Character->setNameServer($this->findRange('player_name_thumb', 15));
$this->log(__LINE__, 'function: parseProfile() - set id, name and server');
// Only process if character name set
if (strlen($Character->getName()) > 3) {
$this->log(__LINE__, 'function: parseProfile() - parsing chunk 1');
$Character->setTitle($this->findRange('chara_title', 2, NULL, false));
$Character->setAvatar($this->findRange('player_name_thumb', 10, NULL, false));
$Character->setPortrait($this->findRange('bg_chara_264', 2, NULL, false));
$Character->setRaceClan($this->find('chara_profile_title'));
$Character->setLegacy($this->find('bt_legacy_history'));
$Character->setBirthGuardianCompany($this->findRange('chara_profile_list', 60, NULL, false));
$Character->setCity($this->findRange('City-state', 5));
$Character->setBiography($this->findRange('txt_selfintroduction', 5));
$Character->setHPMPTP($this->findRange('param_power_area', 10));
$Character->setStats($this->findAll('param_left_area_inner', 12, null, false));
$Character->setActiveClassLevel($this->findAll('class_info', 5, null, false));
$this->log(__LINE__, 'function: parseProfile() - parsing chunk 2');
// Set Gear (Also sets Active Class and Job), then set item level from the gear
$Character->setGear($this->findAll('-- ITEM Detail --', NULL, '-- //ITEM Detail --', false));
$Character->setItemLevel($this->GearSlots);
#$this->segment('area_header_w358_inner');
$this->log(__LINE__, 'function: parseProfile() - parsing chunk 3');
// Set Minions
$Minions = $this->findRange('area_header_w358_inner', NULL, '//Minion', false);
$Character->setMinions($Minions);
// Set Mounts
$this->log(__LINE__, 'function: parseProfile() - parsing chunk 4');
$Mounts = $this->findRange('area_header_w358_inner', NULL, '//Mount', false, 2);
$Character->setMounts($Mounts);
#$this->segment('class_fighter');
// Set ClassJob
$this->log(__LINE__, 'function: parseProfile() - parsing chunk 5');
$Character->setClassJob($this->findRange('class_fighter', NULL, '//Class Contents', false));
// Validate data
$Character->validate();
$this->log(__LINE__, 'function: parseProfile() - complete profile parse for: ' . $ID);
// Append character to array
$this->Characters[$ID] = $Character;
} else {
$this->Characters[$ID] = NULL;
}
}
}