diff --git a/sql/gamedb2006_migrate_240710_01.sql b/sql/archived/gamedb2006_migrate_240710_01.sql similarity index 100% rename from sql/gamedb2006_migrate_240710_01.sql rename to sql/archived/gamedb2006_migrate_240710_01.sql diff --git a/sql/gamedb.sql b/sql/gamedb.sql index ed47535c..18c3530b 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -1879,6 +1879,7 @@ CREATE TABLE `t_server_task_battle_count` ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', `period` int(11) NOT NULL DEFAULT '0' COMMENT '周期', + `loot_index` int(11) NOT NULL DEFAULT '0' COMMENT '掉落包索引', `state` int(11) NOT NULL DEFAULT '0' COMMENT '1:总计数 2:循环计数', `val` bigint(20) NOT NULL DEFAULT '0' COMMENT 'val', `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', diff --git a/sql/gamedb2006_migrate_240711_01.sql b/sql/gamedb2006_migrate_240711_01.sql index 47ea0300..78956987 100644 --- a/sql/gamedb2006_migrate_240711_01.sql +++ b/sql/gamedb2006_migrate_240711_01.sql @@ -1,11 +1,10 @@ begin; -alter table t_ingame_mall add column `unit_price` decimal(10, 2) NOT NULL DEFAULT '0' COMMENT '单价'; - CREATE TABLE `t_server_task_battle_count` ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', `period` int(11) NOT NULL DEFAULT '0' COMMENT '周期', + `loot_index` int(11) NOT NULL DEFAULT '0' COMMENT '掉落包索引', `state` int(11) NOT NULL DEFAULT '0' COMMENT '1:总计数 2:循环计数', `val` bigint(20) NOT NULL DEFAULT '0' COMMENT 'val', `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', diff --git a/webapp/controller/OutAppNftController.class.php b/webapp/controller/OutAppNftController.class.php index dd0e202a..72ef94cc 100644 --- a/webapp/controller/OutAppNftController.class.php +++ b/webapp/controller/OutAppNftController.class.php @@ -180,6 +180,10 @@ class OutAppNftController extends BaseController { $heroDb['hero_id'].'_'.$this->getRealHeroQuality($heroDb).".gif"; $info['animation_url'] = "https://res.counterfire.games/nft/video/". $heroDb['hero_id'].'_'.$this->getRealHeroQuality($heroDb).".mp4"; + if ($info['token_id'] > 6240603010001668 && $info['token_id'] <= 6240603010002168){ + $info['animation_url'] = "https://res.counterfire.games/nft/video/wing/". + $heroDb['hero_id'].'_w'.$this->getRealHeroQuality($heroDb).".mp4"; + } array_push($info['attributes'],array( "trait_type" => "Tier", "value" => intval($this->getRealHeroQuality($heroDb)), diff --git a/webapp/models/ServerTaskBattleCount.php b/webapp/models/ServerTaskBattleCount.php index 32a9fc9a..4b9528a4 100644 --- a/webapp/models/ServerTaskBattleCount.php +++ b/webapp/models/ServerTaskBattleCount.php @@ -10,30 +10,31 @@ class ServerTaskBattleCount extends BaseModel const TOTAL_COUNT = 1; //总计数 const LOOP_COUNT = 2; //循环计数 - public static function getV($period, $state, $defVal = 0) + public static function getV($period,$lootIndex, $state, $defVal = 0) { - $valData = self::internalGetV($period, $state, $defVal); + $valData = self::internalGetV($period, $lootIndex,$state, $defVal); return $valData['val']; } - public static function setV($period, $state, $defVal) + public static function setV($period,$lootIndex, $state, $defVal) { - self::internalSetV($period, $state, $defVal); + self::internalSetV($period,$lootIndex, $state, $defVal); } - public static function incV($period, $state, $val) + public static function incV($period,$lootIndex, $state, $val) { - $oldVal = self::getV($period, $state); - self::internalSetV($period, $state, $oldVal + $val); + $oldVal = self::getV($period,$lootIndex, $state); + self::internalSetV($period,$lootIndex, $state, $oldVal + $val); } - private static function internalGetV($period, $state, $defVal = 0){ + private static function internalGetV($period,$lootIndex, $state, $defVal = 0){ $row = SqlHelper::ormSelectOne( myself()->_getSelfMysql(), 't_server_task_battle_count', array( 'account_id' => myself()->_getAccountId(), 'period' => $period, + 'loot_index' => $lootIndex, 'state' => $state, ) ); @@ -43,7 +44,7 @@ class ServerTaskBattleCount extends BaseModel ); } - private static function internalSetV($period,$state, $val) + private static function internalSetV($period,$lootIndex,$state, $val) { SqlHelper::upsert (myself()->_getSelfMysql(), @@ -51,6 +52,7 @@ class ServerTaskBattleCount extends BaseModel array( 'account_id' => myself()->_getAccountId(), 'period' => $period, + 'loot_index' => $lootIndex, 'state' => $state ), array( @@ -60,6 +62,7 @@ class ServerTaskBattleCount extends BaseModel array( 'account_id' => myself()->_getAccountId(), 'period' => $period, + 'loot_index' => $lootIndex, 'state' => $state, 'val' => $val, 'createtime' => myself()->_getNowTime(), diff --git a/webapp/services/LootService.php b/webapp/services/LootService.php index fd3962c5..150c34ea 100644 --- a/webapp/services/LootService.php +++ b/webapp/services/LootService.php @@ -82,9 +82,9 @@ class LootService $period = $serverTaskMeta?$serverTaskMeta['id']:0; // $totalTimes = myself()->_getV(TN_TOTAL_LOOT_TIMES,0); - $totalTimes = ServerTaskBattleCount::getV($period,ServerTaskBattleCount::TOTAL_COUNT); + $totalTimes = ServerTaskBattleCount::getV($period,$lootMeta['id'],ServerTaskBattleCount::TOTAL_COUNT); // $recycleTimes = myself()->_getV(TN_TOTAL_LOOT_TIMES,1); - $recycleTimes = ServerTaskBattleCount::getV(0,ServerTaskBattleCount::LOOP_COUNT); + $recycleTimes = ServerTaskBattleCount::getV(0,$lootMeta['id'],ServerTaskBattleCount::LOOP_COUNT); $contentArr = explode("|",$lootMeta['content']); $initTimes = $contentArr[0]; $po = $contentArr[1]; @@ -98,14 +98,14 @@ class LootService $p = min($po + ($recycleTimes-1) * $pd,$pm) * 100 ; $rnd = rand(1,100); // myself()->_incV(TN_TOTAL_LOOT_TIMES,0,1); - ServerTaskBattleCount::incV($period,ServerTaskBattleCount::TOTAL_COUNT,1); + ServerTaskBattleCount::incV($period,$lootMeta['id'],ServerTaskBattleCount::TOTAL_COUNT,1); if ($rnd <= $p){ // myself()->_setV(TN_TOTAL_LOOT_TIMES,1,1); - ServerTaskBattleCount::setV(0,ServerTaskBattleCount::LOOP_COUNT,1); + ServerTaskBattleCount::setV(0,$lootMeta['id'],ServerTaskBattleCount::LOOP_COUNT,1); self::disposeLootIndex($index1,$depth,$items); }else{ // myself()->_incV(TN_TOTAL_LOOT_TIMES,1,1); - ServerTaskBattleCount::incV(0,ServerTaskBattleCount::LOOP_COUNT,1); + ServerTaskBattleCount::incV(0,$lootMeta['id'],ServerTaskBattleCount::LOOP_COUNT,1); self::disposeLootIndex($index2,$depth,$items); } } diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index 0c644524..bffe9630 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -239,28 +239,7 @@ class RoomBattleDataService extends BaseService { $hashRateValue = round($powerRate,4); } - if ($userDb['account_id'] == "6517_2006_s1_0_104162729566475397176"){ - error_log("BattleGoldRecord:".json_encode(array( - 'goldLootIndex' => $rewardMeta['goldLoot'], - 'map_mode' => $this->mapMode, - '*baseGold*' => $baseGold, - 'teamRank' => $teamRank, - '*ranking*' => isset($coefficient) ? $coefficient : '空', - 'battleScore' => $battleScore, - 'realUserCount' => $this->realUserCount, - 'teamScoreTotal' => $teamScore, - 'teamScoreAvg' => $teamScoreAvg, - '*score*' => '=========', - 'wealthK' => $wealthK, - 'wealthE' => $wealthE, - 'wealthValue' => Hero::getHeroWealth($heroDb), - '*wealth*' => (1 + $wealthE * (Hero::getHeroWealth($heroDb) / (Hero::getHeroWealth($heroDb) + $wealthK))), - 'lastCompute' => isset($lastCompute) ? $lastCompute : '空', - 'currentCompute' => isset($currentCompute) ? $currentCompute : '空', - '*compute*' => isset($compute) ? $compute : '算力系统关闭', - 'finalGold' => floor($gold) - ))); - } + } if ($gold > 0){