本文整理汇总了PHP中Character::setCustomize方法的典型用法代码示例。如果您正苦于以下问题:PHP Character::setCustomize方法的具体用法?PHP Character::setCustomize怎么用?PHP Character::setCustomize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character::setCustomize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reCustomize
function reCustomize()
{
global $Config, $DB, $lang, $user;
include 'core/SDL/class.character.php';
$Character = new Character();
if ($Config->get('module_charcustomize') == 0) {
output_message('error', 'Nice try hacking, but not good enough.');
return FALSE;
}
// Check to see the user has enough points
if ($user['web_points'] >= $Config->get('module_charcustomize_pts')) {
if ($Character->setCustomize($_POST['id']) == TRUE) {
$DB->query("UPDATE `mw_account_extend` SET \n\t\t\t\t`web_points`=(`web_points` - " . $Config->get('module_charcustomize_pts') . "), \n\t\t\t\t`points_spent`=(`points_spent` + " . $Config->get('module_charcustomize_pts') . ") \n\t\t\t WHERE `account_id` = " . $user['id'] . " LIMIT 1");
output_message('success', $lang['char_recustomize_success']);
echo "<br /><br />";
} else {
output_message('warning', $lang['char_recustomize_already_set']);
echo "<br /><br />";
}
} else {
output_message('validation', $lang['not_enough_points']);
}
}