This commit is contained in:
Amberstone 2024-10-16 19:19:37 +09:00
parent 71bdfab874
commit 372e389922
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
6 changed files with 83 additions and 94 deletions

View file

@ -5,9 +5,10 @@ class Status
* get status by character id and status id
* @param string|int $character_id
* @param string|int $status_id
* @param int $multiply
* @return array|null
*/
public static function getStatus($character_id, $status_id)
public static function getStatus($character_id, $status_id, $multiply = 1)
{
global $g5;
@ -43,15 +44,16 @@ class Status
* get status by character id and status name
* @param string|int $character_id
* @param string $status_name
* @param int $multiply
* @return array|null
*/
public static function getStatusByName($character_id, $status_name)
public static function getStatusByName($character_id, $status_name, $multiply = 1)
{
global $g5;
$status_name = addslashes($status_name);
$st_id = sql_fetch("SELECT st_id FROM {$g5["status_config_table"]} WHERE st_name = '{$status_name}'");
if ($st_id) {
return self::getStatus($character_id, $st_id["st_id"]);
return self::getStatus($character_id, $st_id["st_id"], $multiply);
} else {
return null;
}

View file

@ -112,3 +112,81 @@ function add_profile_article($theme, $code, $name, $type = 'text', $pice = '', $
{
global $g5;
}
function get_side_name($si_id)
{
return Character::getSideName($si_id);
}
function get_class_name($cl_id)
{
return Character::getClassName($cl_id);
}
function get_side_icon($si_id)
{
return Character::getSideIcon($si_id);
}
function get_class_icon($cl_id)
{
return Character::getClassIcon($cl_id);
}
function insert_exp($ch_id, $exp, $content = '', $rel_action = '')
{
return Character::addCharacterExp($ch_id, $exp, $content, $rel_action);
}
function get_exp_sum($ch_id)
{
return Character::getCharacterExp($ch_id);
}
function get_rank_name($rank)
{
return Character::getRankName($rank);
}
function get_rank_id($rank)
{
return Character::getRankID($rank);
}
function get_rank_exp($exp, $ch_id)
{
return Character::getRank($exp, $ch_id);
}
function get_status($ch_id, $st_id)
{
return Status::getStatus($ch_id, $st_id);
}
function get_status_by_name($ch_id, $st_name)
{
return Status::getStatusByName($ch_id, $st_name);
}
// 사용한 포인트
function get_use_status($ch_id)
{
return Status::getUsedPoint($ch_id);
}
// 미분배 포인트
function get_space_status($ch_id)
{
return Status::getAvailablePoint($ch_id);
}
//스탯 변동 적용
function set_status($ch_id, $st_id, $hunt, $msg = '')
{
return Status::setStatus($ch_id, $st_id, $hunt, $msg);
}
function set_status_by_name($ch_id, $st_name, $hunt, $msg = '')
{
return Status::setStatusByName($ch_id, $st_name, $hunt, $msg);
}

View file

@ -1,13 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
function insert_exp($ch_id, $exp, $content = '', $rel_action = '')
{
return Character::addCharacterExp($ch_id, $exp, $content, $rel_action);
}
function get_exp_sum($ch_id)
{
return Character::getCharacterExp($ch_id);
}

View file

@ -1,18 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
function get_rank_name($rank)
{
return Character::getRankName($rank);
}
function get_rank_id($rank)
{
return Character::getRankID($rank);
}
function get_rank_exp($exp, $ch_id)
{
return Character::getRank($exp, $ch_id);
}

View file

@ -1,24 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
function get_side_name($si_id)
{
return Character::getSideName($si_id);
}
function get_class_name($cl_id)
{
return Character::getClassName($cl_id);
}
function get_side_icon($si_id)
{
return Character::getSideIcon($si_id);
}
function get_class_icon($cl_id)
{
return Character::getClassIcon($cl_id);
}

View file

@ -1,36 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
function get_status($ch_id, $st_id)
{
return Status::getStatus($ch_id, $st_id);
}
function get_status_by_name($ch_id, $st_name)
{
return Status::getStatusByName($ch_id, $st_name);
}
// 사용한 포인트
function get_use_status($ch_id)
{
return Status::getUsedPoint($ch_id);
}
// 미분배 포인트
function get_space_status($ch_id)
{
return Status::getAvailablePoint($ch_id);
}
//스탯 변동 적용
function set_status($ch_id, $st_id, $hunt, $msg = '')
{
return Status::setStatus($ch_id, $st_id, $hunt, $msg);
}
function set_status_by_name($ch_id, $st_name, $hunt, $msg = '')
{
return Status::setStatusByName($ch_id, $st_name, $hunt, $msg);
}