1
This commit is contained in:
parent
a21b52df05
commit
18ff2978cf
@ -34,6 +34,7 @@ define('TN_DAILY_PVE_BATTLE_TIMES', 9006);
|
||||
define('TN_DAILY_PVE_GET_FRAGMENT_NUM', 9007);
|
||||
define('TN_DAILY_PVP_BATTLE_TIMES', 9008);
|
||||
define('TN_DAILY_PVP_GET_FRAGMENT_NUM', 9009);
|
||||
define('TN_DAILY_PVE_LAST_GET_FRAGMENT_BATTLE', 9010);
|
||||
define('TN_DAILY_END', 9009);
|
||||
|
||||
define('TN_WEEKLY_BEGIN', 10001);
|
||||
|
@ -547,6 +547,7 @@ class BattleDataService extends BaseService {
|
||||
private function rewardFragmentPve()
|
||||
{
|
||||
$todayPveBattleTimes = myself()->_getDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0);
|
||||
$todayPveLastGetFragmentBattle = myself()->_getDailyV(TN_DAILY_PVE_LAST_GET_FRAGMENT_BATTLE, 0);
|
||||
$todayPveGetFragmentNum = myself()->_getDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0);
|
||||
$todayPvpGetFragmentNum = myself()->_getDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0);
|
||||
|
||||
@ -571,7 +572,7 @@ class BattleDataService extends BaseService {
|
||||
$instanceRank,
|
||||
$instanceRankRate,
|
||||
$bossReward,
|
||||
$todayPveGetFragmentNum
|
||||
$todayPveLastGetFragmentBattle
|
||||
);
|
||||
$gunProbability = FormulaService::calcWeaponFragmentProbabilityPve
|
||||
(
|
||||
@ -583,7 +584,7 @@ class BattleDataService extends BaseService {
|
||||
$instanceRank,
|
||||
$instanceRankRate,
|
||||
$bossReward,
|
||||
$todayPveGetFragmentNum
|
||||
$todayPveLastGetFragmentBattle
|
||||
);
|
||||
$emptyProbability = max(1 - $heroProbability - $gunProbability, 0);
|
||||
|
||||
@ -749,6 +750,9 @@ class BattleDataService extends BaseService {
|
||||
|
||||
private function procDrop($dropIdx)
|
||||
{
|
||||
$todayPveBattleTimes = myself()->_getDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0);
|
||||
$todayPveLastGetFragmentBattle = myself()->_getDailyV(TN_DAILY_PVE_LAST_GET_FRAGMENT_BATTLE, 0);
|
||||
|
||||
$propertyChgService = new services\PropertyChgService();
|
||||
$awardService = new services\AwardService();
|
||||
$matchMode = getReqVal('match_mode', 0);
|
||||
@ -771,6 +775,7 @@ class BattleDataService extends BaseService {
|
||||
);
|
||||
if ($matchMode == self::MATCH_MODE_PVE) {
|
||||
myself()->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0, 1);
|
||||
myself()->_setDailyV(TN_DAILY_PVE_LAST_GET_FRAGMENT_BATTLE, 0, $todayPveBattleTimes + 1);
|
||||
} else {
|
||||
myself()->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0, 1);
|
||||
}
|
||||
@ -794,6 +799,7 @@ class BattleDataService extends BaseService {
|
||||
);
|
||||
if ($matchMode == self::MATCH_MODE_PVE) {
|
||||
myself()->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0, 1);
|
||||
myself()->_setDailyV(TN_DAILY_PVE_LAST_GET_FRAGMENT_BATTLE, 0, $todayPveBattleTimes + 1);
|
||||
} else {
|
||||
myself()->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0, 1);
|
||||
}
|
||||
|
@ -158,7 +158,8 @@ class FormulaService extends BaseService {
|
||||
$instanceRank,
|
||||
$instanceRankRate,
|
||||
$bossReward,
|
||||
$todayPveGetFragmentNum)
|
||||
$todayPveLastGetFragmentBattle
|
||||
)
|
||||
{
|
||||
$dropRate = max(1.15 - ($heroQuality - $instanceLevel) * 0.25, 0);
|
||||
$dropMul = 0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2;
|
||||
@ -178,14 +179,15 @@ class FormulaService extends BaseService {
|
||||
$instanceRank,
|
||||
$instanceRankRate,
|
||||
$bossReward,
|
||||
$todayPveGetFragmentNum)
|
||||
$todayPveLastGetFragmentBattle
|
||||
)
|
||||
{
|
||||
$dropRate = max(1.15 - ($heroQuality - $instanceLevel) * 0.25, 0);
|
||||
$dropMul = 0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2;
|
||||
|
||||
$gunProbability = min($gunFragmentNum / $onlineNum *
|
||||
$dropRate * ($instanceRankRate + $bossReward*0.2) *
|
||||
pow(2, $todayPveBattleTimes - $todayPveGetFragmentNum - 1), 1);
|
||||
pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1);
|
||||
error_log(json_encode(func_get_args()));
|
||||
return max(0, $gunProbability);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user