Merge branch 'ty' of git.kingsome.cn:server/game2006api into ty
This commit is contained in:
commit
d5454dcca3
@ -244,4 +244,23 @@ CREATE TABLE `t_shopcart` (
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `t_used_gold_bullion`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `t_used_gold_bullion`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `t_used_gold_bullion` (
|
||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
|
||||
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'open_id',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
PRIMARY KEY (`idx`),
|
||||
UNIQUE KEY `idx_net_id_token_id` (`net_id_token_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
-- Dump completed on 2015-08-19 18:51:22
|
||||
|
@ -1782,6 +1782,8 @@ CREATE TABLE `t_gold_bullion` (
|
||||
PRIMARY KEY (`idx`),
|
||||
UNIQUE KEY `idx_token_id` (`token_id`),
|
||||
UNIQUE KEY `idx_token_id_net_id` (`token_id`, `net_id`),
|
||||
KEY `idx_activated_returned_status` (`activated`, `returned`, `status`),
|
||||
KEY `idx_createtime` (`createtime`),
|
||||
KEY `idx_open_address_open_status` (`open_address`, `open_status`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@ -1883,4 +1885,4 @@ CREATE TABLE `t_server_task_battle_count` (
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
PRIMARY KEY (`idx`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
|
@ -204,13 +204,13 @@ class RoomBattleDataService extends BaseService {
|
||||
$coefficientArr = explode(";",$rewardMeta['goldParam']);
|
||||
$coefficient = isset($coefficientArr[$teamRank-1]) ? $coefficientArr[$teamRank-1] : 0;
|
||||
if ($this->mapMode == mt\MapMode::GOLD_MODE){
|
||||
$gold = floor($gold * $coefficient * ($battleScore / $teamScoreAvg));
|
||||
$gold = $gold * $coefficient * ($battleScore / $teamScoreAvg);
|
||||
}
|
||||
if ($this->mapMode == mt\MapMode::BET_MODE){
|
||||
$ticketMeta = \mt\Item::get(900006);
|
||||
$baseGold = $ticketMeta['gold'];
|
||||
$ticketNum = TicketConsumeRecord::getRecord($this->matchRoomUuid);
|
||||
$gold = floor($ticketMeta['gold'] * $ticketNum * $coefficient * ($battleScore / $teamScore));
|
||||
$gold = $ticketMeta['gold'] * $ticketNum * $coefficient * ($battleScore / $teamScore);
|
||||
}
|
||||
|
||||
$baseValue = $gold;
|
||||
@ -221,7 +221,7 @@ class RoomBattleDataService extends BaseService {
|
||||
$wealthK = mt\Parameter::getVal('economy_hero_wealth_K',0);
|
||||
$wealthE = mt\Parameter::getVal('economy_hero_wealth_E',0);
|
||||
$wealthRate = $wealthE * (Hero::getHeroWealth($heroDb) / (Hero::getHeroWealth($heroDb) + $wealthK));
|
||||
$gold = floor( $gold * (1 + $wealthRate));
|
||||
$gold = $gold * (1 + $wealthRate);
|
||||
// $wealthValue = round($wealthRate,4);
|
||||
//基础金币获得
|
||||
$baseValue = $gold;
|
||||
@ -235,7 +235,7 @@ class RoomBattleDataService extends BaseService {
|
||||
$computeParam = mt\Parameter::getVal('economy_account_compute_K',0);
|
||||
$computeMaxEffect = mt\Parameter::getVal('economy_account_compute_E',0);
|
||||
$powerRate = $totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect;
|
||||
$gold = floor($gold * ($powerRate + 1));
|
||||
$gold = $gold * ($powerRate + 1);
|
||||
$compute = ($totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect + 1);
|
||||
|
||||
$hashRateValue = round($powerRate,4);
|
||||
@ -269,7 +269,7 @@ class RoomBattleDataService extends BaseService {
|
||||
"item_id" => V_ITEM_GOLD,
|
||||
"item_num" => floor($gold),
|
||||
"details" => array(
|
||||
'baseValue' => $baseValue,
|
||||
'baseValue' => floor($baseValue),
|
||||
// 'wealthValue' => $wealthValue,
|
||||
'hashRateValue' => isset($hashRateValue) ? $hashRateValue : 0,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user