버그 수정
This commit is contained in:
+1
-10
@@ -73,11 +73,6 @@ $sortType = [
|
||||
8 => ['dedication', false],
|
||||
];
|
||||
|
||||
foreach($generalList as &$general){
|
||||
$general['nationName'] = $nationName[$general['nation']];
|
||||
$general['coloredName'] = getColoredName($general['name'], $general['npc']);
|
||||
}
|
||||
|
||||
[$sortKey, $isAsc] = $sortType[$type];
|
||||
|
||||
if($isAsc){
|
||||
@@ -108,15 +103,11 @@ else{
|
||||
<td width=78 align=center id=bg1>계급</td>
|
||||
</tr>
|
||||
<?php foreach($generalList as $general): ?>
|
||||
<?php
|
||||
$nation = $nationname[$general['nation']];
|
||||
$name = getColoredName($general['name'], $general['npc']);
|
||||
?>
|
||||
<tr>
|
||||
<td align=center><?=getColoredName($general['name'], $general['npc'])?></td>
|
||||
<td align=center><?=$general['owner_name']?></td>
|
||||
<td align=center>Lv <?=$general['explevel']?></td>
|
||||
<td align=center><?=$nationname[$general['nation']]?></td>
|
||||
<td align=center><?=$nationName[$general['nation']]?></td>
|
||||
<td align=center><?=displayCharInfo($general['personal'])?></td>
|
||||
<td align=center><?=displaySpecialDomesticInfo($general['special'])?> / <?=displaySpecialWarInfo($general['special2'])?></td>
|
||||
<td align=center><?=$general['sum']?></td>
|
||||
|
||||
@@ -378,7 +378,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">보병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex0">
|
||||
<select class="custom-select form_dex1">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
@@ -386,7 +386,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">궁병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex10">
|
||||
<select class="custom-select form_dex2">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
@@ -394,7 +394,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">기병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex20">
|
||||
<select class="custom-select form_dex3">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
@@ -404,7 +404,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">귀병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex30">
|
||||
<select class="custom-select form_dex4">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
@@ -412,7 +412,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">차병숙련</span>
|
||||
</div>
|
||||
<select class="custom-select form_dex40">
|
||||
<select class="custom-select form_dex5">
|
||||
<?php foreach(getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]): ?>
|
||||
<option value="<?=$dexAmount?>"><?="{$name} (".number_format($dexAmount).")"?></option>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -34,41 +34,6 @@ function getCityLevelList():array{
|
||||
];
|
||||
}
|
||||
|
||||
function getGenDex($general, $type) {
|
||||
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
|
||||
$ntype = GameUnitConst::byId($type)->armType * 10;
|
||||
return $general["dex{$ntype}"]??0;
|
||||
}
|
||||
|
||||
function addGenDex($no, $atmos, $train, $type, $exp) {
|
||||
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
|
||||
$db = DB::db();
|
||||
|
||||
$armType = GameUnitConst::byId($type)->armType;
|
||||
if($armType == GameUnitConst::T_CASTLE){
|
||||
$armType = GameUnitConst::T_SIEGE;
|
||||
}
|
||||
|
||||
if($armType < 0){
|
||||
return;
|
||||
}
|
||||
|
||||
$ntype = $armType*10;
|
||||
$dexType = "dex{$ntype}";
|
||||
if($armType == GameUnitConst::T_WIZARD) {
|
||||
$exp = Util::round($exp * 0.90);
|
||||
}
|
||||
else if($armType == GameUnitConst::T_SIEGE) {
|
||||
$exp = Util::round($exp * 0.90);
|
||||
}
|
||||
$exp = Util::round($exp * ($atmos + $train) / 200); // 사기 + 훈련 / 200
|
||||
|
||||
$db->update('general', [
|
||||
$dexType=>$db->sqleval('%b + %i', $dexType, $exp)
|
||||
], 'no=%i', $no);
|
||||
}
|
||||
|
||||
|
||||
//한국가의 전체 전방 설정
|
||||
function SetNationFront($nationNo) {
|
||||
if(!$nationNo) { return; }
|
||||
|
||||
@@ -176,11 +176,11 @@ jQuery(function($){
|
||||
setVal('.form_atmos', data.atmos);
|
||||
setVal('.form_train', data.train);
|
||||
|
||||
setVal('.form_dex0', data.dex1);
|
||||
setVal('.form_dex10', data.dex2);
|
||||
setVal('.form_dex20', data.dex3);
|
||||
setVal('.form_dex30', data.dex4);
|
||||
setVal('.form_dex40', data.dex5);
|
||||
setVal('.form_dex1', data.dex1);
|
||||
setVal('.form_dex2', data.dex2);
|
||||
setVal('.form_dex3', data.dex3);
|
||||
setVal('.form_dex4', data.dex4);
|
||||
setVal('.form_dex5', data.dex5);
|
||||
setVal('.form_defence_train', data.defence_train);
|
||||
|
||||
if(!setGeneralNo($general, data.no)){
|
||||
|
||||
@@ -422,6 +422,16 @@ class General implements iAction{
|
||||
return $this->getStatValue('intel', $withInjury, $withIActionObj, $withStatAdjust, $useFloor);
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
$armType = $crewType->armType;
|
||||
|
||||
if($armType == GameUnitConst::T_CASTLE){
|
||||
$armType = GameUnitConst::T_SIEGE;
|
||||
}
|
||||
|
||||
return $this->getVar("dex{$armType}");
|
||||
}
|
||||
|
||||
function addDex(GameUnitDetail $crewType, float $exp, bool $affectTrainAtmos=false){
|
||||
$armType = $crewType->armType;
|
||||
|
||||
|
||||
@@ -238,14 +238,14 @@ class WarUnit{
|
||||
$warPower /= $oppose->getComputedTrain();
|
||||
|
||||
if($this instanceof WarUnitGeneral){
|
||||
$genDexAtt = getGenDex($this->getRaw(), $this->getCrewType()->id);
|
||||
$genDexAtt = $general->getDex($this->getCrewType());
|
||||
}
|
||||
else{
|
||||
$genDexAtt = ($this->cityRate - 60) * 7200;
|
||||
}
|
||||
|
||||
if($this instanceof WarUnitGeneral){
|
||||
$oppDexDef = getGenDex($oppose->getRaw(), $this->getCrewType()->id);
|
||||
$oppDexDef = $opposeGeneral->getDex($this->getCrewType());
|
||||
}
|
||||
else{
|
||||
$oppDexDef = ($this->cityRate - 60) * 7200;
|
||||
|
||||
Reference in New Issue
Block a user