1
This commit is contained in:
parent
0a29ccac7b
commit
28dec0c565
@ -55,7 +55,7 @@ class FragmentPool extends BaseModel {
|
||||
{
|
||||
$allocTime = self::getAllocTime();
|
||||
$rows = SqlHelper::ormSelect
|
||||
(myself()->_getMysql($targetId),
|
||||
(myself()->_getSelfMysql(),
|
||||
't_fragment_pool',
|
||||
array(
|
||||
'fragment_type' => $type,
|
||||
@ -77,7 +77,7 @@ class FragmentPool extends BaseModel {
|
||||
{
|
||||
$allocTime = self::getAllocTime();
|
||||
SqlHelper::update
|
||||
(myself()->_getMysql($targetId),
|
||||
(myself()->_getSelfMysql(),
|
||||
't_fragment_pool',
|
||||
array(
|
||||
'fragment_id' => $itemId,
|
||||
|
@ -17,7 +17,7 @@ class RealtimeData extends BaseModel {
|
||||
private static function internalGet($name)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne
|
||||
(myself()->_getMysql($targetId),
|
||||
(myself()->_getSelfMysql(),
|
||||
't_realtime_data',
|
||||
array(
|
||||
'name' => $name
|
||||
|
@ -71,7 +71,7 @@ class BattleDataService extends BaseService {
|
||||
public function updateBattleData()
|
||||
{
|
||||
error_log(json_encode($_REQUEST));
|
||||
$matchMode = getReqVal('match_mode');
|
||||
$matchMode = getReqVal('match_mode', 0);
|
||||
{
|
||||
$heroDb = Hero::find(getReqVal('hero_uniid', 0));
|
||||
if (!$heroDb) {
|
||||
@ -122,7 +122,7 @@ class BattleDataService extends BaseService {
|
||||
$this->updatePvpData();
|
||||
$this->rewardCegPvp();
|
||||
$this->rewardFragmentPvp();
|
||||
$this->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 1);
|
||||
myself()->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0, 1);
|
||||
}
|
||||
break;
|
||||
case self::MATCH_MODE_MATCH:
|
||||
@ -139,7 +139,7 @@ class BattleDataService extends BaseService {
|
||||
$this->rewardCegPve();
|
||||
$this->rewardFragmentPve();
|
||||
}
|
||||
$this->_incDailyV(TN_DAILY_PVE_BATTLE_TIMES, 1);
|
||||
myself()->_incDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0, 1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -497,11 +497,11 @@ class BattleDataService extends BaseService {
|
||||
|
||||
private function rewardFragmentPvp()
|
||||
{
|
||||
$todayPveGetFragmentNum = $this->_getDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0);
|
||||
$todayPvpGetFragmentNum = $this->_getDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0);
|
||||
$todayPveGetFragmentNum = myself()->_getDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0);
|
||||
$todayPvpGetFragmentNum = myself()->_getDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0);
|
||||
|
||||
if ($todayPveGetFragmentNum + $todayPvpGetFragmentNum < self::MAX_DROP_NUM) {
|
||||
$todayPvpBattleTimes = $this->_getDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0);
|
||||
$todayPvpBattleTimes = myself()->_getDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0);
|
||||
|
||||
$onlineNum = RealtimeData::getOnline();
|
||||
$heroFragmentNum = FragmentPool::getHeroNum();
|
||||
@ -512,7 +512,7 @@ class BattleDataService extends BaseService {
|
||||
$onlineNum,
|
||||
$heroFragmentNum,
|
||||
$todayPvpBattleTimes);
|
||||
$gunProbability = FormulaService::calcGunFragmentProbabilityPvp
|
||||
$gunProbability = FormulaService::calcWeaponFragmentProbabilityPvp
|
||||
($_REQUEST,
|
||||
$onlineNum,
|
||||
$gunFragmentNum,
|
||||
@ -526,9 +526,9 @@ class BattleDataService extends BaseService {
|
||||
|
||||
private function rewardFragmentPve()
|
||||
{
|
||||
$todayPveBattleTimes = $this->_getDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0);
|
||||
$todayPveGetFragmentNum = $this->_getDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0);
|
||||
$todayPvpGetFragmentNum = $this->_getDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0);
|
||||
$todayPveBattleTimes = myself()->_getDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0);
|
||||
$todayPveGetFragmentNum = myself()->_getDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0);
|
||||
$todayPvpGetFragmentNum = myself()->_getDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0);
|
||||
|
||||
if ($todayPveGetFragmentNum + $todayPvpGetFragmentNum < self::MAX_DROP_NUM) {
|
||||
$onlineNum = RealtimeData::getOnline();
|
||||
@ -713,7 +713,7 @@ class BattleDataService extends BaseService {
|
||||
|
||||
private function procDrop($dropIdx)
|
||||
{
|
||||
$matchMode = getReqVal('match_mode');
|
||||
$matchMode = getReqVal('match_mode', 0);
|
||||
if ($dropIdx == 0) {
|
||||
$itemId = FragmentPool::dropHero();
|
||||
if ($itemId) {
|
||||
@ -723,9 +723,9 @@ class BattleDataService extends BaseService {
|
||||
'item_num' => 1
|
||||
));
|
||||
if ($matchMode == self::MATCH_MODE_PVE) {
|
||||
$this->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 1);
|
||||
myself()->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0, 1);
|
||||
} else {
|
||||
$this->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 1);
|
||||
myself()->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0, 1);
|
||||
}
|
||||
}
|
||||
} else if ($dropIdx == 1) {
|
||||
@ -737,9 +737,9 @@ class BattleDataService extends BaseService {
|
||||
'item_num' => 1
|
||||
));
|
||||
if ($matchMode == self::MATCH_MODE_PVE) {
|
||||
$this->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 1);
|
||||
myself()->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0, 1);
|
||||
} else {
|
||||
$this->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 1);
|
||||
myself()->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ class FormulaService extends BaseService {
|
||||
if (!$meta) {
|
||||
return 0;
|
||||
}
|
||||
$weaponProbability = min($FragmentNum / $onlineNum *
|
||||
$weaponProbability = min($weaponFragmentNum / $onlineNum *
|
||||
5 *
|
||||
(
|
||||
0.5 * $rankedTopX * $meta['ranked_topx'] +
|
||||
|
Loading…
x
Reference in New Issue
Block a user