From f7eb080a89eb136dabc3dbcb4c8c041a2517461f Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Wed, 10 Jul 2024 13:55:23 +0800 Subject: [PATCH 1/3] 1 --- webapp/services/RoomBattleDataService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index c63be2f3..130a2d10 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -203,13 +203,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; @@ -220,7 +220,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; @@ -234,7 +234,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); From 716d449fec5cf5c791c75b32e52bdcaf9e635c35 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Wed, 10 Jul 2024 15:44:17 +0800 Subject: [PATCH 2/3] 1 --- webapp/services/RoomBattleDataService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index 130a2d10..0c644524 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -268,7 +268,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, ) From 9959b31153e3a66b966364c3bbad27831ff17c5a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 10 Jul 2024 16:51:16 +0800 Subject: [PATCH 3/3] 1 --- sql/bcnftdb.sql | 19 +++++++++++++++++++ sql/gamedb.sql | 2 ++ 2 files changed, 21 insertions(+) diff --git a/sql/bcnftdb.sql b/sql/bcnftdb.sql index 0d8804ab..30b50ab4 100644 --- a/sql/bcnftdb.sql +++ b/sql/bcnftdb.sql @@ -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 diff --git a/sql/gamedb.sql b/sql/gamedb.sql index d1e87f76..0ecc7df8 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -1781,6 +1781,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 */;