|
@@ -69,17 +69,17 @@ class PetProc {
|
|
|
$list = $ins_ExploreArea->explorePetList;
|
|
|
foreach ($list as $petUid) {
|
|
|
$ins_pet = new Ins_Pet(ctx()->store->pet->$petUid);
|
|
|
- $typeId = $ins_pet->mo()->typeId;
|
|
|
+ $typeId = $ins_pet->mo()->type;
|
|
|
$qual = $ins_pet->qual;
|
|
|
|
|
|
$pet_exploreoutputMo = GameConfig::pet_exploreoutput_getItem($typeId, $qual);
|
|
|
if ($pet_exploreoutputMo->exploreOutput != null) {
|
|
|
- $sList = explode(';', $pet_exploreoutputMo->exploreOutput);
|
|
|
+ $sList = explode(';', $pet_exploreoutputMo->exploreOutput);
|
|
|
foreach ($sList as $str) {
|
|
|
$s = explode(',', $str);
|
|
|
if ((int) $s[0] == $ins_ExploreArea->areaId) {
|
|
|
$num += (int) $s[1];
|
|
|
- $ts += (int) $s[2];
|
|
|
+ $ts += (int) $s[2];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -283,16 +283,21 @@ class PetProc {
|
|
|
if (now() >= $vo->endTs) {
|
|
|
$tt = $vo->endTs - $vo->startTs;
|
|
|
}
|
|
|
-
|
|
|
- $ts_n = $vo->output_ts / $vo->output_count;
|
|
|
- $num = intval($tt / $ts_n);
|
|
|
+ $ts = $vo->endTs - $vo->startTs;
|
|
|
+ $hour = $ts / 60 / 60;
|
|
|
+ //$ts_n = intval($vo->output_count/$vo->output_ts * 100000) / 100000;
|
|
|
+ $ts_n = $vo->output_count*$hour/$vo->output_ts;
|
|
|
+ $num = intval($tt * $ts_n);
|
|
|
+ if($num >= $vo->output_count* $ts_n){
|
|
|
+ $num = $vo->output_count* $ts_n;
|
|
|
+ }
|
|
|
$goodsStr = $vo->mo()->reward_fixed . ',' . $num;
|
|
|
StoreProc::AddMultiItemInStore($goodsStr);
|
|
|
|
|
|
$reward = explode(',', $vo->mo()->reward_extra);
|
|
|
- $randNum = rand(1, $reward[2]);
|
|
|
+ $randNum = rand(1, 100);
|
|
|
if ($randNum <= $reward[2]) {
|
|
|
- StoreProc::AddMultiItemInStore($reward[0] . ',' . $randNum);
|
|
|
+ StoreProc::AddMultiItemInStore($reward[0] . ',' . $reward[1]);
|
|
|
}
|
|
|
|
|
|
$vo->startTs = 0;
|