<?
/** 
 * @Project GoldMU.Net
 * @copyright 03/03/2022
 * @Email: goldmu.net@gmail.com
 * @Zalo: 0923 117 898
 */
if (!defined('GoldWebMU')) die("Ban khong co quyen truy cap he thong");
include_once('config/config_dongbo.php');

    $str = $_GET['istr'];         $str = abs(intval($str));
    $dex = $_GET['idex'];         $dex = abs(intval($dex));
    $vit = $_GET['ivit'];         $vit = abs(intval($vit));
    $ene = $_GET['iene'];         $ene = abs(intval($ene));
    $com = $_GET['icom'];         $com = abs(intval($com));
    
    
    $str_new = $_SESSION['nv_str'] + $str;
    $dex_new = $_SESSION['nv_dex'] + $dex;
    $vit_new = $_SESSION['nv_vit'] + $vit;
    $ene_new = $_SESSION['nv_ene'] + $ene;
    $com_new = $_SESSION['nv_com'] + $com;
    $total_point_new = $_SESSION['nv_point'] + $_SESSION['nv_pointdutru'] - ($str + $dex + $vit + $ene + $com);
    
    $accept = 1;
    if($total_point_new < 0 || $str_new > $pointsv || $dex_new > $pointsv || $vit_new > $pointsv || $ene_new > $pointsv || $com_new > $pointsv || ($str == 0 && $dex == 0 && $vit == 0 && $ene == 0 && $com == 0)) {
        $accept = 0;
    }
    
    echo "|$accept|$total_point_new|$str_new|$dex_new|$vit_new|$ene_new|$com_new|";

?>