This commit is contained in:
zhx 2026-05-23 23:50:53 +08:00
parent 8f33901104
commit f3a2600c1e
610 changed files with 19317 additions and 2335 deletions

View File

@ -3,7 +3,14 @@ set -e
: "${APACHE_DOCUMENT_ROOT:=/var/www/html/home/web}"
sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" \
placeholder="__FARM3_APACHE_DOCUMENT_ROOT__"
sed -ri -e "s~/var/www/html(/home/web|/backend/web)*~${placeholder}~g" \
/etc/apache2/sites-available/*.conf \
/etc/apache2/apache2.conf \
/etc/apache2/conf-available/*.conf
sed -ri -e "s|${placeholder}|${APACHE_DOCUMENT_ROOT}|g" \
/etc/apache2/sites-available/*.conf \
/etc/apache2/apache2.conf \
/etc/apache2/conf-available/*.conf

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
COMPOSE := $(shell if docker compose version >/dev/null 2>&1; then echo "docker compose"; elif command -v docker-compose >/dev/null 2>&1; then echo "docker-compose"; else echo "docker compose"; fi)
.PHONY: up restart down ps logs
up:
$(COMPOSE) up -d --build
restart: down up
down:
$(COMPOSE) down
ps:
$(COMPOSE) ps
logs:
$(COMPOSE) logs -f --tail=200

View File

@ -1118,52 +1118,6 @@ class ConfigController extends Controller
return BackMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
}
public function actionTreasureBoxSave()
{
$id = Yii::$app->request->get('id');
$open_time = (int)Yii::$app->request->get('open_time');
$gem = (int)Yii::$app->request->get('gem');
$fixed_id = (int)Yii::$app->request->get('fixed_id');
$fixed_id2 = (int)Yii::$app->request->get('fixed_id2');
$getItemID = (int)Yii::$app->request->get('getItemID');
$getItemID2 = (int)Yii::$app->request->get('getItemID2');
if (empty($id) || $open_time <= 0 || $gem <= 0 || $fixed_id < 0 || $fixed_id2 < 0 || $getItemID < 0 || $getItemID2 < 0)
return BackMessageServices::sendMessage(ResultStatusServices::RS_PARAM_ERROR);
$item = GameConfigServices::getParamByPath('case.' . $id);
if (empty($item)) return BackMessageServices::sendMessage(ResultStatusServices::RS_PARAM_ERROR);
$expendStr = '';
for ($i = 1; $i <= 33; $i++) {
$itemID = Yii::$app->request->get('item_id' . $i);
$num = (int)Yii::$app->request->get('item_num' . $i);
$odd = (int)Yii::$app->request->get('item_odd' . $i);
if (empty($itemID)) continue;
if ($num < 0) return BackMessageServices::sendMessage(ResultStatusServices::RS_PARAM_ERROR);
$item = GameConfigServices::getParamByPath('item_list.' . $itemID);
if (empty($item)) return BackMessageServices::sendMessage(ResultStatusServices::RS_PARAM_ERROR);
$expendStr .= sprintf('%s:%d:%d,', $itemID, $num, $odd);
}
$expendStr = substr($expendStr, 0, strlen($expendStr) - 1);
$config = GameConfigServices::getGameConfig();
$config['case'][$id]['open_time'] = $open_time;
$config['case'][$id]['reward_id'] = $expendStr;
$config['case'][$id]['Diamond'] = $gem;
$config['case'][$id]['fixed_id'] = sprintf('%s:%d', $getItemID, $fixed_id);
$config['case'][$id]['fixed_id2'] = sprintf('%s:%d', $getItemID2, $fixed_id2);
if (!GameConfigServices::saveGameConfig($config)) return BackMessageServices::sendMessage(ResultStatusServices::RS_SAVE_DB_ERROR);
return BackMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
}
public function actionArenaSave()
{
$id = Yii::$app->request->get('id');
@ -1258,4 +1212,4 @@ class ConfigController extends Controller
return BackMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@ class UserInfo extends Model
Yii::$app->redis->setex(RedisKeyUtil::userInfoByUserID($this->userID), 3600 * 24, $jsonStr);
Yii::$app->redis->setex(RedisKeyUtil::userInfoByUsername($this->username), 3600 * 24, $this->userID);
Yii::$app->redis->setex(RedisKeyUtil::userInfoByToken($this->token), 3600 * 24, $this->userID);
Yii::$app->redis->setex(RedisKeyUtil::userInfoByToken($this->token), 3600 * 24, $jsonStr);
if (!empty($this->fd))
Yii::$app->redis->setex(RedisKeyUtil::userInfoByFD($this->fd), 3600 * 24, $this->userID);
@ -69,8 +69,13 @@ class UserInfo extends Model
public static function loadByToken($token)
{
$userID = Yii::$app->redis->get(RedisKeyUtil::userInfoByToken($token));
return self::loadByUserID($userID);
$jsonStr = Yii::$app->redis->get(RedisKeyUtil::userInfoByToken($token));
if (empty($jsonStr)) return null;
$userInfo = self::loadByJson($jsonStr);
if (!empty($userInfo)) return $userInfo;
return self::loadByUserID($jsonStr);
}
public static function loadByUsername($username)
@ -84,4 +89,4 @@ class UserInfo extends Model
$userID = Yii::$app->redis->get(RedisKeyUtil::userInfoByFD($fd));
return self::loadByUserID($userID);
}
}
}

View File

@ -35,7 +35,6 @@ class AchievementUtil
const ID_SOW_SEEDS = 1;//玩家完成日常种植任务次数
const ID_GET_ONLINE_GIFT = 2;//玩家领取在线礼包次数
const ID_LOTTERY_DRAW = 3;//玩家积累开启大转盘次数
const ID_OPEN_TREASURE_BOX = 4;//玩家开启宝箱次数
const ID_PLEASURE_GROUND = 5;//玩家积累进入游乐场
const ID_ENTER_GYMKHANA = 6;//玩家积累挑战玩家
const ID_STEAL = 7;//玩家积累掠夺玩家资源次数
@ -54,7 +53,6 @@ class AchievementUtil
const ID_ACHIEVEMENT_COUNT = 20;//收集成就徽章个数
const ID_SIGN = 21;//成功签到天数
const ID_FRAGMENT_COUNT = 22;//成功收集碎片个数
const ID_BOX_COUNT = 23;//成功收集宝箱个数
const ID_CATCHING_THIEF = 24;//成功抓捕小偷次数
const ID_STEAL_SUCCESS = 25;//成功偷取玩家果实次数
const ID_NUMBER_ONE = 26;//成为全世界第一名
@ -64,7 +62,6 @@ class AchievementUtil
self::ID_SOW_SEEDS,
self::ID_GET_ONLINE_GIFT,
self::ID_LOTTERY_DRAW,
self::ID_OPEN_TREASURE_BOX,
self::ID_PLEASURE_GROUND,
self::ID_ENTER_GYMKHANA,
self::ID_STEAL,
@ -83,7 +80,6 @@ class AchievementUtil
self::ID_ACHIEVEMENT_COUNT,
self::ID_SIGN,
self::ID_FRAGMENT_COUNT,
self::ID_BOX_COUNT,
self::ID_CATCHING_THIEF,
self::ID_STEAL_SUCCESS,
self::ID_NUMBER_ONE,
@ -275,4 +271,4 @@ class AchievementUtil
}, [$userID, $achID], RedisKeyUtil::lockAchievement($userID, $ach->config_id));
}, [$userID, $achID]);
}
}
}

View File

@ -44,7 +44,6 @@ class DailyTaskUtil
const TYPE_STEAL = 8;//掠夺?次玩家资源
const TYPE_FEED_PET = 9;//喂养?次宠物
const TYPE_EXPEND_GEM = 10;//消耗?钻石
const TYPE_OPEN_TREASURE_BOX = 11;//开启?次?宝箱
const TYPE_BUY = 12;//购买?次?
const TYPE_COMPOSE = 13;//合成?物品
const TYPE_SELL_FRUIT = 14;//出售?次果实
@ -75,7 +74,6 @@ class DailyTaskUtil
self::TYPE_STEAL,
self::TYPE_FEED_PET,
self::TYPE_EXPEND_GEM,
self::TYPE_OPEN_TREASURE_BOX,
self::TYPE_BUY,
self::TYPE_COMPOSE,
self::TYPE_SELL_FRUIT,
@ -255,4 +253,4 @@ class DailyTaskUtil
}, [$userID, $taskID], RedisKeyUtil::lockDailyTask($userID));
}, [$userID, $taskID]);
}
}
}

View File

@ -81,13 +81,12 @@ class SystemLogUtil
const FROM_TYPE_BATTLE_FAIL = 54;//战斗失败
const FROM_TYPE_TASK_GIFT = 55;//任务奖励
const FROM_TYPE_PLEASURE_GROUND = 56;//游乐场奖励
const FROM_TYPE_OPEN_BOX_EXPEND = 57;//开宝箱扣消耗
const FROM_TYPE_GET_BOX_GIFT = 58;//开宝箱获得物品
const FROM_TYPE_GET_ACH_GIFT = 59;//成就奖励
const FROM_TYPE_GET_ARENA_GIFT = 60;//竞技场奖励
const FROM_TYPE_ROBOT = 61;//机器人
const FROM_TYPE_GEM_EXCHANGE_GOLD_PAY = 62;//钻石兑换金币
const FROM_TYPE_GEM_EXCHANGE_GOLD_GET = 63;//钻石兑换金币
const FROM_TYPE_NEWBIE_SEED = 64;//新手免费种子
const FROM_TYPE_LIST = [
self::FROM_TYPE_PAYPAL,
self::FROM_TYPE_BUY,
@ -145,13 +144,12 @@ class SystemLogUtil
self::FROM_TYPE_BATTLE_FAIL,
self::FROM_TYPE_TASK_GIFT,
self::FROM_TYPE_PLEASURE_GROUND,
self::FROM_TYPE_OPEN_BOX_EXPEND,
self::FROM_TYPE_GET_BOX_GIFT,
self::FROM_TYPE_GET_ACH_GIFT,
self::FROM_TYPE_GET_ARENA_GIFT,
self::FROM_TYPE_ROBOT,
self::FROM_TYPE_GEM_EXCHANGE_GOLD_PAY,
self::FROM_TYPE_GEM_EXCHANGE_GOLD_GET,
self::FROM_TYPE_NEWBIE_SEED,
];
public static function get($userID, $type, $value, $num, $fromType, $from_data)
@ -171,4 +169,4 @@ class SystemLogUtil
}
}
}

View File

@ -1,167 +0,0 @@
<?php
/**
* Created by PhpStorm.
* User: zn
* Date: 2017/8/9
* Time: 11:51
*/
namespace common\modules\treasurebox;
use common\modules\achievement\AchievementUtil;
use common\modules\dailytask\DailyTaskUtil;
use common\modules\safe\SafeUtil;
use common\modules\systemlog\SystemLog;
use common\modules\systemlog\SystemLogUtil;
use common\modules\treasurebox\vo\TreasureBox;
use common\services\GameConfigServices;
use common\services\ItemServices;
use common\services\ResultStatusServices;
use common\services\StatusException;
use common\utils\MoneyUtil;
use common\utils\RedisKeyUtil;
/**
* 宝箱
* Class
* @package common\modules\levelgift
*/
class TreasureBoxUtil
{
const GET_GIFT = 1;//获取奖励
const NOT_GET_GIFT = 0;//没有获取奖励
const GET_GIFT_LIST = [
self::GET_GIFT,
self::NOT_GET_GIFT,
];
/**
* 添加箱子
* @param $userID
* @param $itemID
* @param $num
* @param SystemLog $logoVo
* @throws StatusException
*/
public static function addBox($userID, $itemID, $num, SystemLog $logoVo)
{
$num = (int)$num;
if ($num <= 0) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$config = GameConfigServices::getParamByPath('case.' . $itemID);
if (empty($config)) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
for ($i = 0; $i < $num; $i++) {
$box = new TreasureBox();
$box->user_id = $userID;
$box->item_id = $itemID;
$box->end_open_time = 0;
$box->is_get_gift = self::NOT_GET_GIFT;
if (!$box->save()) throw new StatusException(ResultStatusServices::RS_SAVE_DB_ERROR);
}
if (!$logoVo->save()) throw new StatusException(ResultStatusServices::RS_SAVE_DB_ERROR);
}
/**
* 开始倒计时
* @param $userID
* @param $boxID
*/
public static function startTime($userID, $boxID)
{
SafeUtil::dbOperate(function ($userID, $boxID) {
return SafeUtil::redisLockOperate(function ($userID, $boxID) {
$box = TreasureBox::findByID($boxID);
if (empty($box) || $box->end_open_time != 0 || $box->user_id != $userID) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$config = GameConfigServices::getParamByPath('case.' . $box->item_id);
if (empty($config)) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$time = (int)$config['open_time'];
if ($time < 0) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$box->end_open_time = time() + $time;
if (!$box->save()) throw new StatusException(ResultStatusServices::RS_SAVE_DB_ERROR);
}, [$userID, $boxID], RedisKeyUtil::lockBox($boxID));
}, [$userID, $boxID]);
}
/**
* 开箱子
* @param $userID
* @param $boxID
* @param $useGem
*/
public static function openBox($userID, $boxID, $useGem)
{
return SafeUtil::dbOperate(function ($userID, $boxID, $useGem) {
return SafeUtil::redisLockOperate(function ($userID, $boxID, $useGem) {
$useGem=(int)$useGem;
$box = TreasureBox::findByID($boxID);
if (empty($box) || $box->user_id != $userID || $box->is_get_gift == self::GET_GIFT || $box->end_open_time == 0)
throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
if ($useGem != 1 && $box->end_open_time > time()) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
if ($useGem == 1 && $box->end_open_time <= time()) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$config = GameConfigServices::getParamByPath('case.' . $box->item_id);
if (empty($config)) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$gem = (int)$config['Diamond'];
if ($gem <= 0) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
if ($useGem == 1) {
//使用钻石开宝箱
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_GEM, -$gem, 0, SystemLogUtil::FROM_TYPE_OPEN_BOX_EXPEND, ['config' => $config]);
MoneyUtil::checkAndModifyRes($userID, false, -$gem, ItemServices::ITEM_TYPE2_GEM, $log);
}
//领取奖励
$getItem = MoneyUtil::parseAllItemOdds($config['reward_id'], true, $userID, SystemLogUtil::FROM_TYPE_GET_BOX_GIFT, ['config' => $config]);
if (empty($getItem)) throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
MoneyUtil::parseItem($config['fixed_id'], 1, true, $userID, SystemLogUtil::FROM_TYPE_GET_BOX_GIFT, ['config' => $config]);
MoneyUtil::parseItem($config['fixed_id2'], 1, true, $userID, SystemLogUtil::FROM_TYPE_GET_BOX_GIFT, ['config' => $config]);
if (!$box->delete()) throw new StatusException(ResultStatusServices::RS_SAVE_DB_ERROR);
//任务记录
DailyTaskUtil::addTaskCount($userID, DailyTaskUtil::TYPE_OPEN_TREASURE_BOX, $box->item_id, 1);
\Yii::warning($userID);
//成]
AchievementUtil::addCount($userID, AchievementUtil::ID_OPEN_TREASURE_BOX, 1);
return $getItem;
}, [$userID, $boxID, $useGem], RedisKeyUtil::lockBox($boxID));
}, [$userID, $boxID, $useGem]);
}
/**
* 删除箱子
* @param $userID
* @param $boxID
*/
public static function delBox($userID, $boxID)
{
SafeUtil::dbOperate(function ($userID, $boxID) {
SafeUtil::redisLockOperate(function ($userID, $boxID) {
$box = TreasureBox::findByID($boxID);
if (empty($box) || $box->user_id != $userID)
throw new StatusException(ResultStatusServices::RS_PARAM_ERROR);
$box->delete();
}, [$userID, $boxID], RedisKeyUtil::lockBox($boxID));
}, [$userID, $boxID]);
}
}

View File

@ -1,85 +0,0 @@
<?php
namespace common\modules\treasurebox\vo;
use common\modules\treasurebox\TreasureBoxUtil;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
/**
*
CREATE TABLE `treasure_box` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`item_id` varchar(45) NOT NULL COMMENT '宝箱物品ID',
`name` varchar(45) NOT NULL,
`end_open_time` int(11) NOT NULL COMMENT '开启时间0未计时',
`is_get_gift` int(11) DEFAULT NULL COMMENT '是否领取奖励',
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='宝箱'
*/
/**
* 宝箱
* @property int $id
* @property int $user_id
* @property int $item_id //宝箱物品ID
* @property string $name
* @property int $end_open_time //开启时间0未计时
* @property int $is_get_gift //是否领取奖励
* @property int $created_at
* @property int $updated_at
*/
class TreasureBox extends ActiveRecord
{
public function behaviors()
{
return [
TimestampBehavior::className(),
];
}
public function rules()
{
return [
['id', 'default', 'value' => 0],
['user_id', 'required'],
['user_id', 'exist', 'targetClass' => '\common\models\User', 'targetAttribute' => 'id'],
['item_id', 'default', 'value' => ''],
['name', 'default', 'value' => ''],
['end_open_time', 'default', 'value' => 0],
['is_get_gift', 'default', 'value' => TreasureBoxUtil::NOT_GET_GIFT],
['is_get_gift', 'in', 'range' => TreasureBoxUtil::GET_GIFT_LIST],
['created_at', 'default', 'value' => 0],
['updated_at', 'default', 'value' => 0],
];
}
/**
* @param $userID
* @return static[]
*/
public static function findAllByUserID($userID)
{
return self::findAll(['user_id' => $userID]);
}
/**
* @param $id
* @return static
*/
public static function findByID($id)
{
return self::findOne(['id' => $id]);
}
}

View File

@ -22,6 +22,9 @@ use yii\base\Model;
class GameConfigServices extends Model
{
const CACHE_GAME_CONFIG_KEY = 'gameConfig'; //游戏配置缓存key
const CACHE_GAME_CONFIG_MTIME_KEY = 'gameConfigMtime'; //游戏配置文件修改时间缓存key
private static $_runtimeGameConfig = null;
const COMMON_DRY_ID = 1;//干旱减产比例
const COMMON_BUG_ID = 2;//虫害减产比例
@ -70,16 +73,39 @@ class GameConfigServices extends Model
*/
public static function getGameConfig()
{
self::reloadGameConfig();
//从缓存读取
if (Yii::$app->redis->exists(self::CACHE_GAME_CONFIG_KEY)) {
return json_decode(Yii::$app->redis->get(self::CACHE_GAME_CONFIG_KEY), true);
if (self::$_runtimeGameConfig !== null) {
return self::$_runtimeGameConfig;
}
//从文件读取
if (self::reloadGameConfig())
return json_decode(Yii::$app->redis->get(self::CACHE_GAME_CONFIG_KEY), true);
$gameConfigFile = Yii::$app->params['game_config_file'];
$fileMtime = file_exists($gameConfigFile) ? filemtime($gameConfigFile) : false;
if ($fileMtime !== false) {
$cacheMtime = Yii::$app->redis->get(self::CACHE_GAME_CONFIG_MTIME_KEY);
if ((string)$cacheMtime === (string)$fileMtime) {
$gameConfigContent = Yii::$app->redis->get(self::CACHE_GAME_CONFIG_KEY);
if (!empty($gameConfigContent)) {
$gameConfig = json_decode($gameConfigContent, true);
if (is_array($gameConfig)) {
self::$_runtimeGameConfig = $gameConfig;
return self::$_runtimeGameConfig;
}
}
}
}
if (self::reloadGameConfig()) {
return self::$_runtimeGameConfig;
}
$gameConfigContent = Yii::$app->redis->get(self::CACHE_GAME_CONFIG_KEY);
if (!empty($gameConfigContent)) {
$gameConfig = json_decode($gameConfigContent, true);
if (is_array($gameConfig)) {
self::$_runtimeGameConfig = $gameConfig;
return self::$_runtimeGameConfig;
}
}
return [];
}
@ -93,9 +119,16 @@ class GameConfigServices extends Model
$gameConfigFile = Yii::$app->params['game_config_file'];
if (file_exists($gameConfigFile)) {
$gameConfigContent = file_get_contents($gameConfigFile);
$gameConfig = json_decode($gameConfigContent, true);
if (!is_array($gameConfig)) {
return false;
}
//缓存配置文件
Yii::$app->redis->set(self::CACHE_GAME_CONFIG_KEY, $gameConfigContent);
Yii::$app->redis->set(self::CACHE_GAME_CONFIG_MTIME_KEY, filemtime($gameConfigFile));
self::$_runtimeGameConfig = $gameConfig;
return true;
}
@ -348,4 +381,4 @@ class GameConfigServices extends Model
}
}
}

View File

@ -41,7 +41,6 @@ class ItemServices
const ITEM_TYPE2_STEEL = 15;//钢材
const ITEM_TYPE2_GEMSTONE = 200;//宝石
const ITEM_TYPE2_CRYSTAL = 300;//水晶
const ITEM_TYPE2_BOX = 400;//箱子
const ITEM_TYPE2_EGG = 500;//egg
const ITEM_TYPE2_CHIP = 600;//碎片
const ITEM_TYPE2_PET_BLUEPRINT = 700;//图纸
@ -179,4 +178,4 @@ class ItemServices
}
}
}

View File

@ -189,6 +189,18 @@ class LandService extends Object
if ($landDbData->is_ripe == 1) return ResultStatusServices::RS_OPERATION_SUCCESS;
$cropConfig = GameConfigServices::getParamByPath('crop_list.' . $landDbData->crop_id);
if (NewbieGuideService::isNewbieCrop($landDbData->crop_id)) {
if (time() >= self::getLandCropGatherTime($landDbData)) {
$landDbData->crop_num = NewbieGuideService::NEWBIE_REWARD_GOLD;
$landDbData->crop_min_num = NewbieGuideService::NEWBIE_REWARD_GOLD;
$landDbData->has_dry = 0;
$landDbData->has_bug = 0;
$landDbData->has_grass = 0;
$landDbData->is_ripe = 1;
if (!$landDbData->save()) return ResultStatusServices::RS_SAVE_DB_ERROR;
}
return ResultStatusServices::RS_OPERATION_SUCCESS;
}
$change = false;
//判断是否达到收获时间
@ -496,4 +508,4 @@ class LandService extends Object
elseif (time() < $growPhaseTime3) return EnumUtil::CROP_PHASE_GROW;
else return EnumUtil::CROP_PHASE_RIPE;
}
}
}

View File

@ -0,0 +1,59 @@
<?php
namespace common\services;
use common\modules\systemlog\SystemLog;
use common\modules\systemlog\SystemLogUtil;
use common\utils\RedisKeyUtil;
use RedisLock\RedisLock;
use Yii;
class NewbieGuideService
{
const NEWBIE_SEED_ITEM_ID = 101018;
const NEWBIE_CROP_ID = 18;
const NEWBIE_REWARD_ITEM_ID = 105002;
const NEWBIE_REWARD_GOLD = 10;
public static function grantSeedIfNeeded($userID)
{
$userID = (int)$userID;
if ($userID <= 0) return ResultStatusServices::RS_USER_NOT_LOGIN;
$lock = new RedisLock(Yii::$app->redis, RedisKeyUtil::lockUser($userID), RedisLock::FLAG_CATCH_EXCEPTIONS);
if (!$lock->acquire(10)) return ResultStatusServices::RS_SAME_TIME_OPERATION;
try {
if (self::hasGrantedSeed($userID)) return ResultStatusServices::RS_OPERATION_SUCCESS;
$log = SystemLogUtil::get(
$userID,
SystemLogUtil::TYPE_ITEM,
self::NEWBIE_SEED_ITEM_ID,
1,
SystemLogUtil::FROM_TYPE_NEWBIE_SEED,
[]
);
return ItemServices::checkAndModifyNum($userID, self::NEWBIE_SEED_ITEM_ID, true, 1, $log);
} finally {
$lock->release();
}
}
public static function hasGrantedSeed($userID)
{
return SystemLog::find()
->where([
'user_id' => (int)$userID,
'from_type' => SystemLogUtil::FROM_TYPE_NEWBIE_SEED,
'value' => self::NEWBIE_SEED_ITEM_ID,
])
->exists();
}
public static function isNewbieCrop($cropID)
{
return (int)$cropID === self::NEWBIE_CROP_ID;
}
}

View File

@ -36,8 +36,6 @@ class UserService extends Object
*/
public static function saveUserInfo(User $userDbData)
{
self::loginOut($userDbData->id);
$userInfo = new UserInfo();
$userInfo->userID = $userDbData->id;
$userInfo->username = $userDbData->username;
@ -251,4 +249,4 @@ class UserService extends Object
$str = json_encode($info);
Yii::$app->redis->set(RedisKeyUtil::onlineInfo($userID), $str);
}
}
}

View File

@ -15,7 +15,6 @@ use common\modules\dailytask\DailyTaskUtil;
use common\modules\safe\SafeUtil;
use common\modules\systemlog\SystemLog;
use common\modules\systemlog\SystemLogUtil;
use common\modules\treasurebox\TreasureBoxUtil;
use common\services\GameConfigServices;
use common\services\ItemServices;
use common\services\ResultStatusServices;
@ -23,6 +22,14 @@ use common\services\StatusException;
class MoneyUtil
{
const REMOVED_BOX_ITEM_TYPE = 400;
const REMOVED_BOX_ITEM_IDS = [
201012,
201013,
201014,
201015,
201016,
];
/**
* 修改仓库物品
@ -239,6 +246,8 @@ class MoneyUtil
$num = (int)$num;
$num *= $count;
if (in_array($itemID, self::REMOVED_BOX_ITEM_IDS, true)) return null;
if (empty($itemID) || $num < 0) throw new StatusException(ResultStatusServices::RS_CONFIG_ERROR);
if ($num == 0) return null;
@ -264,14 +273,9 @@ class MoneyUtil
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_GEM, $num, 0, $logFromType, $logDetail);
MoneyUtil::checkAndModifyRes($userID, $isAdd, $num, ItemServices::ITEM_TYPE2_GEM, $log);
}else if ($itemType == ItemServices::ITEM_TYPE2_BOX) {
}else if ($itemType == self::REMOVED_BOX_ITEM_TYPE) {
if ($isAdd) {
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_ITEM, $itemID, $num, $logFromType, $logDetail);
TreasureBoxUtil::addBox($userID, $itemID, $num, $log);
AchievementUtil::addCount($userID, AchievementUtil::ID_BOX_COUNT, abs($num));
}
return null;
} else {
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_ITEM, $itemID, $num, $logFromType, $logDetail);
@ -294,7 +298,7 @@ class MoneyUtil
}
/**
* 解析物品,宝箱ID:概率:数量
* 解析物品,物品ID:概率:数量
* 201012:85:1,201013:5:1,201014:5:1,201015:5:1
* @param $itemStr
* @param $isAdd
@ -367,4 +371,4 @@ class MoneyUtil
return $getList;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -49,11 +49,10 @@ class ArenaController extends Controller
public function actionGetChallengeList()
{
// $userID = Yii::$app->request->get('user_id');
// if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
$userID = Yii::$app->request->get('user_id');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
// $list = ArenaUtil::getChallengeList($userID);
$list = ArenaUtil::getChallengeList(230);
$list = ArenaUtil::getChallengeList($userID);
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, ['list' => $list]);
}
@ -93,4 +92,4 @@ class ArenaController extends Controller
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, ['list' => $list]);
}
}
}

View File

@ -24,8 +24,6 @@ use common\modules\sign\vo\Sign;
use common\modules\sign\vo\SignContinueGift;
use common\modules\systemlog\SystemLog;
use common\modules\systemlog\SystemLogUtil;
use common\modules\treasurebox\TreasureBoxUtil;
use common\modules\treasurebox\vo\TreasureBox;
use common\modules\vip\VipUtil;
use common\modules\vip\vo\Vip;
use common\services\ClientMessageServices;
@ -534,17 +532,42 @@ $find = UserLog::find()->where(['user_id' => $userID,'type' => $type, 'delete' =
//签到数据
$week = CommUtil::getWeek(time());
$dbList = Sign::findAllByUserIDAndWeek($userID, $week, SORT_ASC);
$dbList = Sign::find()
->where(['user_id' => $userID, 'week' => $week])
->orderBy(['sign_time' => SORT_ASC])
->asArray()
->all();
$list = [];
for ($i = 0; $i < count($dbList); $i++) {
array_push($list, $dbList[$i]->toArray());
$item = $dbList[$i];
$list[] = [
'id' => (int)$item['id'],
'user_id' => (int)$item['user_id'],
'sign_time' => (int)$item['sign_time'],
'is_remedy' => (int)$item['is_remedy'],
'week' => $item['week'],
'day' => $item['day'],
'created_at' => (int)$item['created_at'],
'updated_at' => (int)$item['updated_at'],
];
}
//连续签到奖励
$dbList = SignContinueGift::findAllByUserIDAndWeek($userID, $week);
$dbList = SignContinueGift::find()
->where(['user_id' => $userID, 'week' => $week])
->asArray()
->all();
$continueList = [];
for ($i = 0; $i < count($dbList); $i++) {
array_push($continueList, $dbList[$i]->toArray());
$item = $dbList[$i];
$continueList[] = [
'id' => (int)$item['id'],
'user_id' => (int)$item['user_id'],
'week' => $item['week'],
'count' => (int)$item['count'],
'created_at' => (int)$item['created_at'],
'updated_at' => (int)$item['updated_at'],
];
}
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, ['list' => $list, 'continue_list' => $continueList]);
@ -832,56 +855,4 @@ $find = UserLog::find()->where(['user_id' => $userID,'type' => $type, 'delete' =
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
}
/**
* 宝箱
* @return array
*/
public function actionGetBoxList()
{
$userID = Yii::$app->request->get('user_id');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
$dbList = TreasureBox::findAllByUserID($userID);
$list = [];
foreach ($dbList as $item) {
array_push($list, $item->toArray());
}
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, $list);
}
public function actionBoxStartTime()
{
$userID = Yii::$app->request->get('user_id');
$boxID = Yii::$app->request->get('box_id');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
TreasureBoxUtil::startTime($userID, $boxID);
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
}
public function actionOpenBox()
{
$userID = Yii::$app->request->get('user_id');
$boxID = Yii::$app->request->get('box_id');
$useGem = Yii::$app->request->get('use_gem');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
$obj = TreasureBoxUtil::openBox($userID, $boxID, $useGem);
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, $obj);
}
public function actionDelBox()
{
$userID = Yii::$app->request->get('user_id');
$boxID = Yii::$app->request->get('box_id');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
TreasureBoxUtil::delBox($userID, $boxID);
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
}
}

View File

@ -24,6 +24,7 @@ use common\services\GameConfigServices;
use common\services\ItemServices;
use common\services\LandService;
use common\services\MuchangService;
use common\services\NewbieGuideService;
use common\services\RandServices;
use common\services\ResultStatusServices;
use common\services\UserLogService;
@ -52,6 +53,11 @@ class FarmController extends Controller
$userID = Yii::$app->request->get('user_id');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
$grantRs = NewbieGuideService::grantSeedIfNeeded($userID);
if ($grantRs != ResultStatusServices::RS_OPERATION_SUCCESS) {
return ClientMessageServices::sendMessage($grantRs);
}
//更新农场状态
$farmDbData = Farm::findOne(['user_id' => $userID]);
LandService::updateAllCropStatus($userID, $farmDbData->id, $farmDbData->level);
@ -437,6 +443,7 @@ class FarmController extends Controller
//修改数据
$dbTrans = Yii::$app->db->beginTransaction();
$addExp = 0;
$rewardText = '';
try {
//收获
$output = 0;
@ -444,9 +451,18 @@ class FarmController extends Controller
$rs = LandService::gatherCrop($farmDbData->id, $position, $output, $itemID);
if ($rs != ResultStatusServices::RS_OPERATION_SUCCESS) return ClientMessageServices::sendMessage($rs);
//添加到仓库
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_ITEM, $itemID, $output, SystemLogUtil::FROM_TYPE_GATHER_CROP, []);
$rs = ItemServices::checkAndModifyNum($userID, $itemID, true, $output, $log);
$itemConfig = GameConfigServices::getParamByPath('item_list.' . $itemID);
if (!$itemConfig) return ClientMessageServices::sendMessage(ResultStatusServices::RS_NOT_FIND_IN_CONFIG);
$rewardText = sprintf('%s:%d', $itemID, $output);
if ((int)$itemConfig['type2'] == ItemServices::ITEM_TYPE2_GOLD) {
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_GOLD, $output, 0, SystemLogUtil::FROM_TYPE_GATHER_CROP, []);
$rs = UserService::checkAndModifyMoney($userID, true, $output, 0, $log);
} else {
//添加到仓库
$log = SystemLogUtil::get($userID, SystemLogUtil::TYPE_ITEM, $itemID, $output, SystemLogUtil::FROM_TYPE_GATHER_CROP, []);
$rs = ItemServices::checkAndModifyNum($userID, $itemID, true, $output, $log);
}
if ($rs != ResultStatusServices::RS_OPERATION_SUCCESS) return ClientMessageServices::sendMessage($rs);
//增加玩家经验
@ -460,11 +476,17 @@ class FarmController extends Controller
$percent = floatval(intval($farmConfig['add_exp']) + intval($landConfig['add_exp'])) / 100;
$addExp = round(intval($cropConfig['exp']) * (1 + $percent));
MoneyUtil::addUserExp($userID, $addExp);
$zhongzi = GameConfigServices::getParamByPath('store_list.' . ($cropConfig['item_id']-102000));
if ($addExp > 0) {
MoneyUtil::addUserExp($userID, $addExp);
}
//分销返点
RebateUtil::addRebate($userID, $zhongzi['gold'], RebateUtil::TYPE_BUY);
if ((int)$itemConfig['type2'] != ItemServices::ITEM_TYPE2_GOLD) {
$zhongzi = GameConfigServices::getParamByPath('store_list.' . ($cropConfig['item_id']-102000));
if (!empty($zhongzi) && isset($zhongzi['gold'])) {
//分销返点
RebateUtil::addRebate($userID, $zhongzi['gold'], RebateUtil::TYPE_BUY);
}
}
}
//记录日志
@ -490,6 +512,7 @@ class FarmController extends Controller
$returnData['item_id'] = $itemID;
$returnData['item_add_num'] = $output;
$returnData['add_exp'] = $addExp;
$returnData['reward_text'] = $rewardText;
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, $returnData);
}
/**
@ -1137,4 +1160,4 @@ class FarmController extends Controller
//ClientMessageServices::sendDebugInfo($landDbData->genClientData());
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, $returnData);
}
}
}

View File

@ -59,6 +59,8 @@ class StoreController extends Controller
$itemID = $itemStoreConfig['item_id'];
if (!$itemID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_NOT_FIND_IN_CONFIG);
$itemConfig = GameConfigServices::getParamByPath('item_list.' . $itemID);
if (!$itemConfig) return ClientMessageServices::sendMessage(ResultStatusServices::RS_NOT_FIND_IN_CONFIG);
$lock = new RedisLock(Yii::$app->redis, RedisKeyUtil::lockLandInteraction($userID, $storeID, $num), RedisLock::FLAG_CATCH_EXCEPTIONS);
if (!$lock->acquire(10)) return ClientMessageServices::sendMessage(ResultStatusServices::RS_SAME_TIME_OPERATION);
$itemDbData = Item::findOne(['user_id' => $userID, 'item_id' => $itemID]);
@ -274,4 +276,4 @@ if($itemID=='200330'){
return ClientMessageServices::sendMessage(1072);
}
}
}

View File

@ -15,6 +15,7 @@ use common\modules\systemlog\SystemLogUtil;
use common\services\ClientMessageServices;
use common\services\GameConfigServices;
use common\services\ItemServices;
use common\services\NewbieGuideService;
use common\services\ResultStatusServices;
use common\services\UserLogService;
use common\services\UserService;
@ -37,13 +38,30 @@ class StoreHouseController extends Controller
$userID = Yii::$app->request->get('user_id');
if (!$userID) return ClientMessageServices::sendMessage(ResultStatusServices::RS_USER_NOT_LOGIN);//验证登录
//获取所有仓库数据
$clientData = [];
$itemDbDataList = Item::findAll(['user_id' => $userID]);
$itemDbDataList = ItemServices::sortItem($itemDbDataList);
$grantRs = NewbieGuideService::grantSeedIfNeeded($userID);
if ($grantRs != ResultStatusServices::RS_OPERATION_SUCCESS) {
return ClientMessageServices::sendMessage($grantRs);
}
foreach ($itemDbDataList as $item)
array_push($clientData, $item->genClientData());
//获取所有仓库数据
$itemDbDataList = Item::find()
->select(['id', 'user_id', 'item_id', 'name', 'type', 'num'])
->where(['user_id' => $userID])
->orderBy(['type' => SORT_ASC, 'item_id' => SORT_ASC])
->asArray()
->all();
$clientData = [];
foreach ($itemDbDataList as $item) {
$clientData[] = [
'id' => (int)$item['id'],
'user_id' => (int)$item['user_id'],
'item_id' => (int)$item['item_id'],
'name' => $item['name'],
'type' => (int)$item['type'],
'num' => (int)$item['num'],
];
}
return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS, $clientData);
}
@ -163,4 +181,4 @@ class StoreHouseController extends Controller
//
// return ClientMessageServices::sendMessage(ResultStatusServices::RS_OPERATION_SUCCESS);
// }
}
}

View File

@ -51,19 +51,24 @@
<!--这个标签会被替换为项目中所有的 javascript 文件。删除 game_files 标签后,项目文件加载列表将不会变化,请谨慎操作!-->
<!--game_files_start-->
<script egret="lib" src="js/main/00-runtime-and-notify.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/01-base-and-registration.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/02-startup-proxies.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/03-game-ui-core.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/04-friends-items-land-shop.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/05-config-and-panels.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/06-gifts-and-friend-panels.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/07-mediators.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/08-magic-factory.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/09-scenes-and-scene-mediators.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/10-services-utils-and-effects.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/11-sign-and-box.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/12-welfare.js?v=decoded-modules-8"></script>
<script egret="lib" src="js/main/00-runtime-and-notify.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/01-base-and-registration.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/02-startup-proxies.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/03-game-ui-core.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/04-friends-items-land-shop.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/05-config-and-panels.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/06-gifts-and-friend-panels.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/07-mediators.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/08-magic-factory.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/09-scenes-and-scene-mediators.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/10-services-utils-and-effects.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/11-sign-and-box.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/12-welfare.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/13-world-features.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/14-gold-exchange.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/15-battle-pet-full.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/16-amusement-park-full.js?v=decoded-modules-31"></script>
<script egret="lib" src="js/main/17-sports-full.js?v=decoded-modules-31"></script>
<!--game_files_end-->
</head>

View File

@ -91,6 +91,8 @@ var PanelNotify = class PanelNotify {
static CLOSE_HAIBAO = "CLOSE_ANSWER";
static CLOSE_EXGOLD = "CLOSE_EXGOLD";
static OPEN_EXGOLD = "OPEN_EXGOLD";
static OPEN_CHANGE_GOLD = "OPEN_CHANGE_GOLD";
static CLOSE_CHANGE_GOLD = "CLOSE_CHANGE_GOLD";
static OPEN_NOTICE = "OPEN_NOTICE";
static CLOSE_NOTICE = "CLOSE_NOTICE";
static OPEN_SIGN = "OPEN_SIGN";
@ -101,9 +103,17 @@ var PanelNotify = class PanelNotify {
static CLOSE_FULI = "CLOSE_FULI";
static OPEN_FULI_GET = "OPEN_FULI_GET";
static CLOSE_FULI_GET = "CLOSE_FULI_GET";
static OPEN_BOX = "OPEN_BOX";
static CLOSE_BOX = "CLOSE_BOX";
};
static OPEN_BOX = "OPEN_BOX";
static CLOSE_BOX = "CLOSE_BOX";
static OPEN_BATTLEPET = "OPEN_BATTLEPET";
static CLOSE_BATTLEPET = "CLOSE_BATTLEPET";
static OPEN_SPORTS = "OPEN_SPORTS";
static CLOSE_SPORTS = "CLOSE_SPORTS";
static OPEN_CHENGJIU = "OPEN_CHENGJIU";
static CLOSE_CHENGJIU = "CLOSE_CHENGJIU";
static OPEN_ASUMENT_PARK = "OPEN_ASUMENT_PARK";
static CLOSE_ASUMENT_PARK = "CLOSE_ASUMENT_PARK";
};
__reflect(PanelNotify.prototype, "PanelNotify");
var Proxy = class Proxy {
constructor() {}

View File

@ -709,21 +709,21 @@ var game;
createChildren() {
(super.createChildren(), this.initWaveButton());
}
onTouchTap(t) {
switch ((t.stopPropagation(), t.target)) {
case this.btn1:
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_FULI);
break;
case this.btn2:
PopUpManager.popTip("敬请期待");
break;
case this.btn3:
PopUpManager.popTip("敬请期待");
break;
case this.btn4:
PopUpManager.popTip("敬请期待");
}
}
onTouchTap(t) {
switch ((t.stopPropagation(), t.target)) {
case this.btn1:
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_ASUMENT_PARK);
break;
case this.btn2:
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_SPORTS);
break;
case this.btn3:
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_CHENGJIU);
break;
case this.btn4:
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_BATTLEPET);
}
}
btnHomeTouchEnded() {
this.showOrHideWaveButton();
}
@ -809,8 +809,13 @@ var game;
)
.call(game.UIUtils.removeSelf, this, [this]);
}
onRemoved() {
this.btnExchangeGold &&
this.btnExchangeGold.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onExchangeGoldTap, this);
super.onRemoved();
}
createChildren() {
(super.createChildren(), manager.UpdateTickerManager.instance.add(this));
(super.createChildren(), this.createExchangeGoldButton(), manager.UpdateTickerManager.instance.add(this));
}
childrenCreated() {
super.childrenCreated();
@ -830,6 +835,31 @@ var game;
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_SIGN);
}
}
createExchangeGoldButton() {
this.height = 460;
this.btnExchangeGold = new eui.Group();
this.btnExchangeGold.name = "btnExchangeGold";
this.btnExchangeGold.x = 0;
this.btnExchangeGold.y = 356;
this.btnExchangeGold.width = 86;
this.btnExchangeGold.height = 99;
this.btnExchangeGold.touchEnabled = !0;
const icon = new eui.Image("menu2_top_crystal_png");
icon.x = -3;
icon.y = 0;
icon.width = 93;
icon.height = 99;
icon.touchEnabled = !1;
this.btnExchangeGold.addChild(icon);
this.btnExchangeGold.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onExchangeGoldTap, this);
this.addChild(this.btnExchangeGold);
}
onExchangeGoldTap(event) {
event.stopPropagation();
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_CHANGE_GOLD);
}
onStageTap(t) {}
update(t) {}
};
@ -895,8 +925,8 @@ var game;
((this.isWaveButtonShowing = !1),
(this.waveButtonArr = [this.btn1, this.btn2, this.btn3, this.btn4]),
(this.waveCenterPos = new egret.Point(
this.btnHome.x + 0.5 * this.btnHome.width,
this.btnHome.y + 0.5 * this.btnHome.height
0.5 * this.btnHome.width,
0.5 * this.btnHome.height
)),
this.visibleWaveButton(!1));
}
@ -936,8 +966,8 @@ var game;
this.waveButtonArr.forEach(function (e, n) {
const a = i.wavePlayingAngle - 36 * n,
o = game.Utils.ang2rad(a),
r = 155 * Math.cos(o) + i.waveCenterPos.x + 50,
s = 155 * Math.sin(o) + i.waveCenterPos.y + 30;
r = 155 * Math.cos(o) + i.waveCenterPos.x,
s = 155 * Math.sin(o) + i.waveCenterPos.y;
((e.x = r), (e.y = s));
}));
}

View File

@ -1174,7 +1174,7 @@ var game;
const Main = class Main extends eui.UILayer {
constructor() {
super();
this.version_num = "1.0411113";
this.version_num = "1.0411121";
this.use_oss = !1;
this.oss_path = "http://down.muchang123.com/";
this.isThemeLoadEnd = !1;
@ -1207,7 +1207,7 @@ var game;
}
onConfigComplete(t) {
RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this);
const e = new eui.Theme("resource/default.thm.json?v=bag-panel-original-1", this.stage);
const e = new eui.Theme("resource/default.thm.json?v=ui-original-8", this.stage);
(e.addEventListener(eui.UIEvent.COMPLETE, this.onThemeLoadComplete, this),
RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this),
RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this),

View File

@ -179,10 +179,13 @@ var game;
((this.imgGround.source = game.URLConfig.getGround(n)),
(this.imgFenceFront.source = game.URLConfig.getGroundFenceFront(n)),
(this.imgFenceBack.source = game.URLConfig.getGroundFenceBack(n)),
e ||
(GameConfig.curHeight() > 1024
? ((this.imgGround.scale9Grid = new egret.Rectangle(0, 1, 1, 1)), (this.imgGround.top = 0))
: ((this.imgGround.scale9Grid = null), (this.imgGround.top = 0 / 0))));
(this.imgGround.left = 0),
(this.imgGround.right = 0),
(this.imgGround.top = 0),
(this.imgGround.bottom = 0),
(this.imgGround.width = Const.WIN_W || GameConfig.curWidth()),
(this.imgGround.height = Const.WIN_H || GameConfig.curHeight()),
(this.imgGround.scale9Grid = new egret.Rectangle(0, 1, 1, 1)));
}
};
((game.GameScene = GameScene), __reflect(GameScene.prototype, "game.GameScene", ["IUpdate"]));
@ -192,6 +195,7 @@ var game;
const LoginScene = class LoginScene extends game.BaseComponent {
constructor() {
super();
this.isLoggingIn = !1;
this.skinName = new LoginSceneSkin();
}
createChildren() {
@ -206,6 +210,18 @@ var game;
}
}
((this.inpPw.displayAsPassword = !0), (this.usernameGroup.visible = !1));
this.btnLogin && this.btnLogin.addEventListener(egret.TouchEvent.TOUCH_TAP, this.btnLoginTouchEnded, this);
}
childrenCreated() {
super.childrenCreated();
if (!this.check2) return;
let isRemember = false;
try {
isRemember = JSON.parse(egret.localStorage.getItem("isRemember")) === true;
} catch (error) {
isRemember = false;
}
this.check2.selected = isRemember;
}
xialaImageTouchEnded() {
this.usernameGroup.visible = !this.usernameGroup.visible;
@ -252,6 +268,7 @@ var game;
} else NativeApi.setLocalData("usernames", n);
}
async btnLoginTouchEnded() {
if (this.isLoggingIn) return;
Global.audioProxy.openSound(!1);
const username = this.inpKey.text;
const password = this.inpPw.text;
@ -261,31 +278,40 @@ var game;
}
Global.netProxy.setToken(null);
this.isLoggingIn = !0;
const loginData = {
username,
password
};
Global.netProxy.sendRequest(GameConfig.SERVER_PATH + "user/login", loginData, (response) => {
this.isLoggingIn = !1;
if (0 === response.status) {
const isRememberPassword = this.check2 && this.check2.selected === true;
Global.netProxy.setToken(response.data.token);
TipsUtils.showTipsDownToUp("登陆成功");
egret.localStorage.setItem("isRemember", JSON.stringify(isRememberPassword));
Global.playerProxy.setPlayerData(response.data);
this.check2.selected
? this.setPlayerDataLocal(username, password)
: this.check1.selected && this.setPlayerDataLocal(username, "");
this.setPlayerDataLocal(username, isRememberPassword ? password : "");
Global.gameProxy.getGameConfigJson(() => {
Global.playerProxy.setPlayerLandData(response.data);
GiftManager.getInstance().initData();
Global.playerProxy.getPlayerStoreHouse(() => {
game.AppFacade.getInstance().sendNotification(SceneNotify.CLOSE_LOGIN);
game.GamePaoMa.instance.show();
window.parent &&
window.parent.openiframe &&
window.parent.gonggaoUrl &&
window.parent.openiframe(window.parent.gonggaoUrl);
response.data.nickname
? game.AppFacade.getInstance().sendNotification(SceneNotify.OPEN_MINE_GAME)
: game.AppFacade.getInstance().sendNotification(SceneNotify.OPEN_CREATEROLE);
egret.setTimeout(
() => {
game.UIUtils.removeSelf(this);
game.AppFacade.getInstance().sendNotification(SceneNotify.CLOSE_LOGIN);
game.GamePaoMa.instance.show();
window.parent &&
window.parent.openiframe &&
window.parent.gonggaoUrl &&
window.parent.openiframe(window.parent.gonggaoUrl);
},
this,
50
);
});
});
}
@ -434,6 +460,7 @@ var game;
this.facade.registerMediator(new game.SendMesageMediator()),
this.facade.registerMediator(new game.SayMediator()),
this.facade.registerMediator(new game.ExGoldMediator()),
this.facade.registerMediator(new game.GoldExchangeMediator()),
this.facade.registerMediator(new game.PayMediator()),
this.facade.registerMediator(new game.NoticeMediator()),
this.facade.registerMediator(new BoxMediator()),
@ -442,10 +469,14 @@ var game;
this.facade.registerMediator(new FuliMediter()),
this.facade.registerMediator(new FulibaoTipsMediter()),
this.facade.registerMediator(new game.MofajiagongMediter()),
this.facade.registerMediator(new game.MofahechengMidter()),
this.facade.registerMediator(new LevelGiftMediter()),
this.facade.registerMediator(new OnlineGiftMediter()));
}
this.facade.registerMediator(new game.MofahechengMidter()),
this.facade.registerMediator(new LevelGiftMediter()),
this.facade.registerMediator(new OnlineGiftMediter()),
this.facade.registerMediator(new game.WorldPetMediator()),
this.facade.registerMediator(new game.WorldSportsMediator()),
this.facade.registerMediator(new game.WorldAchievementMediator()),
this.facade.registerMediator(new game.WorldParkMediator()));
}
handleNotification(t) {
const e = t.getBody();
switch (t.getName()) {
@ -720,7 +751,7 @@ var game;
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_REGIST));
break;
case SceneNotify.CLOSE_LOGIN:
(this.closeViewComponent(1), this.facade.removeMediator(LoginMediator.NAME));
(this.closeLoginScenes(), this.facade.removeMediator(LoginMediator.NAME));
}
}
showViewComponent() {
@ -728,6 +759,21 @@ var game;
const e = GameLayerManager.gameLayer().sceneLayer;
e.addChild(this.viewComponent);
}
closeLoginScenes() {
this.closeViewComponent(1);
const sceneLayer = GameLayerManager.gameLayer().sceneLayer;
for (let i = sceneLayer.numChildren - 1; i >= 0; i--) {
const child = sceneLayer.getChildAt(i);
if (
child === this.viewComponent ||
child instanceof game.LoginScene ||
(typeof LoginSceneSkin !== "undefined" && child.skinName instanceof LoginSceneSkin)
) {
game.UIUtils.removeSelf(child);
}
}
this.viewComponent = null;
}
initUI() {}
initData() {}
static NAME = "LoginMediator";

View File

@ -434,10 +434,20 @@ var SignPanel = class SignPanel extends game.BasePanel {
onUpdata() {
this.updata();
}
updateSignProgress(signedCount) {
if (this.prossbar && typeof this.prossbar.setPross === "function") {
this.prossbar.setPross(signedCount, 7);
if (this.prossbar.prossLabel) this.prossbar.prossLabel.visible = !1;
return;
}
if (this.barExp) {
((this.barExp.maximum = 7), (this.barExp.minimum = 0), (this.barExp.value = signedCount));
}
}
updata() {
const manager = SignsManager.getInstance(),
signedCount = manager.getVirtuyCount();
((this.barExp.maximum = 7), (this.barExp.minimum = 0), (this.barExp.value = signedCount));
this.updateSignProgress(signedCount);
const rewardBoxCount = manager.getCount();
for (let index = 0; index < this.boxArr.length; index++)
this.boxArr[index].source = rewardBoxCount > index ? "sign_box1_png" : 2 == index ? "sign_box2_png" : "sign_box0_png";

View File

@ -57,9 +57,6 @@ var FuliItem2 = class FuliItem2 extends eui.Component {
super();
this.pageIndex = 0;
this.pageNum = 14;
this.privilegeFields = ["arena", "playground_frequency", "turntable_frequency"];
this.privilegeLabels = ["每天可挑战玩家次数增加", "游乐场免费进入次数", "大转盘免费抽取次数"];
this.privilegeCountByVip = [0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
}
childrenCreated() {
(super.childrenCreated(),
@ -70,7 +67,6 @@ var FuliItem2 = class FuliItem2 extends eui.Component {
this.rightButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onRight, this));
const vipLevel = FuliMannager.getInstance().getVipLevel();
this.pageIndex = Math.max(0, vipLevel - 1);
this.pageNum = Math.max(0, Object.keys(Global.gameProxy.getVipConfig()).length - 1);
this.updata();
}
onPay() {
@ -96,10 +92,10 @@ var FuliItem2 = class FuliItem2 extends eui.Component {
vipData = FuliMannager.getInstance().fuliData || {},
needExp = int(nextVipConfig.recharge_amount),
currentExp = int(vipData.exp),
remainingExp = Math.max(0, needExp - currentExp);
remainingExp = needExp - currentExp;
((this.vipLabel.text = "VIP " + vipLevel),
this.gs && (this.gs.visible = vipLevel > 0),
this.imgNoVip && (this.imgNoVip.visible = 0 == vipLevel),
this.gs && (this.gs.visible = !0),
this.imgNoVip && (this.imgNoVip.visible = !1),
(this.payGemLabel1.text = vipLevel > 0 ? vipLevel + "" : "1"),
(this.buyButton.enabled = vipLevel > 0 && FuliMannager.getInstance().hasVipGiftToGet()),
(this.buyButton.label = this.buyButton.enabled ? "领取" : "已领取"),
@ -113,14 +109,15 @@ var FuliItem2 = class FuliItem2 extends eui.Component {
const config = Global.gameProxy.getVipConfigForID(vipLevel) || {};
((this.vipLabel1.text = (config.id || vipLevel) + ""),
(this.vipLabel2.text = (config.id || vipLevel) + ""),
(this.payGemLabel.text = int(config.recharge_amount) + ""),
(this.payGemLabel.text = config.recharge_amount || 0),
this.gt.removeChildren());
const privilegeCount = this.privilegeCountByVip[Math.max(0, vipLevel - 1)] || 0;
const manager = FuliMannager.getInstance();
const privilegeCount = manager.indexArr[Math.max(0, vipLevel - 1)] || 0;
for (let index = 0; index < privilegeCount; index++) {
const item = new FuliTextFieldItem(),
field = this.privilegeFields[index],
field = manager.strkeyArr[index],
value = null == config[field] ? 0 : config[field];
(this.gt.addChild(item), (item.y = 21 * index), (item.strLabel.text = this.privilegeLabels[index] + " " + value));
(this.gt.addChild(item), (item.y = item.height * index), (item.strLabel.text = manager.strArr[index] + " " + value));
}
}
};
@ -196,6 +193,11 @@ var FuliMannager = class FuliMannager extends egret.EventDispatcher {
constructor() {
super();
this.zyData = [];
this.strkeyArr = ["arena", "playground_frequency", "turntable_frequency"];
this.strArr = ["每天可挑战玩家次数增加", "游乐场免费进入次数", "大转盘免费抽取次数"];
this.indexArr = [0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
this.zhoukaArr = [150, 150, 7, 15];
this.yuekaArr = [300, 150, 30, 30];
this.fuliData = {
level: 0,
exp: 0,
@ -223,13 +225,28 @@ var FuliMannager = class FuliMannager extends egret.EventDispatcher {
for (let index = 0; index < this.zyData.length; index++) if (this.zyData[index].item_id == itemId) return this.zyData[index];
return null;
}
getIndexForTime(time) {
const date = new Date(1e3 * int(time));
let dayIndex = date.getDate();
for (let month = 0; month < date.getMonth(); month++) dayIndex += this.getMonthDays(date.getFullYear(), month);
return dayIndex;
}
isLeapYear(year) {
return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}
getMonthDays(year, month) {
return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] || (this.isLeapYear(year) ? 29 : 28);
}
getCardRemainingCount(itemId) {
const card = this.getisZY(itemId);
return card ? Math.max(0, int(card.count)) : 0;
if (!card) return 0;
if (card.last_get_gift_time && card.expire_time)
return Math.max(0, this.getIndexForTime(card.expire_time) - this.getIndexForTime(card.last_get_gift_time));
return Math.max(0, int(card.count));
}
canGetCardGift(itemId) {
const card = this.getisZY(itemId);
return !!card && int(card.count) > 0 && !isSameWelfareDay(int(card.last_get_gift_time), DateTimer.instance.now);
return !!card && this.getCardRemainingCount(itemId) > 0 && !isSameWelfareDay(int(card.last_get_gift_time), DateTimer.instance.now);
}
sendNetGetAward() {
Global.netProxy.sendRequest(GameConfig.SERVER_PATH + "comm/get-vip-gift", {}, this.onSendNetVipGift.bind(this));
@ -414,6 +431,7 @@ var FuliPanel = class FuliPanel extends game.BasePanel {
(target.getButton.visible = !!card && remainingCount > 0),
(target.getButton.enabled = canGet),
target.getButton.label && (target.getButton.label = canGet ? "领取" : "已领取"));
itemId == 601000 && (target.gemLabel0.text = FuliMannager.getInstance().zhoukaArr[3] + "");
}
};
__reflect(FuliPanel.prototype, "FuliPanel");

View File

@ -0,0 +1,800 @@
var game;
!(function (game) {
const toInt = function (value, fallback = 0) {
const parsed = parseInt(value, 10);
return Number.isFinite(parsed) ? parsed : fallback;
};
const WorldFeatureUtils = class WorldFeatureUtils {
static request(route, data, callback) {
Global.netProxy.sendRequest(GameConfig.SERVER_PATH + route, data || {}, callback);
}
static table(tableName) {
return (Global.gameProxy && Global.gameProxy.getTabelConfigByType(tableName)) || {};
}
static config(tableName, id) {
const table = WorldFeatureUtils.table(tableName);
return table && table[id] ? table[id] : {};
}
static itemName(itemId) {
const config = Global.gameProxy.getItemConfig(itemId) || {};
return config.name || "道具" + itemId;
}
static rewardText(rewardString) {
if (!rewardString) return "无";
return String(rewardString)
.split(",")
.map(function (itemString) {
const parts = String(itemString).split(":"),
itemId = parts[0],
count = parts.length >= 3 ? parts[2] : parts[1];
return itemId ? WorldFeatureUtils.itemName(itemId) + "x" + (count || 0) : "";
})
.filter(function (text) {
return !!text;
})
.join("、");
}
static addRewardToPlayer(data) {
if (!data) return "";
if (Array.isArray(data)) {
const rewardString = data
.map(function (item) {
return item && item.item_id ? item.item_id + ":" + (item.num || item.count || 0) : "";
})
.filter(function (item) {
return !!item;
})
.join(",");
rewardString && Global.playerProxy.addItem1(rewardString);
return rewardString;
}
if (data.item_id) {
const rewardString = data.item_id + ":" + (data.num || data.count || 0);
Global.playerProxy.addItem1(rewardString);
return rewardString;
}
return "";
}
static serverMessage(response, fallback) {
return (response && GameConfig.ServerCode && GameConfig.ServerCode[response.status]) || fallback || "操作失败";
}
static makeButton(label, width = 108, height = 48) {
const button = new eui.Button();
button.label = label;
button.width = width;
button.height = height;
button.skinName =
window.common && window.common.MidButtonSkin ? window.common.MidButtonSkin : "common.MidButtonSkin";
return button;
}
static makeLabel(text, size, color, x, y, width, height) {
const label = new eui.Label();
label.text = text || "";
label.size = size || 22;
label.textColor = color || 0xfffbf2;
label.x = x || 0;
label.y = y || 0;
label.width = width || 100;
label.height = height || 28;
label.fontFamily = "huakanghaibao";
label.stroke = 1;
label.strokeColor = 0x724f2e;
label.verticalAlign = egret.VerticalAlign.MIDDLE;
return label;
}
};
((game.WorldFeatureUtils = WorldFeatureUtils), __reflect(WorldFeatureUtils.prototype, "game.WorldFeatureUtils"));
const WorldFeatureItemRenderer = class WorldFeatureItemRenderer extends game.BaseItemRenderer {
constructor() {
super();
this.width = 520;
this.height = 126;
}
createChildren() {
super.createChildren();
this.backgroundShape = new egret.Shape();
this.addChild(this.backgroundShape);
this.titleLabel = WorldFeatureUtils.makeLabel("", 23, 0xfffbf2, 18, 10, 360, 30);
this.titleLabel.bold = !0;
this.addChild(this.titleLabel);
this.detailLabel = WorldFeatureUtils.makeLabel("", 18, 0x5b3616, 18, 42, 370, 68);
this.detailLabel.stroke = 0;
this.detailLabel.lineSpacing = 5;
this.detailLabel.verticalAlign = egret.VerticalAlign.TOP;
this.addChild(this.detailLabel);
this.statusLabel = WorldFeatureUtils.makeLabel("", 18, 0xd03d1c, 390, 12, 118, 24);
this.statusLabel.stroke = 0;
this.statusLabel.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(this.statusLabel);
this.actionButton = WorldFeatureUtils.makeButton("领取", 108, 48);
this.actionButton.x = 394;
this.actionButton.y = 52;
this.actionButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onActionTap, this);
this.addChild(this.actionButton);
this.drawBackground();
}
onRemoved() {
this.actionButton &&
this.actionButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onActionTap, this);
super.onRemoved();
}
drawBackground() {
const graphics = this.backgroundShape.graphics;
graphics.clear();
graphics.lineStyle(2, 0x9c6a2f, 1);
graphics.beginFill(0xffefc9, 0.92);
graphics.drawRoundRect(0, 0, 520, 116, 12, 12);
graphics.endFill();
}
dataChanged() {
const row = this.data || {};
this.drawBackground();
this.titleLabel.text = row.title || "";
this.detailLabel.text = (row.lines || []).join("\n");
this.statusLabel.text = row.status || "";
this.actionButton.visible = !!row.actionLabel;
this.actionButton.label = row.actionLabel || "";
this.actionButton.enabled = row.actionEnabled !== !1;
}
onActionTap(event) {
event.stopPropagation();
const row = this.data || {};
row.actionEnabled !== !1 && row.onAction && row.onAction(row);
}
};
__reflect(WorldFeatureItemRenderer.prototype, "WorldFeatureItemRenderer");
const WorldFeaturePanel = class WorldFeaturePanel extends game.BasePanel {
constructor(title, closeNotify) {
super();
this.featureTitle = title;
this.closeNotify = closeNotify;
this.isFullScreen = !0;
this.isVisibleAnimate = !0;
this.width = Const.WIN_W;
this.height = Const.WIN_H;
}
createChildren() {
super.createChildren();
this.buildFrame();
}
buildFrame() {
this.modalBlocker = new egret.Shape();
this.modalBlocker.graphics.beginFill(0x000000, 0.01);
this.modalBlocker.graphics.drawRect(0, 0, Const.WIN_W, Const.WIN_H);
this.modalBlocker.graphics.endFill();
this.modalBlocker.touchEnabled = !0;
this.addChild(this.modalBlocker);
const panelBg = new eui.Image("common_json.c_panel2_png");
panelBg.x = 20;
panelBg.y = 126;
panelBg.width = 600;
panelBg.height = 790;
panelBg.scale9Grid = new egret.Rectangle(118, 58, 10, 10);
this.addChild(panelBg);
const titleBg = new eui.Image("common2_json.common2_diban_png");
titleBg.x = 168;
titleBg.y = 120;
titleBg.width = 304;
titleBg.height = 70;
this.addChild(titleBg);
const title = WorldFeatureUtils.makeLabel(this.featureTitle, 34, 0xfffbf2, 170, 134, 300, 48);
title.textAlign = egret.HorizontalAlign.CENTER;
title.bold = !0;
this.addChild(title);
this.closeButton = new eui.Button();
this.closeButton.label = "";
this.closeButton.width = 54;
this.closeButton.height = 54;
this.closeButton.x = 554;
this.closeButton.y = 130;
this.closeButton.skinName =
window.common && window.common.ExitButtonSkin ? window.common.ExitButtonSkin : "common.ExitButtonSkin";
this.closeButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onCloseTap, this);
this.addChild(this.closeButton);
this.statusLabel = WorldFeatureUtils.makeLabel("", 20, 0x5b3616, 60, 190, 520, 34);
this.statusLabel.stroke = 0;
this.statusLabel.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(this.statusLabel);
this.contentGroup = new eui.Group();
this.contentGroup.x = 60;
this.contentGroup.y = 232;
this.contentGroup.width = 520;
this.contentGroup.height = 642;
this.addChild(this.contentGroup);
game.UIUtils.addButtonScaleEffects(this);
}
onRemoved() {
this.closeButton && this.closeButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onCloseTap, this);
super.onRemoved();
}
onCloseTap(event) {
event.stopPropagation();
this.closeNotify && game.AppFacade.getInstance().sendNotification(this.closeNotify);
}
setStatus(text) {
this.statusLabel && (this.statusLabel.text = text || "");
}
showRows(rows) {
this.contentGroup.removeChildren();
this.scroller = new eui.Scroller();
this.scroller.width = 520;
this.scroller.height = 642;
this.list = new eui.List();
this.list.width = 520;
this.list.height = 642;
this.list.useVirtualLayout = !1;
this.list.itemRenderer = WorldFeatureItemRenderer;
this.list.dataProvider = new eui.ArrayCollection(rows || []);
this.scroller.viewport = this.list;
this.contentGroup.addChild(this.scroller);
}
};
((game.WorldFeaturePanel = WorldFeaturePanel), __reflect(WorldFeaturePanel.prototype, "game.WorldFeaturePanel"));
const WorldPetPanel = class WorldPetPanel extends WorldFeaturePanel {
constructor() {
super("战宠", PanelNotify.CLOSE_BATTLEPET);
}
createChildren() {
super.createChildren();
this.loadPets();
}
loadPets() {
this.setStatus("正在读取战宠列表...");
WorldFeatureUtils.request("pet/get-list", {}, this.onPetsLoaded.bind(this));
}
onPetsLoaded(response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "战宠列表读取失败"));
this.showRows([]);
return;
}
const pets = (response.data && response.data.list) || [];
if (!pets.length) {
this.setStatus("当前账号还没有战宠");
this.showRows([
{
title: "暂无战宠",
lines: ["可在商店购买宠物蛋,孵化后会出现在这里。", "战宠可设置为出战宠物,用于竞技场挑战。"],
status: "",
actionLabel: "去商店",
actionEnabled: !0,
onAction: function () {
game.AppFacade.getInstance().sendNotification(PanelNotify.CLOSE_BATTLEPET);
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_SHOP);
}
}
]);
return;
}
this.setStatus("共 " + pets.length + " 只战宠");
this.showRows(
pets.map(
function (pet) {
const config = WorldFeatureUtils.config("pet", pet.pet_config_id),
name = config.name || "战宠" + pet.pet_config_id,
inWar = toInt(pet.is_enter_war) === 1,
feed = toInt(pet.feed),
hunger = toInt(config.hunger),
status = inWar ? "出战中" : "未出战";
return {
title: name + " Lv." + toInt(pet.level, 1),
lines: [
"战力 " + toInt(pet.fighting_capacity) + " 饥饿度 " + feed + "/" + hunger,
"生命 " + toInt(pet.blood) + " 攻击 " + toInt(pet.attack) + " 防御 " + toInt(pet.anti)
],
status: status,
actionLabel: inWar ? "" : "出战",
actionEnabled: !inWar,
petId: pet.id,
onAction: this.setEnterWar.bind(this)
};
}.bind(this)
)
);
}
setEnterWar(row) {
this.setStatus("正在设置出战宠物...");
WorldFeatureUtils.request("pet/set-enter-war", { pet_id: row.petId }, this.onEnterWar.bind(this));
}
onEnterWar(response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "设置出战失败"));
return;
}
TipsUtils.showTipsDownToUp("已设置出战宠物");
this.loadPets();
}
};
((game.WorldPetPanel = WorldPetPanel), __reflect(WorldPetPanel.prototype, "game.WorldPetPanel"));
const WorldAchievementPanel = class WorldAchievementPanel extends WorldFeaturePanel {
constructor() {
super("成就", PanelNotify.CLOSE_CHENGJIU);
}
createChildren() {
super.createChildren();
this.loadAchievements();
}
loadAchievements() {
this.setStatus("正在读取成就...");
WorldFeatureUtils.request("ach/get-list", {}, this.onAchievementsLoaded.bind(this));
}
onAchievementsLoaded(response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "成就读取失败"));
this.showRows([]);
return;
}
const configMap = WorldFeatureUtils.table("achievement_list"),
serverList = (response.data && response.data.list) || [],
serverMap = {};
serverList.forEach(function (item) {
serverMap[item.config_id] = item;
});
const rows = Object.keys(configMap)
.map(
function (configId) {
const config = configMap[configId],
record = serverMap[configId] || {},
level = toInt(record.level),
completeList = String(config.complete || "1").split(":"),
rewardList = String(config.gold_id || "0").split(":"),
expList = String(config.experience || "0").split(":"),
threshold = toInt(completeList[Math.min(level, completeList.length - 1)], 1),
count = Math.min(toInt(record.count), threshold),
rewardCount = toInt(rewardList[Math.min(level, rewardList.length - 1)]),
exp = toInt(expList[Math.min(level, expList.length - 1)]),
canClaim = !!record.id && toInt(record.receive) !== 1 && count >= threshold,
completed = toInt(record.receive) === 1 && level >= completeList.length - 1,
progress = threshold > 0 ? Math.floor((count / threshold) * 100) : 0;
return {
title: config.name || record.name || "成就" + configId,
lines: [
config.content || record.content || "",
"进度 " + count + "/" + threshold + " (" + progress + "%) 奖励 " + WorldFeatureUtils.itemName(config.item_id) + "x" + rewardCount + " 经验x" + exp
],
status: completed ? "已完成" : canClaim ? "可领取" : "进行中",
actionLabel: canClaim ? "领取" : "",
actionEnabled: canClaim,
recordId: record.id,
rewardString: config.item_id + ":" + rewardCount,
exp: exp,
onAction: this.claimAchievement.bind(this),
sortKey: canClaim ? 0 : completed ? 2 : 1,
configId: toInt(configId)
};
}.bind(this)
)
.sort(function (left, right) {
return left.sortKey - right.sortKey || left.configId - right.configId;
});
this.setStatus("系统成就 " + rows.length + " 项");
this.showRows(rows);
}
claimAchievement(row) {
this.setStatus("正在领取成就奖励...");
WorldFeatureUtils.request("ach/get-gift", { id: row.recordId }, this.onAchievementClaimed.bind(this, row));
}
onAchievementClaimed(row, response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "领取失败"));
return;
}
row.rewardString && Global.playerProxy.addItem1(row.rewardString);
row.exp > 0 && Global.playerProxy.addExp(row.exp);
game.EventManager.instance.dispatch(SysNotify.TOPLAYER_INFO_UPDATE);
TipsUtils.showTipsDownToUp("成就奖励已领取");
this.loadAchievements();
}
};
((game.WorldAchievementPanel = WorldAchievementPanel),
__reflect(WorldAchievementPanel.prototype, "game.WorldAchievementPanel"));
const WorldSportsPanel = class WorldSportsPanel extends WorldFeaturePanel {
constructor() {
super("竞技", PanelNotify.CLOSE_SPORTS);
this.arenaInfo = null;
this.arenaError = "";
this.rankList = [];
this.challengeList = [];
this.weekGiftList = [];
}
createChildren() {
super.createChildren();
this.loadSports();
}
loadSports() {
this.setStatus("正在读取竞技场...");
WorldFeatureUtils.request("arena/get-arena", {}, this.onArenaLoaded.bind(this));
}
onArenaLoaded(response) {
if (0 === response.status) {
this.arenaInfo = response.data || {};
this.arenaError = "";
} else {
this.arenaInfo = null;
this.arenaError = WorldFeatureUtils.serverMessage(response, "请先设置出战宠物");
}
WorldFeatureUtils.request("arena/get-rank-list", {}, this.onRankLoaded.bind(this));
}
onRankLoaded(response) {
this.rankList = 0 === response.status && response.data ? response.data.list || [] : [];
WorldFeatureUtils.request("arena/get-challenge-list", {}, this.onChallengeLoaded.bind(this));
}
onChallengeLoaded(response) {
this.challengeList = 0 === response.status && response.data ? response.data.list || [] : [];
WorldFeatureUtils.request("arena/week-gift-list", {}, this.onWeekGiftLoaded.bind(this));
}
onWeekGiftLoaded(response) {
this.weekGiftList = 0 === response.status && response.data ? response.data.list || [] : [];
this.renderSports();
}
renderSports() {
const rows = [],
arena = this.arenaInfo,
canChallenge = !!arena && toInt(arena.remaining_challenges_count) > 0;
if (arena) {
rows.push({
title: "我的竞技",
lines: [
"排名 " + (arena.index || "-") + " 战力 " + toInt(arena.fighting_capacity) + " 积分 " + toInt(arena.score),
"剩余挑战 " + toInt(arena.remaining_challenges_count) + " 胜 " + toInt(arena.win_count) + " / 负 " + toInt(arena.fail_count)
],
status: canChallenge ? "可挑战" : "次数不足"
});
} else {
rows.push({
title: "我的竞技",
lines: [this.arenaError || "请先设置出战宠物", "战宠出战后才能进行竞技场挑战。"],
status: "未开启",
actionLabel: "战宠",
actionEnabled: !0,
onAction: function () {
game.AppFacade.getInstance().sendNotification(PanelNotify.CLOSE_SPORTS);
game.AppFacade.getInstance().sendNotification(PanelNotify.OPEN_BATTLEPET);
}
});
}
rows.push({
title: "挑战对手",
lines: [this.challengeList.length ? "可挑战对手:" + this.challengeList.length + " 位" : "暂无可挑战对手", "点击挑战会按双方战力直接结算胜负。"],
status: ""
});
this.challengeList.slice(0, 5).forEach(
function (item) {
rows.push({
title: "第 " + item.index + " 名 " + (item.nickname || "农场主"),
lines: ["战力 " + toInt(item.fighting_capacity) + " 积分 " + toInt(item.score), "胜 " + toInt(item.win_count) + " / 负 " + toInt(item.fail_count)],
status: canChallenge ? "可挑战" : "不可挑战",
actionLabel: "挑战",
actionEnabled: canChallenge,
targetUserId: item.user_id,
targetPower: toInt(item.fighting_capacity),
onAction: this.challengeOpponent.bind(this)
});
}.bind(this)
);
rows.push({
title: "排行榜",
lines: [this.rankList.length ? "当前前 " + this.rankList.length + " 名:" : "暂无排名数据", this.rankList.slice(0, 3).map(function (item) {
return item.index + "." + item.nickname + "(" + item.fighting_capacity + ")";
}).join(" ")],
status: ""
});
rows.push({
title: "本周奖励",
lines: [
this.weekGiftList
.slice(0, 3)
.map(function (item) {
return item.ranking_min_id + "-" + item.ranking_mzx_id + "名:" + WorldFeatureUtils.rewardText(item.fixed_id + "," + item.fixed_id2);
})
.join("\n")
],
status: ""
});
this.setStatus(arena ? "竞技场数据已加载" : this.arenaError || "竞技场未开启");
this.showRows(rows);
}
challengeOpponent(row) {
const myPower = toInt(this.arenaInfo && this.arenaInfo.fighting_capacity),
result = myPower >= toInt(row.targetPower) ? 0 : 1;
this.setStatus("正在结算挑战...");
WorldFeatureUtils.request(
"arena/challenge",
{
be_user_id: row.targetUserId,
type: result
},
this.onChallengeFinished.bind(this, result)
);
}
onChallengeFinished(result, response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "挑战失败"));
return;
}
TipsUtils.showTipsDownToUp(0 === result ? "挑战成功" : "挑战失败");
this.loadSports();
}
};
((game.WorldSportsPanel = WorldSportsPanel), __reflect(WorldSportsPanel.prototype, "game.WorldSportsPanel"));
const WorldParkPanel = class WorldParkPanel extends WorldFeaturePanel {
constructor() {
super("游乐园", PanelNotify.CLOSE_ASUMENT_PARK);
this.uuid = "";
this.score = 0;
this.timeLeft = 0;
this.gameRunning = !1;
}
createChildren() {
super.createChildren();
this.loadPark();
}
onRemoved() {
this.clearGameTimer();
super.onRemoved();
}
loadPark() {
this.setStatus("正在读取游乐园次数...");
WorldFeatureUtils.request("comm/get-pleasure-ground", {}, this.onParkLoaded.bind(this));
}
onParkLoaded(response) {
const usedCount = 0 === response.status && response.data ? toInt(response.data.count) : 0,
vipConfig = Global.gameProxy.getVipConfigForID(toInt(Global.playerProxy.playerData.vip, 0)) || {},
freeCount = toInt(vipConfig.playground_frequency),
rows = [
{
title: "今日次数",
lines: ["今日已进入 " + usedCount + " 次 VIP免费次数 " + freeCount, "超过免费次数后,后端会按旧规则扣除金币。"],
status: usedCount <= freeCount ? "可进入" : "需金币"
},
{
title: "泡泡乐园",
lines: ["15秒内点击按钮获得积分。", "积分达到奖励档位后自动结算奖励。"],
status: "",
actionLabel: "开始",
actionEnabled: !0,
gameType: 0,
onAction: this.startGame.bind(this)
},
{
title: "糖果乐园",
lines: ["15秒内点击按钮获得积分。", "每次点击得分略高。"],
status: "",
actionLabel: "开始",
actionEnabled: !0,
gameType: 1,
onAction: this.startGame.bind(this)
},
{
title: "娃娃乐园",
lines: ["15秒内点击按钮获得积分。", "每次点击得分最高。"],
status: "",
actionLabel: "开始",
actionEnabled: !0,
gameType: 2,
onAction: this.startGame.bind(this)
}
],
playground = WorldFeatureUtils.table("playground");
Object.keys(playground)
.sort(function (left, right) {
return toInt(left) - toInt(right);
})
.forEach(function (id) {
const config = playground[id];
rows.push({
title: "奖励档位 " + id,
lines: ["需要积分 " + toInt(config.integral), "奖励池:" + WorldFeatureUtils.rewardText(config.chest)],
status: ""
});
});
this.setStatus("游乐园已就绪");
this.showRows(rows);
}
startGame(row) {
if (this.gameRunning) return;
this.setStatus("正在进入游乐园...");
WorldFeatureUtils.request("comm/enter-pleasure-ground", {}, this.onGameEntered.bind(this, row.gameType));
}
onGameEntered(gameType, response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "进入游乐园失败"));
return;
}
this.uuid = response.data && response.data.uuid;
this.showGame(gameType);
}
showGame(gameType) {
this.contentGroup.removeChildren();
this.gameRunning = !0;
this.score = 0;
this.timeLeft = 15;
this.gameType = gameType;
const names = ["泡泡乐园", "糖果乐园", "娃娃乐园"],
perTap = [100, 120, 150][gameType] || 100;
this.perTap = perTap;
this.gameTitle = WorldFeatureUtils.makeLabel(names[gameType] || "游乐园", 30, 0xfffbf2, 0, 20, 520, 44);
this.gameTitle.textAlign = egret.HorizontalAlign.CENTER;
this.contentGroup.addChild(this.gameTitle);
this.scoreLabel = WorldFeatureUtils.makeLabel("积分0", 28, 0x5b3616, 0, 100, 520, 44);
this.scoreLabel.stroke = 0;
this.scoreLabel.textAlign = egret.HorizontalAlign.CENTER;
this.contentGroup.addChild(this.scoreLabel);
this.timeLabel = WorldFeatureUtils.makeLabel("剩余15秒", 24, 0xd03d1c, 0, 150, 520, 40);
this.timeLabel.stroke = 0;
this.timeLabel.textAlign = egret.HorizontalAlign.CENTER;
this.contentGroup.addChild(this.timeLabel);
this.hitButton = WorldFeatureUtils.makeButton("点击得分 +" + perTap, 240, 70);
this.hitButton.x = 140;
this.hitButton.y = 235;
this.hitButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onHitTap, this);
this.contentGroup.addChild(this.hitButton);
this.finishButton = WorldFeatureUtils.makeButton("结束结算", 160, 56);
this.finishButton.x = 180;
this.finishButton.y = 340;
this.finishButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.finishGame, this);
this.contentGroup.addChild(this.finishButton);
this.setStatus("游乐园进行中");
this.gameTimer = new egret.Timer(1000, 15);
this.gameTimer.addEventListener(egret.TimerEvent.TIMER, this.onGameTimer, this);
this.gameTimer.addEventListener(egret.TimerEvent.TIMER_COMPLETE, this.finishGame, this);
this.gameTimer.start();
}
onHitTap(event) {
event.stopPropagation();
if (!this.gameRunning) return;
this.score += this.perTap;
this.scoreLabel.text = "积分:" + this.score;
}
onGameTimer() {
this.timeLeft--;
this.timeLabel.text = "剩余:" + Math.max(0, this.timeLeft) + "秒";
}
clearGameTimer() {
if (this.gameTimer) {
this.gameTimer.stop();
this.gameTimer.removeEventListener(egret.TimerEvent.TIMER, this.onGameTimer, this);
this.gameTimer.removeEventListener(egret.TimerEvent.TIMER_COMPLETE, this.finishGame, this);
this.gameTimer = null;
}
this.hitButton && this.hitButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onHitTap, this);
this.finishButton && this.finishButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.finishGame, this);
}
finishGame(event) {
event && event.stopPropagation && event.stopPropagation();
if (!this.gameRunning) return;
this.gameRunning = !1;
this.clearGameTimer();
this.setStatus("正在结算游乐园奖励...");
WorldFeatureUtils.request(
"comm/pleasure-ground",
{
uuid: this.uuid,
score: this.score
},
this.onGameFinished.bind(this)
);
}
onGameFinished(response) {
if (0 !== response.status) {
this.setStatus(WorldFeatureUtils.serverMessage(response, "结算失败"));
return;
}
const rewardString = WorldFeatureUtils.addRewardToPlayer(response.data);
game.EventManager.instance.dispatch(SysNotify.TOPLAYER_INFO_UPDATE);
this.setStatus(rewardString ? "结算完成:" + WorldFeatureUtils.rewardText(rewardString) : "结算完成:分数不足");
this.loadPark();
}
};
((game.WorldParkPanel = WorldParkPanel), __reflect(WorldParkPanel.prototype, "game.WorldParkPanel"));
const WorldPetMediator = class WorldPetMediator extends BaseMediator {
constructor() {
super("WorldPetMediator");
}
listNotificationInterests() {
return [PanelNotify.OPEN_BATTLEPET, PanelNotify.CLOSE_BATTLEPET];
}
showViewComponent() {
((this.viewComponent = new game.WorldPetPanel()), (this.viewComponent.mediator = this), this.showUI(this.viewComponent, !0, 0, 0, 7));
}
handleNotification(notification) {
switch (notification.getName()) {
case PanelNotify.OPEN_BATTLEPET:
this.showViewComponent();
break;
case PanelNotify.CLOSE_BATTLEPET:
this.closeViewComponent(1);
}
}
static NAME = "WorldPetMediator";
};
((game.WorldPetMediator = WorldPetMediator), __reflect(WorldPetMediator.prototype, "game.WorldPetMediator"));
const WorldAchievementMediator = class WorldAchievementMediator extends BaseMediator {
constructor() {
super("WorldAchievementMediator");
}
listNotificationInterests() {
return [PanelNotify.OPEN_CHENGJIU, PanelNotify.CLOSE_CHENGJIU];
}
showViewComponent() {
((this.viewComponent = new game.WorldAchievementPanel()),
(this.viewComponent.mediator = this),
this.showUI(this.viewComponent, !0, 0, 0, 7));
}
handleNotification(notification) {
switch (notification.getName()) {
case PanelNotify.OPEN_CHENGJIU:
this.showViewComponent();
break;
case PanelNotify.CLOSE_CHENGJIU:
this.closeViewComponent(1);
}
}
static NAME = "WorldAchievementMediator";
};
((game.WorldAchievementMediator = WorldAchievementMediator),
__reflect(WorldAchievementMediator.prototype, "game.WorldAchievementMediator"));
const WorldSportsMediator = class WorldSportsMediator extends BaseMediator {
constructor() {
super("WorldSportsMediator");
}
listNotificationInterests() {
return [PanelNotify.OPEN_SPORTS, PanelNotify.CLOSE_SPORTS];
}
showViewComponent() {
((this.viewComponent = new game.WorldSportsPanel()),
(this.viewComponent.mediator = this),
this.showUI(this.viewComponent, !0, 0, 0, 7));
}
handleNotification(notification) {
switch (notification.getName()) {
case PanelNotify.OPEN_SPORTS:
this.showViewComponent();
break;
case PanelNotify.CLOSE_SPORTS:
this.closeViewComponent(1);
}
}
static NAME = "WorldSportsMediator";
};
((game.WorldSportsMediator = WorldSportsMediator), __reflect(WorldSportsMediator.prototype, "game.WorldSportsMediator"));
const WorldParkMediator = class WorldParkMediator extends BaseMediator {
constructor() {
super("WorldParkMediator");
}
listNotificationInterests() {
return [PanelNotify.OPEN_ASUMENT_PARK, PanelNotify.CLOSE_ASUMENT_PARK];
}
showViewComponent() {
((this.viewComponent = new game.WorldParkPanel()), (this.viewComponent.mediator = this), this.showUI(this.viewComponent, !0, 0, 0, 7));
}
handleNotification(notification) {
switch (notification.getName()) {
case PanelNotify.OPEN_ASUMENT_PARK:
this.showViewComponent();
break;
case PanelNotify.CLOSE_ASUMENT_PARK:
this.closeViewComponent(1);
}
}
static NAME = "WorldParkMediator";
};
((game.WorldParkMediator = WorldParkMediator), __reflect(WorldParkMediator.prototype, "game.WorldParkMediator"));
})(game || (game = {}));

View File

@ -0,0 +1,443 @@
var game;
!(function (game) {
const toExchangeInt = function (value, fallback = 0) {
const parsed = parseInt(value, 10);
return Number.isFinite(parsed) ? parsed : fallback;
};
const GoldExchangeUtils = class GoldExchangeUtils {
static request(route, data, callback) {
Global.netProxy.sendRequest(GameConfig.SERVER_PATH + route, data || {}, callback);
}
static commonRate(id, fallback = 1) {
const config = Global.gameProxy.getCommonConfigById(id) || {};
return Math.max(1, toExchangeInt(config.min, fallback));
}
static serverMessage(response, fallback) {
if (!response) return fallback || "操作失败";
if ("string" === typeof response.status) return response.status;
return (GameConfig.ServerCode && GameConfig.ServerCode[response.status]) || response.info || fallback || "操作失败";
}
static mergePlayerData(data) {
if (!data || !Global.playerProxy || !Global.playerProxy.playerData) return;
Object.keys(data).forEach(function (key) {
Global.playerProxy.playerData[key] = data[key];
});
game.EventManager.instance.dispatch(SysNotify.TOPLAYER_INFO_UPDATE);
}
static makeLabel(text, size, color, x, y, width, height) {
const label = new eui.Label();
label.text = text || "";
label.size = size || 22;
label.textColor = color || 0xfffbf2;
label.x = x || 0;
label.y = y || 0;
label.width = width || 100;
label.height = height || 30;
label.fontFamily = "huakanghaibao";
label.stroke = 1;
label.strokeColor = 0x724f2e;
label.verticalAlign = egret.VerticalAlign.MIDDLE;
return label;
}
static makeButton(label, width, height) {
const button = new eui.Button();
button.label = label || "";
button.width = width || 120;
button.height = height || 52;
button.skinName =
window.common && window.common.MidButtonSkin ? window.common.MidButtonSkin : "common.MidButtonSkin";
return button;
}
static formatDate(seconds) {
const time = toExchangeInt(seconds);
if (!time) return "";
return game.Utils && game.Utils.formatDate ? game.Utils.formatDate(new Date(1000 * time)) : new Date(1000 * time).toLocaleString();
}
};
((game.GoldExchangeUtils = GoldExchangeUtils),
__reflect(GoldExchangeUtils.prototype, "game.GoldExchangeUtils"));
const GoldExchangeHistoryItem = class GoldExchangeHistoryItem extends eui.ItemRenderer {
constructor() {
super();
this.width = 500;
this.height = 62;
}
createChildren() {
super.createChildren();
this.line = new egret.Shape();
this.addChild(this.line);
this.timeLabel = GoldExchangeUtils.makeLabel("", 18, 0xf4991d, 12, 8, 190, 24);
this.timeLabel.stroke = 0;
this.addChild(this.timeLabel);
this.descLabel = GoldExchangeUtils.makeLabel("", 18, 0x7d1c1c, 12, 34, 370, 24);
this.descLabel.stroke = 0;
this.addChild(this.descLabel);
this.numLabel = GoldExchangeUtils.makeLabel("", 18, 0x2f9c11, 390, 34, 92, 24);
this.numLabel.stroke = 0;
this.numLabel.textAlign = egret.HorizontalAlign.RIGHT;
this.addChild(this.numLabel);
}
dataChanged() {
const row = this.data || {};
this.timeLabel.text = GoldExchangeUtils.formatDate(row.created_at);
this.descLabel.text = row.description || "";
this.numLabel.text = row.numText || "";
const graphics = this.line.graphics;
graphics.clear();
graphics.lineStyle(1, 0xc78944, 0.65);
graphics.moveTo(8, 60);
graphics.lineTo(492, 60);
}
};
__reflect(GoldExchangeHistoryItem.prototype, "game.GoldExchangeHistoryItem");
const GoldExchangePanel = class GoldExchangePanel extends game.BasePanel {
constructor() {
super();
this.mode = "gemToGold";
this.gemAmount = 1;
this.goldAmount = 10;
this.isFullScreen = !0;
this.isVisibleAnimate = !0;
this.width = Const.WIN_W;
this.height = Const.WIN_H;
}
createChildren() {
super.createChildren();
this.goldToGemRate = GoldExchangeUtils.commonRate(17, 10);
this.gemToGoldRate = GoldExchangeUtils.commonRate(24, 10);
this.goldAmount = this.goldToGemRate;
this.buildView();
this.refreshMode();
this.loadHistory();
}
buildView() {
this.modalBlocker = new egret.Shape();
this.modalBlocker.graphics.beginFill(0x000000, 0.01);
this.modalBlocker.graphics.drawRect(0, 0, Const.WIN_W, Const.WIN_H);
this.modalBlocker.graphics.endFill();
this.modalBlocker.touchEnabled = !0;
this.addChild(this.modalBlocker);
const panelBg = new eui.Image("common_json.c_panel_png");
panelBg.x = 20;
panelBg.y = 76;
panelBg.width = 600;
panelBg.height = 820;
panelBg.scale9Grid = new egret.Rectangle(122, 174, 21, 10);
this.addChild(panelBg);
const titleBg = new eui.Image("common2_json.common2_diban_png");
titleBg.x = 168;
titleBg.y = 70;
titleBg.width = 304;
titleBg.height = 70;
this.addChild(titleBg);
const title = GoldExchangeUtils.makeLabel("兑换金币", 34, 0xfffbf2, 170, 84, 300, 48);
title.bold = !0;
title.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(title);
this.statusLabel = GoldExchangeUtils.makeLabel("", 20, 0x5b3616, 60, 142, 520, 34);
this.statusLabel.stroke = 0;
this.statusLabel.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(this.statusLabel);
this.goldLabel = GoldExchangeUtils.makeLabel("", 22, 0x5b3616, 92, 184, 210, 30);
this.goldLabel.stroke = 0;
this.addChild(this.goldLabel);
this.gemLabel = GoldExchangeUtils.makeLabel("", 22, 0x5b3616, 332, 184, 210, 30);
this.gemLabel.stroke = 0;
this.addChild(this.gemLabel);
this.gemToGoldButton = GoldExchangeUtils.makeButton("钻石兑金币", 220, 54);
this.gemToGoldButton.x = 80;
this.gemToGoldButton.y = 228;
this.gemToGoldButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onGemToGoldTap, this);
this.addChild(this.gemToGoldButton);
this.goldToGemButton = GoldExchangeUtils.makeButton("金币兑钻石", 220, 54);
this.goldToGemButton.x = 340;
this.goldToGemButton.y = 228;
this.goldToGemButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onGoldToGemTap, this);
this.addChild(this.goldToGemButton);
this.modeTitleLabel = GoldExchangeUtils.makeLabel("", 28, 0xfffbf2, 80, 306, 480, 40);
this.modeTitleLabel.bold = !0;
this.modeTitleLabel.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(this.modeTitleLabel);
this.rateLabel = GoldExchangeUtils.makeLabel("", 20, 0x7d1c1c, 80, 348, 480, 30);
this.rateLabel.stroke = 0;
this.rateLabel.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(this.rateLabel);
this.minusButton = GoldExchangeUtils.makeButton("-", 54, 44);
this.minusButton.x = 112;
this.minusButton.y = 394;
this.minusButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onMinusTap, this);
this.addChild(this.minusButton);
const inputBg = new eui.Image("common2_json.common2_inputbg_png");
inputBg.x = 184;
inputBg.y = 396;
inputBg.width = 270;
inputBg.height = 42;
inputBg.scale9Grid = new egret.Rectangle(13, 4, 84, 30);
this.addChild(inputBg);
this.amountInput = new eui.EditableText();
this.amountInput.x = 196;
this.amountInput.y = 400;
this.amountInput.width = 246;
this.amountInput.height = 34;
this.amountInput.restrict = "0-9";
this.amountInput.textAlign = egret.HorizontalAlign.CENTER;
this.amountInput.verticalAlign = egret.VerticalAlign.MIDDLE;
this.amountInput.size = 24;
this.amountInput.textColor = 0x5b3616;
this.amountInput.fontFamily = "huakanghaibao";
this.amountInput.addEventListener(egret.Event.CHANGE, this.onAmountChanged, this);
this.addChild(this.amountInput);
this.plusButton = GoldExchangeUtils.makeButton("+", 54, 44);
this.plusButton.x = 474;
this.plusButton.y = 394;
this.plusButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onPlusTap, this);
this.addChild(this.plusButton);
this.resultLabel = GoldExchangeUtils.makeLabel("", 20, 0x5b3616, 80, 448, 480, 30);
this.resultLabel.stroke = 0;
this.resultLabel.textAlign = egret.HorizontalAlign.CENTER;
this.addChild(this.resultLabel);
this.exchangeButton = GoldExchangeUtils.makeButton("兑换", 150, 58);
this.exchangeButton.x = 245;
this.exchangeButton.y = 486;
this.exchangeButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onExchangeTap, this);
this.addChild(this.exchangeButton);
const historyTitle = GoldExchangeUtils.makeLabel("兑换记录", 24, 0xfffbf2, 70, 566, 500, 32);
historyTitle.textAlign = egret.HorizontalAlign.CENTER;
historyTitle.bold = !0;
this.addChild(historyTitle);
const historyBg = new eui.Image("common_json.inner_page_png");
historyBg.x = 70;
historyBg.y = 602;
historyBg.width = 500;
historyBg.height = 214;
historyBg.scale9Grid = new egret.Rectangle(31, 31, 8, 9);
this.addChild(historyBg);
this.historyList = new eui.List();
this.historyList.width = 500;
this.historyList.height = 204;
this.historyList.itemRenderer = GoldExchangeHistoryItem;
this.historyScroller = new eui.Scroller();
this.historyScroller.x = 70;
this.historyScroller.y = 607;
this.historyScroller.width = 500;
this.historyScroller.height = 204;
this.historyScroller.viewport = this.historyList;
this.addChild(this.historyScroller);
this.closeButton = GoldExchangeUtils.makeButton("离开", 160, 58);
this.closeButton.x = 240;
this.closeButton.y = 820;
this.closeButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onCloseTap, this);
this.addChild(this.closeButton);
}
onRemoved() {
this.gemToGoldButton &&
this.gemToGoldButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onGemToGoldTap, this);
this.goldToGemButton &&
this.goldToGemButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onGoldToGemTap, this);
this.minusButton && this.minusButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onMinusTap, this);
this.plusButton && this.plusButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onPlusTap, this);
this.amountInput && this.amountInput.removeEventListener(egret.Event.CHANGE, this.onAmountChanged, this);
this.exchangeButton &&
this.exchangeButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onExchangeTap, this);
this.closeButton && this.closeButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onCloseTap, this);
super.onRemoved();
}
onGemToGoldTap(event) {
event.stopPropagation();
this.mode = "gemToGold";
this.refreshMode();
this.loadHistory();
}
onGoldToGemTap(event) {
event.stopPropagation();
this.mode = "goldToGem";
this.refreshMode();
this.loadHistory();
}
onMinusTap(event) {
event.stopPropagation();
this.changeAmount(-this.currentStep());
}
onPlusTap(event) {
event.stopPropagation();
this.changeAmount(this.currentStep());
}
onAmountChanged() {
const amount = this.currentInputAmount();
this.setModeAmount(amount);
this.updateResult();
}
onExchangeTap(event) {
event.stopPropagation();
const amount = this.currentInputAmount();
if (amount <= 0) {
TipsUtils.showTipsDownToUp("请输入大于0的数量");
return;
}
if ("goldToGem" === this.mode && amount % this.goldToGemRate !== 0) {
TipsUtils.showTipsDownToUp("请输入" + this.goldToGemRate + "的倍数");
return;
}
const player = Global.playerProxy.playerData,
isGemToGold = "gemToGold" === this.mode,
owned = isGemToGold ? toExchangeInt(player.gem) : toExchangeInt(player.gold);
if (amount > owned) {
TipsUtils.showTipsDownToUp(isGemToGold ? "钻石不足" : "金币不足");
return;
}
const result = this.currentResult(),
confirmText = isGemToGold
? "是否消耗" + amount + "钻石兑换" + result + "金币?"
: "是否消耗" + amount + "金币兑换" + result + "钻石?";
Global.alertMediator.addAlert(confirmText, this.sendExchangeRequest.bind(this, amount));
}
onCloseTap(event) {
event.stopPropagation();
game.AppFacade.getInstance().sendNotification(PanelNotify.CLOSE_CHANGE_GOLD);
}
sendExchangeRequest(amount) {
const route = "gemToGold" === this.mode ? "comm/score-to-gold" : "comm/gold-to-score",
data = "gemToGold" === this.mode ? { score: amount } : { gold: amount };
this.setStatus("正在兑换...");
GoldExchangeUtils.request(route, data, this.onExchangeResponse.bind(this));
}
onExchangeResponse(response) {
if (0 !== response.status) {
this.setStatus(GoldExchangeUtils.serverMessage(response, "兑换失败"));
return;
}
GoldExchangeUtils.mergePlayerData(response.data);
TipsUtils.showTipsDownToUp("兑换成功");
this.refreshMode();
this.loadHistory();
}
loadHistory() {
this.setStatus("正在读取兑换记录...");
GoldExchangeUtils.request(
"comm/score-gold-list",
{
type: "gemToGold" === this.mode ? 0 : 1
},
this.onHistoryResponse.bind(this)
);
}
onHistoryResponse(response) {
if (0 !== response.status) {
this.setStatus(GoldExchangeUtils.serverMessage(response, "兑换记录读取失败"));
this.historyList.dataProvider = new eui.ArrayCollection([]);
return;
}
const list = (response.data && response.data.list) || [],
isGemToGold = "gemToGold" === this.mode,
rows = list.map(function (item) {
const num = toExchangeInt(item.num || item.count || 0);
return {
created_at: item.created_at,
description: isGemToGold ? "兑换获得金币" : "兑换获得钻石",
numText: num > 0 ? "+" + num : ""
};
});
this.historyList.dataProvider = new eui.ArrayCollection(rows);
this.setStatus(rows.length ? "兑换记录已加载" : "暂无兑换记录");
this.refreshBalances();
}
refreshMode() {
const isGemToGold = "gemToGold" === this.mode;
this.gemToGoldButton.enabled = !isGemToGold;
this.goldToGemButton.enabled = isGemToGold;
this.modeTitleLabel.text = isGemToGold ? "钻石兑换金币" : "金币兑换钻石";
this.rateLabel.text = isGemToGold
? "兑换比例 1 钻石 = " + this.gemToGoldRate + " 金币"
: "兑换比例 " + this.goldToGemRate + " 金币 = 1 钻石";
this.amountInput.text = this.currentAmount().toString();
this.refreshBalances();
this.updateResult();
}
refreshBalances() {
const player = Global.playerProxy.playerData || {};
this.goldLabel.text = "金币:" + game.Utils.BigNumTostring(toExchangeInt(player.gold));
this.gemLabel.text = "钻石:" + game.Utils.BigNumTostring(toExchangeInt(player.gem));
}
updateResult() {
const amount = this.currentInputAmount(),
result = this.currentResult();
this.resultLabel.text =
"gemToGold" === this.mode
? "预计获得 " + result + " 金币"
: "预计获得 " + result + " 钻石";
}
changeAmount(delta) {
const next = Math.max(this.currentStep(), this.currentInputAmount() + delta);
this.setModeAmount(next);
this.amountInput.text = next.toString();
this.updateResult();
}
currentInputAmount() {
return toExchangeInt(this.amountInput && this.amountInput.text, this.currentAmount());
}
currentAmount() {
return "gemToGold" === this.mode ? this.gemAmount : this.goldAmount;
}
setModeAmount(amount) {
const normalized = Math.max(0, toExchangeInt(amount));
"gemToGold" === this.mode ? (this.gemAmount = normalized) : (this.goldAmount = normalized);
}
currentStep() {
return "gemToGold" === this.mode ? 1 : this.goldToGemRate;
}
currentResult() {
const amount = this.currentInputAmount();
return "gemToGold" === this.mode ? amount * this.gemToGoldRate : Math.floor(amount / this.goldToGemRate);
}
setStatus(text) {
this.statusLabel && (this.statusLabel.text = text || "");
}
};
((game.GoldExchangePanel = GoldExchangePanel), __reflect(GoldExchangePanel.prototype, "game.GoldExchangePanel"));
const GoldExchangeMediator = class GoldExchangeMediator extends BaseMediator {
constructor() {
super("GoldExchangeMediator");
}
listNotificationInterests() {
return [PanelNotify.OPEN_CHANGE_GOLD, PanelNotify.CLOSE_CHANGE_GOLD];
}
showViewComponent(layer = 7) {
((this.viewComponent = new game.GoldExchangePanel()), this.showUI(this.viewComponent, !0, 0, 0, layer));
}
handleNotification(notification) {
switch (notification.getName()) {
case PanelNotify.OPEN_CHANGE_GOLD:
this.showViewComponent(7);
break;
case PanelNotify.CLOSE_CHANGE_GOLD:
this.closeViewComponent(1);
}
}
static NAME = "GoldExchangeMediator";
};
((game.GoldExchangeMediator = GoldExchangeMediator),
__reflect(GoldExchangeMediator.prototype, "game.GoldExchangeMediator"));
})(game || (game = {}));

View File

@ -0,0 +1,832 @@
var game;
function battlePetInt(value, fallback) {
const parsed = parseInt(value, 10);
return Number.isFinite(parsed) ? parsed : fallback || 0;
}
function battlePetTable(tableName) {
return Global.gameProxy && Global.gameProxy.getTabelConfigByType
? Global.gameProxy.getTabelConfigByType(tableName) || {}
: {};
}
function battlePetConfig(tableName, id) {
const table = battlePetTable(tableName);
return table && table[id] ? table[id] : null;
}
function battlePetSkin(name) {
return window[name] || name;
}
function battlePetServerMessage(response, fallback) {
return (response && GameConfig.ServerCode && GameConfig.ServerCode[response.status]) || fallback || "操作失败";
}
function battlePetShowResponse(response, fallback) {
response && response.status === 0
? TipsUtils.showTipsDownToUp(fallback || "操作成功")
: TipsUtils.showTipsDownToUp(battlePetServerMessage(response, fallback));
}
function battlePetPetConfig(id) {
return (
battlePetConfig("pet", id) || {
id: id,
name: "未知战宠",
type: 0,
blood: 0,
attack: 0,
anti: 0,
crit: 0,
dodge: 0,
graphical_id: 11001,
max_level: 1,
hunger: 0,
desc: "本地配置缺少该战宠"
}
);
}
function battlePetLevelConfig(level) {
return (
battlePetConfig("pet_level", level) ||
battlePetConfig("pet_level", 60) || {
id: level,
exp: 1,
blood: 0,
attack: 0,
anti: 0,
crit: 0,
dodge: 0
}
);
}
function battlePetEvolutionConfig(id) {
return battlePetConfig("evolution_list", id);
}
function battlePetCultureConfig(id) {
return (
battlePetConfig("culture", id) || {
id: id,
consume_id: "201002:1,201003:1,201004:1,201005:1,201006:1",
blood: 0,
attack: 0,
anti: 0,
crit: 0,
dodge: 0
}
);
}
function battlePetIconSource(graphicalId) {
return "resource/assets/icon/petIcon/" + battlePetInt(graphicalId, 11001) + ".png";
}
function battlePetItemIconSource(itemId) {
const iconId = Global.gameProxy.getItemImageId(itemId);
return game.URLConfig.getIcon(iconId);
}
function battlePetFormatSeconds(seconds) {
const safeSeconds = Math.max(0, battlePetInt(seconds));
return game.Utils && game.Utils.showTimeFormat ? game.Utils.showTimeFormat(1000 * safeSeconds) : safeSeconds + "秒";
}
function installBattlePetConfigAccessors() {
if (!game || !game.GameProxy || !game.GameProxy.prototype) return;
const proto = game.GameProxy.prototype;
proto.getPetBaseConfigForID ||
(proto.getPetBaseConfigForID = function (id) {
return battlePetPetConfig(id);
});
proto.getPetJinConfigForID ||
(proto.getPetJinConfigForID = function (id) {
return battlePetEvolutionConfig(id);
});
proto.getPetUpConfigForID ||
(proto.getPetUpConfigForID = function (level) {
return battlePetLevelConfig(level);
});
proto.getPetXiaohaoConfigForID ||
(proto.getPetXiaohaoConfigForID = function (id) {
return battlePetCultureConfig(id);
});
}
installBattlePetConfigAccessors();
function ensureBattlePetRuntimeConfig() {
installBattlePetConfigAccessors();
const serverMessages = {
1063: "战宠饥饿度不足",
1064: "请先设置出战战宠",
1065: "昵称重复",
1066: "已达到最大等级",
1067: "已经领取过",
1068: "战宠等级不能超过玩家等级",
1069: "战宠需要升到当前形态满级",
1070: "战宠培养次数需要全部达到当前等级",
1071: "战宠已达到最大等级"
};
Object.keys(serverMessages).forEach(function (code) {
GameConfig.ServerCode[code] || (GameConfig.ServerCode[code] = serverMessages[code]);
});
if (!Global.gameProxy || !Global.gameProxy.gameConfig) return;
const itemList = battlePetTable("item_list"),
storeList = battlePetTable("store_list"),
petTable = battlePetTable("pet"),
evolutionTable = battlePetTable("evolution_list"),
eggs = [
{ id: 201021, storeId: 701, gold: 10, gem: 0 },
{ id: 201017, storeId: 702, gold: 30, gem: 0 },
{ id: 201018, storeId: 703, gold: 60, gem: 0 },
{ id: 201019, storeId: 704, gold: 0, gem: 20 },
{ id: 201020, storeId: 705, gold: 0, gem: 30 }
];
eggs.forEach(function (egg, index) {
const petEggConfig = petTable[egg.id] || {},
evolutionConfig = evolutionTable[egg.id] || {};
itemList[egg.id] ||
(itemList[egg.id] = {
id: egg.id,
type1: 3,
type2: 500,
name: petEggConfig.name || "宠物蛋",
graphical_id: petEggConfig.graphical_id || 8022,
player_level: petEggConfig.player_level || 1,
sell_gold: 0,
effect_id: evolutionConfig.next_id || 0,
desc: petEggConfig.desc || "孵化后可获得战宠。"
});
storeList[egg.storeId] ||
(storeList[egg.storeId] = {
id: egg.storeId,
type: 3,
item_id: egg.id,
priority_type1: 70 + index,
player_level: itemList[egg.id].player_level || 1,
gold: egg.gold,
gem: egg.gem
});
});
Object.keys(evolutionTable).forEach(function (id) {
const evolution = evolutionTable[id],
drawingId = battlePetInt(evolution && evolution.drawing_id);
if (drawingId > 0 && !itemList[drawingId]) {
itemList[drawingId] = {
id: drawingId,
type1: 3,
type2: 700,
name: "战宠进化图纸",
graphical_id: 3002,
player_level: 1,
sell_gold: 0,
effect_id: 0,
desc: "战宠进化所需图纸。"
};
}
});
}
var PetData = class PetData {};
__reflect(PetData.prototype, "PetData");
var PetPro = class PetPro {};
PetPro.ketArr = ["blood", "attack", "anti", "crit", "dodge"];
PetPro.ketArrd = ["blood_add", "attack_add", "anti_add", "crit_add", "dodge_add"];
PetPro.petProStr = ["血量", "攻击", "防御", "暴击", "闪避"];
PetPro.petWay = ["无类型", "近身攻击", "远程攻击"];
PetPro.PET_HP = 0;
PetPro.ATTACK = 1;
PetPro.DEFENT = 2;
PetPro.CRIT = 3;
PetPro.DODGE = 4;
PetPro.POWER = 5;
__reflect(PetPro.prototype, "PetPro");
var PetWar;
!(function (PetWar) {
PetWar[(PetWar.PET_FIGHT = 1)] = "PET_FIGHT";
PetWar[(PetWar.PET_NOFIGHT = 0)] = "PET_NOFIGHT";
})(PetWar || (PetWar = {}));
var Pet = class Pet {
constructor() {
this.trainArr = [0, 0, 0, 0, 0];
this.accelerate_brooding_gem = 0;
this.curBlood = 0;
this.index = 0;
this.petData = new PetData();
}
readData(data) {
this.id = data.id;
this.pet_config_id = data.pet_config_id;
this.name = data.name;
this.level = Math.max(1, battlePetInt(data.level, 1));
this.exp = battlePetInt(data.exp);
this.feed = battlePetInt(data.feed);
this.feed_max = battlePetInt(data.feed_max);
this.last_updata_feed_time = data.last_updata_feed_time;
this.fighting_capacity = battlePetInt(data.fighting_capacity);
this.is_enter_war = battlePetInt(data.is_enter_war);
this.index = battlePetInt(data.index);
this.end_brooding_time = battlePetInt(data.end_brooding_time);
this.last_feed_update_time = data.last_feed_update_time;
this.accelerate_brooding_gem = battlePetInt(data.accelerate_brooding_gem);
this.petData.blood = battlePetInt(data.blood) + battlePetInt(data.blood_add);
this.curBlood = this.petData.blood;
this.petData.attack = battlePetInt(data.attack) + battlePetInt(data.attack_add);
this.petData.anti = battlePetInt(data.anti) + battlePetInt(data.anti_add);
this.petData.crit = battlePetInt(data.crit) + battlePetInt(data.crit_add);
this.petData.dodge = battlePetInt(data.dodge) + battlePetInt(data.dodge_add);
this.trainArr[PetPro.PET_HP] = battlePetInt(data.blood_train_count);
this.trainArr[PetPro.ATTACK] = battlePetInt(data.attack_train_count);
this.trainArr[PetPro.DEFENT] = battlePetInt(data.anti_train_count);
this.trainArr[PetPro.CRIT] = battlePetInt(data.crit_train_count);
this.trainArr[PetPro.DODGE] = battlePetInt(data.dodge_train_count);
if (!this.fighting_capacity) this.fighting_capacity = BattlePetManager.getInstance().alaysPower(this.petData);
this.updateBroodingTime();
}
updateBroodingTime() {
const now = DateTimer && DateTimer.instance ? DateTimer.instance.now : Math.floor(Date.now() / 1000);
this.has_end_brooding_time = Math.max(0, battlePetInt(this.end_brooding_time) - now);
}
};
__reflect(Pet.prototype, "Pet");
var BattlePetManager = class BattlePetManager extends egret.EventDispatcher {
constructor() {
super();
this.petArr = [];
this.isjin = 0;
}
static getInstance() {
return BattlePetManager._instance || (BattlePetManager._instance = new BattlePetManager()), BattlePetManager._instance;
}
bindPanel(panel) {
this.panel = panel;
}
unbindPanel(panel) {
this.panel === panel && (this.panel = null);
}
request(route, data, callback) {
Global.netProxy.sendRequest(GameConfig.SERVER_PATH + route, data || {}, callback.bind(this));
}
initPet(list) {
this.petArr.length = 0;
(list || []).forEach(
function (row) {
const pet = new Pet();
pet.readData(row);
this.petArr.push(pet);
}.bind(this)
);
this.petArr.sort(function (left, right) {
return battlePetInt(right.is_enter_war) - battlePetInt(left.is_enter_war) || battlePetInt(left.id) - battlePetInt(right.id);
});
if (!this.getPetForID(this.curID) && this.petArr.length) this.curID = this.petArr[0].id;
}
getPetForID(id) {
for (let index = 0; index < this.petArr.length; index++) {
if (battlePetInt(this.petArr[index].id) === battlePetInt(id)) return this.petArr[index];
}
return null;
}
currentPet() {
return this.getPetForID(this.curID);
}
alaysPower(data) {
return Math.ceil(0.2 * battlePetInt(data.blood) + battlePetInt(data.attack) + 2 * battlePetInt(data.anti) + 3 * battlePetInt(data.crit) + 3 * battlePetInt(data.dodge));
}
notifyPanel() {
this.panel && this.panel.onPetDataChanged && this.panel.onPetDataChanged();
game.EventManager &&
game.EventManager.instance &&
game.EventManager.instance.dispatch &&
game.EventManager.instance.dispatch(SysNotify.TOPLAYER_INFO_UPDATE);
}
sendGetpet() {
this.request("pet/get-list", {}, this.onSendNetGetPet);
}
onSendNetGetPet(response) {
if (response.status === 0) {
this.initPet((response.data && response.data.list) || []);
this.notifyPanel();
this.petArr.length || TipsUtils.showTipsDownToUp("您没有宠物");
} else battlePetShowResponse(response, "战宠列表读取失败");
}
sendNetAdd() {
const pet = this.currentPet();
if (!pet) return;
const needGem = battlePetInt(pet.accelerate_brooding_gem);
if (battlePetInt(Global.playerProxy.playerData.gem) < needGem) {
TipsUtils.showTipsDownToUp("钻石不够,请充值");
return;
}
this.request("pet/accelerate-brooding-egg", { pet_id: this.curID }, this.onSendNetAdd);
}
onSendNetAdd(response) {
if (response.status === 0) {
const pet = this.currentPet();
pet && (Global.playerProxy.playerData.gem = battlePetInt(Global.playerProxy.playerData.gem) - battlePetInt(pet.accelerate_brooding_gem));
this.sendGetpet();
TipsUtils.showTipsDownToUp("加速成功");
} else battlePetShowResponse(response, "加速失败");
}
sendNetWar() {
this.curID && this.request("pet/set-enter-war", { pet_id: this.curID }, this.onSendNetWar);
}
onSendNetWar(response) {
response.status === 0 ? (this.sendGetpet(), TipsUtils.showTipsDownToUp("参战成功")) : battlePetShowResponse(response, "参战失败");
}
sendNetPeiyang() {
this.curID && this.request("pet/train", { pet_id: this.curID, type: this.curType }, this.onSendNetPeiyang);
}
onSendNetPeiyang(response) {
if (response.status === 0) {
const pet = this.currentPet(),
cultureConfig = pet && battlePetCultureConfig(pet.pet_config_id),
cost = cultureConfig && String(cultureConfig.consume_id || "").split(",")[this.curType - 1];
cost && Global.playerProxy.sellWareHouseItem1(cost);
this.sendGetpet();
TipsUtils.showTipsDownToUp("培养成功");
} else battlePetShowResponse(response, "培养失败");
}
sendNetUpLevel() {
this.curID && this.request("pet/upgrade", { pet_id: this.curID, gold: this.curGold }, this.onSendNetUpLevel);
}
onSendNetUpLevel(response) {
if (response.status === 0) {
Global.playerProxy.playerData.gold = battlePetInt(Global.playerProxy.playerData.gold) - battlePetInt(this.curGold);
this.sendGetpet();
TipsUtils.showTipsDownToUp("升级成功");
} else battlePetShowResponse(response, "升级失败");
}
sendNetJinhua() {
this.curID && this.request("pet/evolution", { pet_id: this.curID }, this.onSendNetJinhua);
}
onSendNetJinhua(response) {
if (response.status === 0) {
const pet = this.currentPet(),
evolutionConfig = pet && battlePetEvolutionConfig(pet.pet_config_id),
costs = [];
evolutionConfig && evolutionConfig.crystal_id && costs.push(evolutionConfig.crystal_id);
evolutionConfig && battlePetInt(evolutionConfig.drawing_id) > 0 && costs.push(evolutionConfig.drawing_id + ":1");
costs.length && Global.playerProxy.sellWareHouseItem1(costs.join(","));
this.isjin = 1;
this.sendGetpet();
this.showEvolutionTips();
} else battlePetShowResponse(response, "进化失败");
}
sendNetFeend() {
this.feedItemID && this.curID
? this.request("pet/feed", { pet_id: this.curID, item_id: this.feedItemID }, this.onSendNetFeed)
: TipsUtils.showTipsDownToUp("没有狗粮");
}
onSendNetFeed(response) {
if (response.status === 0) {
this.feedItemID && Global.playerProxy.sellWareHouseItem({ id: this.feedItemID }, 1);
this.sendGetpet();
TipsUtils.showTipsDownToUp("喂养成功");
} else battlePetShowResponse(response, "喂养失败");
}
getFeed(itemId) {
const item = Global.playerProxy.getHasItemByItemId(itemId);
return item || null;
}
showEvolutionTips() {
if (!PopUpManager || !PopUpManager.addPopUp) return;
const tips = new BattlePetJinhuaTips();
PopUpManager.addPopUp(tips, true, 0, 0, 7);
}
};
__reflect(BattlePetManager.prototype, "BattlePetManager");
var BattleBaseCompoment = class BattleBaseCompoment extends eui.Component {
constructor() {
super();
this.isUpdata = false;
}
childrenCreated() {
super.childrenCreated();
this.jiasuButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onJiasu, this);
this.sleepButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onSleep, this);
this.battleButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onBattle, this);
}
onRemovedFromStage() {
this.jiasuButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onJiasu, this);
this.sleepButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onSleep, this);
this.battleButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onBattle, this);
}
updata() {
const pet = BattlePetManager.getInstance().currentPet();
if (!pet) return;
pet.updateBroodingTime();
const petConfig = battlePetPetConfig(pet.pet_config_id),
nextLevelConfig = battlePetLevelConfig(Math.min(60, pet.level + 1));
this.headImg.source = battlePetIconSource(petConfig.graphical_id);
this.fightFeedLabel.text = battlePetInt(petConfig.hunger) + "";
this.petPoerLabel.text = battlePetInt(pet.fighting_capacity) + "";
this.petWay.text = PetPro.petWay[battlePetInt(petConfig.type)] || PetPro.petWay[0];
this.petLevelLabel.text = pet.level + "";
this.g1.visible = false;
this.g2.visible = false;
if (pet.has_end_brooding_time > 0) {
this.isUpdata = true;
this.g2.visible = true;
this.timeLabel.text = battlePetFormatSeconds(pet.has_end_brooding_time);
this.gemNumLabel.text = battlePetInt(pet.accelerate_brooding_gem) + "";
} else {
this.isUpdata = false;
this.g1.visible = true;
this.bar1.setPross(pet.exp, battlePetInt(nextLevelConfig.exp, 1));
this.curhungerLabel.text = pet.feed + "";
}
this.hoLabel.text = pet.petData.blood + "";
this.attrackLabel.text = pet.petData.attack + "";
this.critLabel.text = pet.petData.crit + "";
this.dodgeLabel.text = pet.petData.dodge + "";
this.defenselabel.text = pet.petData.anti + "";
this.desLabel.text = petConfig.desc || "";
if (pet.is_enter_war == PetWar.PET_NOFIGHT) {
this.battleButton.visible = true;
this.sleepButton.visible = false;
} else {
this.battleButton.visible = false;
this.sleepButton.visible = true;
}
}
enterFrame() {
const pet = BattlePetManager.getInstance().currentPet();
if (!pet) return;
pet.updateBroodingTime();
if (this.isUpdata) this.timeLabel.text = battlePetFormatSeconds(pet.has_end_brooding_time);
else if (pet.is_enter_war == PetWar.PET_FIGHT) this.curhungerLabel.text = pet.feed + "";
}
onJiasu(event) {
event && event.stopPropagation();
BattlePetManager.getInstance().sendNetAdd();
}
onSleep(event) {
event && event.stopPropagation();
}
onBattle(event) {
event && event.stopPropagation();
BattlePetManager.getInstance().sendNetWar();
}
};
__reflect(BattleBaseCompoment.prototype, "BattleBaseCompoment");
var BattlePetItem2 = class BattlePetItem2 extends eui.Component {
constructor() {
super();
this.skinName = battlePetSkin("BattlePetItem2Skin");
}
setImgScale(scale) {
this.headImg.scaleX = scale;
this.headImg.scaleY = scale;
}
};
__reflect(BattlePetItem2.prototype, "BattlePetItem2");
var BattlePetProItem1 = class BattlePetProItem1 extends eui.Component {
constructor() {
super();
this.skinName = battlePetSkin("BattleProItem1Skin");
}
};
__reflect(BattlePetProItem1.prototype, "BattlePetProItem1");
var BattlePetProItem = class BattlePetProItem extends eui.Component {
constructor(type) {
super();
this.type = type || 0;
this.skinName = battlePetSkin("BattleProItemSkin");
this.addEventListener(egret.Event.REMOVED_FROM_STAGE, this.onRemove, this);
}
childrenCreated() {
super.childrenCreated();
this.peiyangButton.touchEnabled = true;
this.peiyangButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onPeiyang, this);
}
onRemove() {
this.peiyangButton && this.peiyangButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onPeiyang, this);
this.removeEventListener(egret.Event.REMOVED_FROM_STAGE, this.onRemove, this);
}
onPeiyang(event) {
event && event.stopPropagation();
const manager = BattlePetManager.getInstance(),
pet = manager.currentPet();
manager.curType = this.type + 1;
pet && pet.trainArr[this.type] < pet.level ? manager.sendNetPeiyang() : TipsUtils.showTipsDownToUp("当前宠物等级不足");
}
};
__reflect(BattlePetProItem.prototype, "BattlePetProItem");
var BattlePetRadioButton = class BattlePetRadioButton extends eui.RadioButton {
constructor() {
super();
this.skinName = battlePetSkin("BattlePetRadioButtonSkin");
}
updatePet(pet) {
const petConfig = battlePetPetConfig(pet.pet_config_id);
this.value = pet.id;
this.headImg.source = battlePetIconSource(petConfig.graphical_id);
this.nameLabel.text = petConfig.name || pet.name || "";
}
};
__reflect(BattlePetRadioButton.prototype, "BattlePetRadioButton");
var BattlePetJinhuaCompoment = class BattlePetJinhuaCompoment extends eui.Component {
childrenCreated() {
super.childrenCreated();
this.jinhuaButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onJinHua, this);
}
onJinHua(event) {
event && event.stopPropagation();
BattlePetManager.getInstance().isjin = 0;
BattlePetManager.getInstance().showEvolutionTips();
}
updata() {
const pet = BattlePetManager.getInstance().currentPet();
if (!pet) return;
const petConfig = battlePetPetConfig(pet.pet_config_id),
evolutionConfig = battlePetEvolutionConfig(pet.pet_config_id),
nextPetConfig = evolutionConfig && battlePetPetConfig(evolutionConfig.next_id);
this.headImg1.source = battlePetIconSource(petConfig.graphical_id);
this.nameLabel1.text = petConfig.name || "";
this.headImg2.source = battlePetIconSource((nextPetConfig || petConfig).graphical_id);
this.nameLabel2.text = nextPetConfig ? nextPetConfig.name || "" : "MAX";
this.jinhuaButton.visible = !!nextPetConfig;
this.setCompareItem(this.item0, "等级上限", petConfig.max_level, nextPetConfig ? nextPetConfig.max_level : petConfig.max_level);
this.setCompareItem(this.item1, "血量", pet.petData.blood, pet.petData.blood + (nextPetConfig ? battlePetInt(nextPetConfig.blood) - battlePetInt(petConfig.blood) : 0));
this.setCompareItem(this.item2, "攻击", pet.petData.attack, pet.petData.attack + (nextPetConfig ? battlePetInt(nextPetConfig.attack) - battlePetInt(petConfig.attack) : 0));
this.setCompareItem(this.item3, "防御", pet.petData.anti, pet.petData.anti + (nextPetConfig ? battlePetInt(nextPetConfig.anti) - battlePetInt(petConfig.anti) : 0));
this.setCompareItem(this.item4, "暴击", pet.petData.crit, pet.petData.crit + (nextPetConfig ? battlePetInt(nextPetConfig.crit) - battlePetInt(petConfig.crit) : 0));
this.setCompareItem(this.item5, "闪避", pet.petData.dodge, pet.petData.dodge + (nextPetConfig ? battlePetInt(nextPetConfig.dodge) - battlePetInt(petConfig.dodge) : 0));
const currentPower = BattlePetManager.getInstance().alaysPower(pet.petData),
nextPower = BattlePetManager.getInstance().alaysPower({
blood: battlePetInt(this.item1.titleNumLabel1.text),
attack: battlePetInt(this.item2.titleNumLabel1.text),
anti: battlePetInt(this.item3.titleNumLabel1.text),
crit: battlePetInt(this.item4.titleNumLabel1.text),
dodge: battlePetInt(this.item5.titleNumLabel1.text)
});
this.setCompareItem(this.item6, "战力", currentPower, nextPower);
}
setCompareItem(item, name, left, right) {
item.titleNameLabel.text = name;
item.titleNumLabel.text = left + "";
item.titleNumLabel.x = item.titleNameLabel.x + item.titleNameLabel.width + 10;
item.titleNameLabel1.text = name;
item.titleNumLabel1.text = right + "";
item.titleNumLabel1.x = item.titleNameLabel1.x + item.titleNameLabel1.width + 10;
}
};
__reflect(BattlePetJinhuaCompoment.prototype, "BattlePetJinhuaCompoment");
var BattlePetJinhuaTips = class BattlePetJinhuaTips extends eui.Component {
constructor() {
super();
this.skinName = battlePetSkin("BattlePetJinhuaTipSkin");
this.addEventListener(egret.Event.REMOVED_FROM_STAGE, this.onRemove, this);
}
childrenCreated() {
super.childrenCreated();
this.closeButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onClose, this);
this.okButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onClose, this);
this.jinhuaButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onJinhua, this);
this.g1.visible = BattlePetManager.getInstance().isjin === 0;
this.g2.visible = BattlePetManager.getInstance().isjin !== 0;
this.g1.visible ? this.updataItem() : this.updateSuccess();
}
onRemove() {
this.closeButton && this.closeButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onClose, this);
this.okButton && this.okButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onClose, this);
this.jinhuaButton && this.jinhuaButton.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onJinhua, this);
this.removeEventListener(egret.Event.REMOVED_FROM_STAGE, this.onRemove, this);
}
onJinhua(event) {
event && event.stopPropagation();
BattlePetManager.getInstance().sendNetJinhua();
game.UIUtils.removeSelf(this);
}
onClose(event) {
event && event.stopPropagation();
game.UIUtils.removeSelf(this);
}
updateSuccess() {
const pet = BattlePetManager.getInstance().currentPet(),
petConfig = pet && battlePetPetConfig(pet.pet_config_id);
if (!petConfig) return;
this.nameLabel.text = petConfig.name || "";
this.headImg.source = battlePetIconSource(petConfig.graphical_id);
}
updataItem() {
const pet = BattlePetManager.getInstance().currentPet(),
evolutionConfig = pet && battlePetEvolutionConfig(pet.pet_config_id);
if (!evolutionConfig) return;
const crystals = String(evolutionConfig.crystal_id || "").split(",");
for (let index = 1; index < 6; index++) {
const parts = String(crystals[index - 1] || "").split(":"),
itemId = parts[0],
count = parts[1] || 0,
item = this["item" + index];
if (!item) continue;
item.headImg.source = battlePetItemIconSource(itemId);
item.numLaebl.text = "X" + count;
}
this.item0.headImg.source = battlePetItemIconSource(evolutionConfig.drawing_id);
this.item0.numLaebl.text = "X1";
}
};
__reflect(BattlePetJinhuaTips.prototype, "BattlePetJinhuaTips");
var BattlePetUpLevelCompoment = class BattlePetUpLevelCompoment extends eui.Component {
childrenCreated() {
super.childrenCreated();
this.initItem();
this.changeButton.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onChange, this);
this.scrolls.touchEnabled = true;
this.goldEditLabel.restrict = "0-9";
}
initItem() {
this.gs.removeChildren();
for (let index = 0; index < 5; index++) {
const item = new BattlePetProItem(index);
this.gs.addChild(item);
item.y = item.height * index + 0.1 * item.height;
}
}
updata() {
const pet = BattlePetManager.getInstance().currentPet();
if (!pet) return;
this.levelLabel.text = pet.level + "";
const nextLevel = Math.min(60, pet.level + 1),
levelConfig = battlePetLevelConfig(nextLevel),
cultureConfig = battlePetCultureConfig(pet.pet_config_id),
rate = battlePetInt((battlePetConfig("common", 18) || {}).min, 100),
currentExp = battlePetInt(pet.exp),
targetExp = battlePetInt(levelConfig.exp, 1);
this.desLabel1.text = "注:金币兑换经验值的比例为" + rate + ":1,只能输入倍数为" + rate + "的金币";
this.prossbar.setPross(currentExp, targetExp);
this.goldEditLabel.text = "" + Math.max(0, targetExp - currentExp) * rate;
const consumeItems = String(cultureConfig.consume_id || "").split(",");
for (let index = 0; index < this.gs.numChildren; index++) {
const item = this.gs.getChildAt(index),
propertyName = PetPro.ketArr[item.type],
consumeParts = String(consumeItems[item.type] || "201002:1").split(":"),
itemId = consumeParts[0],
count = battlePetInt(consumeParts[1], 1);
item.proNameLabel.text = PetPro.petProStr[item.type];
item.titleNameLabel.text = pet.petData[propertyName] + "";
item.proLabel.text = battlePetInt(cultureConfig[propertyName]) + "";
item.countLabel.text = pet.trainArr[item.type] + "/" + pet.level;
item.icons.source = battlePetItemIconSource(itemId);
item.countLabel0.text = "X" + count;
}
}
onChange(event) {
event && event.stopPropagation();
const gold = battlePetInt(this.goldEditLabel.text),
rate = battlePetInt((battlePetConfig("common", 18) || {}).min, 100),
pet = BattlePetManager.getInstance().currentPet();
if (!pet) return;
const targetExp = battlePetInt(battlePetLevelConfig(Math.min(60, pet.level + 1)).exp, 1),
needGold = Math.max(0, targetExp - battlePetInt(pet.exp)) * rate;
if (gold % rate === 0 && gold >= rate) {
if (needGold >= gold) {
BattlePetManager.getInstance().curGold = gold;
BattlePetManager.getInstance().sendNetUpLevel();
} else TipsUtils.showTipsDownToUp("当前金币大于当前升级经验所需金币");
} else TipsUtils.showTipsDownToUp("请输入" + rate + "的倍数");
}
};
__reflect(BattlePetUpLevelCompoment.prototype, "BattlePetUpLevelCompoment");
var BattlePanel = class BattlePanel extends game.BasePanel {
constructor() {
super();
this.isFullScreen = true;
this.isVisibleAnimate = true;
this.skinName = battlePetSkin("BattlePetPanelSkin");
}
createChildren() {
super.createChildren();
this.commonPanel.setPanelWidth(640);
this.commonPanel.setPanelHeight(940);
this.commonPanel.setTitleIcon("");
this.commonPanel.setTitle("battle_pet_json.battle_pet_canzhan12_png");
}
childrenCreated() {
super.childrenCreated();
ensureBattlePetRuntimeConfig();
BattlePetManager.getInstance().bindPanel(this);
this.initTab();
this.initRadioGroup();
this.tab.setSelectIndex(0);
this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
BattlePetManager.getInstance().sendGetpet();
}
onRemoved() {
BattlePetManager.getInstance().unbindPanel(this);
this.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
super.onRemoved();
}
initTab() {
const tabs = ["基本属性", "战力升级", "宠物进化"];
this.tab = new game.Tab(tabs, this.onTabItemClickCallback.bind(this));
this.groupbar.addChild(this.tab);
}
initRadioGroup() {
this.radioButtonGroup &&
this.radioButtonGroup.removeEventListener(egret.Event.CHANGE, this.change, this);
this.radioButtonGroup = new eui.RadioButtonGroup();
this.radioButtonGroup.addEventListener(egret.Event.CHANGE, this.change, this);
this.gs.removeChildren();
const pets = BattlePetManager.getInstance().petArr,
selectedId = BattlePetManager.getInstance().curID || (pets[0] && pets[0].id);
pets.forEach(
function (pet, index) {
const radio = new BattlePetRadioButton();
radio.group = this.radioButtonGroup;
radio.updatePet(pet);
radio.x = index * radio.width + index * radio.width * 0.4;
this.gs.addChild(radio);
if (battlePetInt(pet.id) === battlePetInt(selectedId)) {
radio.selected = true;
BattlePetManager.getInstance().curID = pet.id;
}
}.bind(this)
);
}
onEnterFrame() {
this.baseC && this.baseC.enterFrame();
}
onTabItemClickCallback(index) {
this.updata();
}
change() {
BattlePetManager.getInstance().curID = this.radioButtonGroup.selectedValue;
this.updata();
}
onPetDataChanged() {
this.initRadioGroup();
this.updata();
}
updataRadioGroup() {
for (let index = 0; index < this.gs.numChildren; index++) {
const radio = this.gs.getChildAt(index),
pet = BattlePetManager.getInstance().getPetForID(radio.value);
pet && radio.updatePet(pet);
radio.selected = battlePetInt(radio.value) === battlePetInt(BattlePetManager.getInstance().curID);
}
}
updata() {
this.baseC.visible = false;
this.upLevelc.visible = false;
this.jinhuaC.visible = false;
const pet = BattlePetManager.getInstance().currentPet();
if (!pet) return;
pet.updateBroodingTime();
const index = this.tab.selectIndex;
switch (index) {
case 0:
this.baseC.visible = true;
this.baseC.updata();
break;
case 1:
if (pet.has_end_brooding_time > 0) {
this.tab.setSelectIndex(0);
TipsUtils.showTipsDownToUp("宠物正在孵化");
return;
}
this.upLevelc.visible = true;
this.upLevelc.updata();
break;
case 2:
if (pet.has_end_brooding_time > 0) {
this.tab.setSelectIndex(0);
TipsUtils.showTipsDownToUp("宠物正在孵化");
return;
}
this.jinhuaC.visible = true;
this.jinhuaC.updata();
break;
}
this.updataRadioGroup();
}
btnCloseTouchEnded() {
game.AppFacade.getInstance().sendNotification(PanelNotify.CLOSE_BATTLEPET);
}
};
__reflect(BattlePanel.prototype, "BattlePanel");
!(function (game) {
game.WorldPetPanel = BattlePanel;
__reflect(BattlePanel.prototype, "game.WorldPetPanel");
})(game || (game = {}));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,5 +11,10 @@
"js/main/09-scenes-and-scene-mediators.js",
"js/main/10-services-utils-and-effects.js",
"js/main/11-sign-and-box.js",
"js/main/12-welfare.js"
"js/main/12-welfare.js",
"js/main/13-world-features.js",
"js/main/14-gold-exchange.js",
"js/main/15-battle-pet-full.js",
"js/main/16-amusement-park-full.js",
"js/main/17-sports-full.js"
]

View File

@ -1,29 +1,36 @@
{
"initial": [
"libs/modules/egret/egret.min.js",
"libs/modules/egret/egret.web.min.js",
"libs/modules/game/game.min.js",
"libs/modules/eui/eui.min.js",
"libs/modules/socket/socket.min.js",
"libs/modules/tween/tween.min.js",
"libs/modules/puremvc/puremvc.min.js",
"libs/modules/underscore/underscore.min.js",
"libs/modules/weixinapi/weixinapi.min.js",
"libs/modules/async/async.min.js",
"libs/modules/res/res.min.js",
"promise/promise.min.js"
],
"game": [
"js/main/00-runtime-and-notify.js",
"js/main/01-base-and-registration.js",
"js/main/02-startup-proxies.js",
"js/main/03-game-ui-core.js",
"js/main/04-friends-items-land-shop.js",
"js/main/05-config-and-panels.js",
"js/main/06-gifts-and-friend-panels.js",
"js/main/07-mediators.js",
"js/main/08-magic-factory.js",
"js/main/09-scenes-and-scene-mediators.js",
"js/main/10-services-utils-and-effects.js"
]
"initial": [
"libs/modules/egret/egret.min.js",
"libs/modules/egret/egret.web.min.js",
"libs/modules/game/game.min.js",
"libs/modules/eui/eui.min.js",
"libs/modules/socket/socket.min.js",
"libs/modules/tween/tween.min.js",
"libs/modules/puremvc/puremvc.min.js",
"libs/modules/underscore/underscore.min.js",
"libs/modules/weixinapi/weixinapi.min.js",
"libs/modules/async/async.min.js",
"libs/modules/res/res.min.js",
"promise/promise.min.js"
],
"game": [
"js/main/00-runtime-and-notify.js",
"js/main/01-base-and-registration.js",
"js/main/02-startup-proxies.js",
"js/main/03-game-ui-core.js",
"js/main/04-friends-items-land-shop.js",
"js/main/05-config-and-panels.js",
"js/main/06-gifts-and-friend-panels.js",
"js/main/07-mediators.js",
"js/main/08-magic-factory.js",
"js/main/09-scenes-and-scene-mediators.js",
"js/main/10-services-utils-and-effects.js",
"js/main/11-sign-and-box.js",
"js/main/12-welfare.js",
"js/main/13-world-features.js",
"js/main/14-gold-exchange.js",
"js/main/15-battle-pet-full.js",
"js/main/16-amusement-park-full.js",
"js/main/17-sports-full.js"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,22 +1,24 @@
{"file":"common2.png","frames":{
"common_dakuang_png":{"x":630,"y":764,"w":117,"h":117,"offX":0,"offY":0,"sourceW":117,"sourceH":117},
"common_db_10_png":{"x":630,"y":1,"w":458,"h":553,"offX":0,"offY":0,"sourceW":458,"sourceH":553},
"common_itemrender_png":{"x":630,"y":556,"w":517,"h":206,"offX":0,"offY":0,"sourceW":517,"sourceH":206},
"common_itemrender_png":{"x":1090,"y":291,"w":517,"h":206,"offX":0,"offY":0,"sourceW":517,"sourceH":206},
"common_likai_png":{"x":203,"y":934,"w":200,"h":70,"offX":0,"offY":0,"sourceW":200,"sourceH":70},
"common2_confir_png":{"x":405,"y":965,"w":166,"h":58,"offX":0,"offY":0,"sourceW":166,"sourceH":58},
"common2_confirbg1_png":{"x":711,"y":965,"w":118,"h":53,"offX":0,"offY":0,"sourceW":118,"sourceH":53},
"common2_confirbg2_png":{"x":852,"y":764,"w":122,"h":66,"offX":0,"offY":0,"sourceW":122,"sourceH":66},
"common2_confir_png":{"x":405,"y":934,"w":166,"h":58,"offX":0,"offY":0,"sourceW":166,"sourceH":58},
"common2_confirbg1_png":{"x":990,"y":892,"w":118,"h":53,"offX":0,"offY":0,"sourceW":118,"sourceH":53},
"common2_confirbg2_png":{"x":1134,"y":892,"w":122,"h":66,"offX":0,"offY":0,"sourceW":122,"sourceH":66},
"common2_diban_png":{"x":1,"y":934,"w":200,"h":70,"offX":0,"offY":0,"sourceW":200,"sourceH":70},
"common2_inputbg_png":{"x":852,"y":832,"w":110,"h":38,"offX":0,"offY":0,"sourceW":110,"sourceH":38},
"common2_jia_png":{"x":846,"y":986,"w":49,"h":32,"offX":0,"offY":0,"sourceW":49,"sourceH":32},
"common2_jian_png":{"x":831,"y":952,"w":49,"h":32,"offX":0,"offY":0,"sourceW":49,"sourceH":32},
"common2_prossbar_png":{"x":630,"y":883,"w":383,"h":25,"offX":0,"offY":0,"sourceW":383,"sourceH":25},
"common2_prossbarbg_png":{"x":405,"y":934,"w":387,"h":29,"offX":0,"offY":0,"sourceW":387,"sourceH":29},
"common2_shengjibtn_png":{"x":573,"y":965,"w":136,"h":58,"offX":0,"offY":0,"sourceW":136,"sourceH":58},
"common2_star0_png":{"x":846,"y":910,"w":34,"h":40,"offX":0,"offY":0,"sourceW":34,"sourceH":40},
"common2_star1_png":{"x":794,"y":910,"w":50,"h":40,"offX":0,"offY":0,"sourceW":50,"sourceH":40},
"common2_star2_png":{"x":964,"y":832,"w":69,"h":40,"offX":0,"offY":0,"sourceW":69,"sourceH":40},
"common2_xuanzhong_png":{"x":749,"y":764,"w":101,"h":103,"offX":0,"offY":0,"sourceW":101,"sourceH":103},
"common2_you_png":{"x":976,"y":764,"w":31,"h":59,"offX":0,"offY":0,"sourceW":31,"sourceH":59},
"common2_zuo_png":{"x":1009,"y":764,"w":30,"h":59,"offX":0,"offY":0,"sourceW":30,"sourceH":59},
"common_changdiban_png":{"x":1,"y":1,"w":627,"h":931,"offX":0,"offY":0,"sourceW":627,"sourceH":931}}}
"common2_inputbg_png":{"x":990,"y":947,"w":110,"h":38,"offX":0,"offY":0,"sourceW":110,"sourceH":38},
"common2_jia_png":{"x":1166,"y":960,"w":49,"h":32,"offX":0,"offY":0,"sourceW":49,"sourceH":32},
"common2_jian_png":{"x":1217,"y":960,"w":49,"h":32,"offX":0,"offY":0,"sourceW":49,"sourceH":32},
"common2_prossbar_png":{"x":749,"y":997,"w":383,"h":25,"offX":0,"offY":0,"sourceW":383,"sourceH":25},
"common2_prossbarbg_png":{"x":1090,"y":499,"w":387,"h":29,"offX":0,"offY":0,"sourceW":387,"sourceH":29},
"common2_shengjibtn_png":{"x":852,"y":892,"w":136,"h":58,"offX":0,"offY":0,"sourceW":136,"sourceH":58},
"common2_star0_png":{"x":1479,"y":499,"w":34,"h":40,"offX":0,"offY":0,"sourceW":34,"sourceH":40},
"common2_star1_png":{"x":923,"y":952,"w":50,"h":40,"offX":0,"offY":0,"sourceW":50,"sourceH":40},
"common2_star2_png":{"x":852,"y":952,"w":69,"h":40,"offX":0,"offY":0,"sourceW":69,"sourceH":40},
"common2_xuanzhong_png":{"x":749,"y":892,"w":101,"h":103,"offX":0,"offY":0,"sourceW":101,"sourceH":103},
"common2_you_png":{"x":573,"y":934,"w":31,"h":59,"offX":0,"offY":0,"sourceW":31,"sourceH":59},
"common2_zhuangshi_png":{"x":1090,"y":1,"w":523,"h":288,"offX":0,"offY":0,"sourceW":523,"sourceH":288},
"common2_zuo_png":{"x":1134,"y":960,"w":30,"h":59,"offX":0,"offY":0,"sourceW":30,"sourceH":59},
"conmon2_tangchuang_png":{"x":630,"y":556,"w":532,"h":334,"offX":0,"offY":0,"sourceW":532,"sourceH":334},
"common_changdiban_png":{"x":1,"y":1,"w":627,"h":931,"offX":0,"offY":0,"sourceW":627,"sourceH":931},
"common_dakuang_png":{"x":630,"y":892,"w":117,"h":117,"offX":0,"offY":0,"sourceW":117,"sourceH":117}}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,30 @@
{"file":"battle_pet.png","frames":{
"battle_pet_canzhan3_png":{"x":0,"y":133,"w":110,"h":26,"offX":1,"offY":2,"sourceW":112,"sourceH":31},
"battle_pet_canzhan4_png":{"x":0,"y":262,"w":112,"h":31,"offX":0,"offY":0,"sourceW":112,"sourceH":31},
"battle_pet_canzhan5_png":{"x":205,"y":299,"w":107,"h":30,"offX":0,"offY":0,"sourceW":107,"sourceH":30},
"battle_pet_canzhan6_png":{"x":205,"y":363,"w":81,"h":40,"offX":0,"offY":0,"sourceW":81,"sourceH":40},
"battle_pet_canzhan7_png":{"x":0,"y":221,"w":211,"h":39,"offX":0,"offY":0,"sourceW":211,"sourceH":39},
"battle_pet_canzhan8_png":{"x":288,"y":363,"w":108,"h":26,"offX":2,"offY":2,"sourceW":112,"sourceH":31},
"battle_pet_canzhan9_png":{"x":0,"y":295,"w":111,"h":31,"offX":0,"offY":0,"sourceW":111,"sourceH":31},
"battle_pet_canzhan10_png":{"x":364,"y":302,"w":30,"h":59,"offX":0,"offY":0,"sourceW":30,"sourceH":59},
"battle_pet_canzhan11_png":{"x":175,"y":335,"w":22,"h":32,"offX":0,"offY":0,"sourceW":22,"sourceH":32},
"battle_pet_canzhan12_png":{"x":250,"y":71,"w":153,"h":88,"offX":0,"offY":0,"sourceW":153,"sourceH":88},
"battle_pet_canzhan13_png":{"x":0,"y":161,"w":356,"h":30,"offX":0,"offY":0,"sourceW":356,"sourceH":30},
"battle_pet_canzhan14_png":{"x":0,"y":193,"w":348,"h":26,"offX":0,"offY":0,"sourceW":348,"sourceH":26},
"battle_pet_canzhan15_png":{"x":92,"y":335,"w":81,"h":40,"offX":0,"offY":0,"sourceW":81,"sourceH":40},
"battle_pet_canzhan16_png":{"x":0,"y":73,"w":166,"h":58,"offX":0,"offY":0,"sourceW":166,"sourceH":58},
"battle_pet_canzhan17_png":{"x":250,"y":0,"w":249,"h":69,"offX":0,"offY":0,"sourceW":249,"sourceH":69},
"battle_pet_canzhan18_png":{"x":0,"y":368,"w":81,"h":40,"offX":0,"offY":0,"sourceW":81,"sourceH":40},
"battle_pet_canzhan19_png":{"x":350,"y":193,"w":150,"h":34,"offX":0,"offY":0,"sourceW":150,"sourceH":34},
"battle_pet_canzhan20_png":{"x":205,"y":331,"w":107,"h":30,"offX":0,"offY":0,"sourceW":108,"sourceH":30},
"battle_pet_canzhan21_png":{"x":213,"y":261,"w":115,"h":36,"offX":0,"offY":0,"sourceW":115,"sourceH":36},
"battle_pet_canzhan22_png":{"x":314,"y":302,"w":48,"h":47,"offX":0,"offY":0,"sourceW":48,"sourceH":47},
"battle_pet_canzhan23_png":{"x":168,"y":73,"w":71,"h":85,"offX":0,"offY":0,"sourceW":71,"sourceH":85},
"battle_pet_canzhan24_png":{"x":113,"y":295,"w":90,"h":38,"offX":0,"offY":0,"sourceW":90,"sourceH":38},
"battle_pet_canzhan25_png":{"x":0,"y":0,"w":248,"h":71,"offX":0,"offY":0,"sourceW":248,"sourceH":71},
"battle_pet_canzhan27_png":{"x":347,"y":229,"w":112,"h":38,"offX":0,"offY":0,"sourceW":112,"sourceH":38},
"battle_pet_canzhan28_png":{"x":213,"y":221,"w":132,"h":38,"offX":0,"offY":0,"sourceW":132,"sourceH":38},
"battle_pet_canzhan_png":{"x":0,"y":328,"w":90,"h":38,"offX":0,"offY":0,"sourceW":90,"sourceH":38},
"battle_pet_canzhan_26_png":{"x":405,"y":71,"w":87,"h":99,"offX":0,"offY":0,"sourceW":87,"sourceH":99},
"battle_pet_canzhan1_png":{"x":83,"y":377,"w":109,"h":26,"offX":0,"offY":0,"sourceW":109,"sourceH":26},
"battle_pet_canzhan2_png":{"x":330,"y":269,"w":112,"h":31,"offX":0,"offY":0,"sourceW":112,"sourceH":31}}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,17 @@
{"file":"battle_fruit.png","frames":{
"battle_fruit1_png":{"x":144,"y":236,"w":66,"h":64,"offX":9,"offY":8,"sourceW":82,"sourceH":82},
"battle_fruit2_png":{"x":1,"y":164,"w":69,"h":70,"offX":7,"offY":6,"sourceW":82,"sourceH":82},
"battle_fruit3_png":{"x":72,"y":164,"w":69,"h":69,"offX":9,"offY":8,"sourceW":82,"sourceH":82},
"battle_fruit4_png":{"x":1,"y":236,"w":72,"h":63,"offX":5,"offY":9,"sourceW":82,"sourceH":82},
"battle_fruit5_png":{"x":1,"y":301,"w":67,"h":67,"offX":7,"offY":9,"sourceW":82,"sourceH":82},
"battle_fruit6_png":{"x":144,"y":302,"w":67,"h":63,"offX":10,"offY":11,"sourceW":82,"sourceH":82},
"battle_fruit7_png":{"x":143,"y":164,"w":67,"h":70,"offX":8,"offY":5,"sourceW":82,"sourceH":82},
"battle_fruit8_png":{"x":75,"y":236,"w":67,"h":67,"offX":6,"offY":8,"sourceW":82,"sourceH":82},
"battle_fruit9_png":{"x":116,"y":1,"w":97,"h":64,"offX":0,"offY":0,"sourceW":97,"sourceH":64},
"battle_fruit10_png":{"x":198,"y":367,"w":53,"h":66,"offX":0,"offY":0,"sourceW":53,"sourceH":66},
"battle_fruit11_png":{"x":1,"y":1,"w":113,"h":118,"offX":0,"offY":0,"sourceW":113,"sourceH":118},
"battle_fruit12_png":{"x":1,"y":121,"w":204,"h":41,"offX":0,"offY":0,"sourceW":204,"sourceH":41},
"battle_fruit13_png":{"x":1,"y":370,"w":195,"h":20,"offX":0,"offY":0,"sourceW":195,"sourceH":20},
"battle_fruit14_png":{"x":116,"y":67,"w":86,"h":16,"offX":2,"offY":1,"sourceW":89,"sourceH":18},
"battle_fruit15_png":{"x":204,"y":79,"w":7,"h":6,"offX":0,"offY":0,"sourceW":7,"sourceH":6},
"battle_fruit16_png":{"x":204,"y":67,"w":11,"h":10,"offX":0,"offY":0,"sourceW":11,"sourceH":10}}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,11 @@
{"file":"change.png","frames":{
"change_sp1_png":{"x":0,"y":432,"w":209,"h":19,"offX":0,"offY":0,"sourceW":209,"sourceH":19},
"change_sp2_png":{"x":99,"y":384,"w":177,"h":19,"offX":0,"offY":0,"sourceW":177,"sourceH":19},
"change_sp3_png":{"x":0,"y":233,"w":252,"h":71,"offX":0,"offY":0,"sourceW":252,"sourceH":71},
"change_sp4_png":{"x":0,"y":0,"w":445,"h":231,"offX":0,"offY":0,"sourceW":445,"sourceH":231},
"change_sp5_png":{"x":0,"y":306,"w":173,"h":49,"offX":0,"offY":0,"sourceW":173,"sourceH":49},
"change_sp6_png":{"x":254,"y":279,"w":173,"h":49,"offX":0,"offY":0,"sourceW":173,"sourceH":49},
"change_sp7_png":{"x":99,"y":405,"w":406,"h":6,"offX":0,"offY":0,"sourceW":406,"sourceH":6},
"change_sp8_png":{"x":175,"y":330,"w":157,"h":52,"offX":0,"offY":0,"sourceW":157,"sourceH":52},
"change_sp9_png":{"x":254,"y":233,"w":234,"h":44,"offX":0,"offY":0,"sourceW":234,"sourceH":44},
"change_sp10_png":{"x":0,"y":357,"w":97,"h":73,"offX":0,"offY":0,"sourceW":97,"sourceH":73}}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,10 +1,11 @@
{"file":"friend.png","frames":{
"panel_icon_friend_png":{"x":263,"y":0,"w":86,"h":83,"offX":0,"offY":0,"sourceW":86,"sourceH":83},
"friend_btn_zhanli_png":{"x":350,"y":67,"w":66,"h":67,"offX":3,"offY":0,"sourceW":72,"sourceH":67},
"friend_hand_png":{"x":418,"y":130,"w":57,"h":54,"offX":0,"offY":0,"sourceW":57,"sourceH":54},
"panel_icon_friend_png":{"x":262,"y":86,"w":86,"h":83,"offX":0,"offY":0,"sourceW":86,"sourceH":83},
"panel_title_friend_png":{"x":0,"y":172,"w":261,"h":83,"offX":0,"offY":0,"sourceW":261,"sourceH":83},
"panel_title_friend_find_png":{"x":0,"y":0,"w":261,"h":84,"offX":0,"offY":0,"sourceW":261,"sourceH":84},
"panel_title_friend_req_png":{"x":0,"y":86,"w":260,"h":84,"offX":0,"offY":0,"sourceW":260,"sourceH":84},
"friend_btn_caifu_png":{"x":423,"y":0,"w":70,"h":73,"offX":0,"offY":0,"sourceW":70,"sourceH":73},
"friend_btn_find_png":{"x":423,"y":75,"w":70,"h":65,"offX":0,"offY":0,"sourceW":70,"sourceH":65},
"friend_btn_lv_png":{"x":351,"y":0,"w":70,"h":80,"offX":0,"offY":0,"sourceW":70,"sourceH":80},
"friend_btn_req_png":{"x":351,"y":82,"w":70,"h":61,"offX":0,"offY":0,"sourceW":70,"sourceH":61},
"friend_hand_png":{"x":263,"y":85,"w":57,"h":54,"offX":0,"offY":0,"sourceW":57,"sourceH":54}}}
"friend_btn_caifu_png":{"x":335,"y":0,"w":72,"h":65,"offX":0,"offY":1,"sourceW":72,"sourceH":67},
"friend_btn_find_png":{"x":409,"y":0,"w":70,"h":65,"offX":0,"offY":0,"sourceW":70,"sourceH":65},
"friend_btn_lv_png":{"x":263,"y":0,"w":70,"h":80,"offX":0,"offY":0,"sourceW":70,"sourceH":80},
"friend_btn_req_png":{"x":418,"y":67,"w":70,"h":61,"offX":0,"offY":0,"sourceW":70,"sourceH":61}}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -1,23 +1,25 @@
{"file":"menu3.png","frames":{
"menu2_left_rewardgift_png":{"x":412,"y":81,"w":85,"h":76,"offX":0,"offY":0,"sourceW":85,"sourceH":76},
"menu2_left_sign_png":{"x":409,"y":1,"w":86,"h":78,"offX":0,"offY":0,"sourceW":86,"sourceH":78},
"menu2_leftbuttom_chengjiu_png":{"x":245,"y":86,"w":78,"h":91,"offX":0,"offY":0,"sourceW":78,"sourceH":91},
"menu2_leftbuttom_jingji_png":{"x":1,"y":414,"w":82,"h":93,"offX":0,"offY":0,"sourceW":82,"sourceH":93},
"menu2_leftbuttom_zhanchong_png":{"x":87,"y":311,"w":83,"h":100,"offX":0,"offY":0,"sourceW":83,"sourceH":100},
"menu2_leftbutton_youleyuan_png":{"x":158,"y":164,"w":85,"h":89,"offX":0,"offY":0,"sourceW":85,"sourceH":89},
"menu2_m_home_png":{"x":1,"y":164,"w":155,"h":145,"offX":0,"offY":0,"sourceW":155,"sourceH":145},
"menu2_m_rank_png":{"x":333,"y":1,"w":74,"h":92,"offX":0,"offY":0,"sourceW":74,"sourceH":92},
"menu2_m_shop_png":{"x":185,"y":413,"w":86,"h":89,"offX":0,"offY":0,"sourceW":86,"sourceH":89},
"menu2_m_skin_png":{"x":423,"y":177,"w":68,"h":95,"offX":0,"offY":0,"sourceW":68,"sourceH":95},
"menu2_m_warehouse_png":{"x":1,"y":311,"w":84,"h":101,"offX":0,"offY":0,"sourceW":84,"sourceH":101},
"menu2_m_word_png":{"x":1,"y":1,"w":156,"h":161,"offX":0,"offY":0,"sourceW":156,"sourceH":161},
"menu2_top_box_png":{"x":159,"y":1,"w":84,"h":85,"offX":0,"offY":0,"sourceW":84,"sourceH":85},
"menu2_top_crystal_png":{"x":259,"y":179,"w":82,"h":84,"offX":0,"offY":0,"sourceW":82,"sourceH":84},
"menu2_top_landup_png":{"x":87,"y":413,"w":96,"h":82,"offX":0,"offY":0,"sourceW":96,"sourceH":82},
"menu2_top_log_png":{"x":159,"y":88,"w":74,"h":74,"offX":0,"offY":0,"sourceW":74,"sourceH":74},
"menu2_top_lottery_png":{"x":245,"y":1,"w":86,"h":83,"offX":0,"offY":0,"sourceW":86,"sourceH":83},
"menu2_top_paygift_png":{"x":325,"y":95,"w":85,"h":80,"offX":0,"offY":0,"sourceW":85,"sourceH":80},
"menu2_tophecheng_png":{"x":343,"y":177,"w":78,"h":85,"offX":0,"offY":0,"sourceW":78,"sourceH":85},
"menu2_toppay_png":{"x":347,"y":264,"w":56,"h":80,"offX":0,"offY":0,"sourceW":56,"sourceH":80},
"menu2_left_fuli_png":{"x":172,"y":255,"w":85,"h":89,"offX":0,"offY":0,"sourceW":85,"sourceH":89},
"menu2_left_notice_png":{"x":259,"y":265,"w":86,"h":78,"offX":0,"offY":0,"sourceW":86,"sourceH":78}}}
"menu2_left_rewardgift_png":{"x":278,"y":241,"w":85,"h":76,"offX":0,"offY":0,"sourceW":85,"sourceH":76},
"menu2_left_sign_png":{"x":273,"y":431,"w":86,"h":78,"offX":0,"offY":0,"sourceW":86,"sourceH":78},
"menu2_leftbuttom_chengjiu_png":{"x":271,"y":147,"w":82,"h":87,"offX":0,"offY":10,"sourceW":93,"sourceH":99},
"menu2_leftbuttom_jingji_png":{"x":358,"y":319,"w":70,"h":82,"offX":9,"offY":15,"sourceW":93,"sourceH":99},
"menu2_leftbuttom_muchang_png":{"x":315,"y":0,"w":155,"h":145,"offX":0,"offY":0,"sourceW":155,"sourceH":145},
"menu2_leftbuttom_zhanchong_png":{"x":86,"y":163,"w":85,"h":94,"offX":2,"offY":3,"sourceW":93,"sourceH":99},
"menu2_leftbutton_youleyuan_png":{"x":0,"y":266,"w":93,"h":89,"offX":0,"offY":0,"sourceW":93,"sourceH":89},
"menu2_m_home_png":{"x":158,"y":0,"w":155,"h":145,"offX":0,"offY":0,"sourceW":155,"sourceH":145},
"menu2_m_rank_png":{"x":355,"y":147,"w":74,"h":92,"offX":0,"offY":0,"sourceW":74,"sourceH":92},
"menu2_m_shop_png":{"x":173,"y":147,"w":86,"h":89,"offX":0,"offY":0,"sourceW":86,"sourceH":89},
"menu2_m_skin_png":{"x":431,"y":234,"w":68,"h":95,"offX":0,"offY":0,"sourceW":68,"sourceH":95},
"menu2_m_warehouse_png":{"x":0,"y":163,"w":84,"h":101,"offX":0,"offY":0,"sourceW":84,"sourceH":101},
"menu2_m_word_png":{"x":0,"y":0,"w":156,"h":161,"offX":0,"offY":0,"sourceW":156,"sourceH":161},
"menu2_top_box_png":{"x":185,"y":344,"w":84,"h":85,"offX":0,"offY":0,"sourceW":84,"sourceH":85},
"menu2_top_crystal_png":{"x":95,"y":259,"w":93,"h":83,"offX":0,"offY":14,"sourceW":93,"sourceH":99},
"menu2_top_landup_png":{"x":0,"y":357,"w":96,"h":82,"offX":0,"offY":0,"sourceW":96,"sourceH":82},
"menu2_top_log_png":{"x":98,"y":435,"w":74,"h":74,"offX":0,"offY":0,"sourceW":74,"sourceH":74},
"menu2_top_lottery_png":{"x":190,"y":238,"w":86,"h":83,"offX":0,"offY":0,"sourceW":86,"sourceH":83},
"menu2_top_tuiguang_png":{"x":362,"y":428,"w":86,"h":80,"offX":0,"offY":0,"sourceW":74,"sourceH":80},
"menu2_top_paygift_png":{"x":271,"y":323,"w":85,"h":80,"offX":0,"offY":0,"sourceW":85,"sourceH":80},
"menu2_tophecheng_png":{"x":431,"y":147,"w":78,"h":85,"offX":0,"offY":0,"sourceW":78,"sourceH":85},
"menu2_toppay_png":{"x":430,"y":331,"w":56,"h":80,"offX":0,"offY":0,"sourceW":56,"sourceH":80},
"menu2_left_fuli_png":{"x":98,"y":344,"w":85,"h":89,"offX":0,"offY":0,"sourceW":85,"sourceH":89},
"menu2_left_notice_png":{"x":185,"y":431,"w":86,"h":78,"offX":0,"offY":0,"sourceW":86,"sourceH":78}}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,309 @@
{"mc":{
"muchang_jimc":{
"frameRate":6,
"labels":[
{"name":"small_a0","frame":1,"end":8}
,{"name":"small_a1","frame":9,"end":16}
,{"name":"middle_a0","frame":17,"end":24}
,{"name":"middle_a1","frame":25,"end":32}
,{"name":"big_a0","frame":33,"end":40}
,{"name":"big_a1","frame":41,"end":48}
],
"events":[
],
"frames":[
{
"res":"xiaoji_stand_0_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_1_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_2 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_3 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_4 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_5 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_6 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_stand_7 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_walk_0 副本_png",
"x":0,
"y":3
},
{
"res":"xiaoji_walk_1 副本_png",
"x":0,
"y":2
},
{
"res":"xiaoji_walk_2 副本_png",
"x":0,
"y":1
},
{
"res":"xiaoji_walk_3 副本_png",
"x":0,
"y":1
},
{
"res":"xiaoji_walk_4 副本_png",
"x":0,
"y":3
},
{
"res":"xiaoji_walk_5 副本_png",
"x":0,
"y":2
},
{
"res":"xiaoji_walk_6 副本_png",
"x":0,
"y":0
},
{
"res":"xiaoji_walk_7 副本_png",
"x":0,
"y":1
},
{
"res":"zhongji_stand_0_png",
"x":1,
"y":1
},
{
"res":"zhongji_stand_1_png",
"x":1,
"y":1
},
{
"res":"zhongji_stand_2 副本_png",
"x":1,
"y":1
},
{
"res":"zhongji_stand_3 副本_png",
"x":1,
"y":1
},
{
"res":"zhongji_stand_4 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_stand_5 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_stand_6 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_stand_7 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_walk_0 副本_png",
"x":1,
"y":3
},
{
"res":"zhongji_walk_1 副本_png",
"x":1,
"y":3
},
{
"res":"zhongji_walk_2 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_walk_3 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_walk_4 副本_png",
"x":1,
"y":4
},
{
"res":"zhongji_walk_5 副本_png",
"x":1,
"y":3
},
{
"res":"zhongji_walk_6 副本_png",
"x":1,
"y":2
},
{
"res":"zhongji_walk_7 副本_png",
"x":1,
"y":2
},
{
"res":"huangji_stand_0_png",
"x":1,
"y":1
},
{
"res":"huangji_stand_1 副本_png",
"x":1,
"y":1
},
{
"res":"huangji_stand_2 副本_png",
"x":1,
"y":1
},
{
"res":"huangji_stand_3 副本_png",
"x":1,
"y":1
},
{
"res":"huangji_stand_4 副本_png",
"x":1,
"y":1
},
{
"res":"huangji_stand_5 副本_png",
"x":1,
"y":2
},
{
"res":"huangji_stand_6 副本_png",
"x":0,
"y":2
},
{
"res":"huangji_stand_7 副本_png",
"x":0,
"y":2
},
{
"res":"huangji_walk_0 副本_png",
"x":1,
"y":3
},
{
"res":"huangji_walk_1 副本_png",
"x":1,
"y":3
},
{
"res":"huangji_walk_2 副本_png",
"x":1,
"y":1
},
{
"res":"huangji_walk_3 副本_png",
"x":1,
"y":2
},
{
"res":"huangji_walk_4 副本_png",
"x":1,
"y":3
},
{
"res":"huangji_walk_5 副本_png",
"x":1,
"y":3
},
{
"res":"huangji_walk_6 副本_png",
"x":1,
"y":1
},
{
"res":"huangji_walk_7 副本_png",
"x":1,
"y":2
}
]
}},
"res":{
"xiaoji_walk_5 副本_png":{"x":424,"y":444,"w":39,"h":46},
"zhongji_stand_0_png":{"x":137,"y":366,"w":66,"h":78},
"xiaoji_walk_1 副本_png":{"x":465,"y":444,"w":39,"h":46},
"xiaoji_walk_7 副本_png":{"x":342,"y":442,"w":39,"h":47},
"huangji_stand_5 副本_png":{"x":340,"y":191,"w":83,"h":91},
"xiaoji_stand_5 副本_png":{"x":81,"y":447,"w":38,"h":44},
"xiaoji_walk_4 副本_png":{"x":137,"y":446,"w":39,"h":45},
"huangji_stand_0_png":{"x":426,"y":188,"w":83,"h":92},
"huangji_stand_4 副本_png":{"x":0,"y":190,"w":83,"h":92},
"zhongji_walk_4 副本_png":{"x":274,"y":442,"w":66,"h":78},
"zhongji_stand_4 副本_png":{"x":205,"y":285,"w":68,"h":77},
"huangji_stand_1 副本_png":{"x":170,"y":190,"w":83,"h":92},
"xiaoji_walk_0 副本_png":{"x":0,"y":446,"w":39,"h":45},
"zhongji_stand_5 副本_png":{"x":345,"y":363,"w":68,"h":77},
"xiaoji_stand_4 副本_png":{"x":0,"y":493,"w":38,"h":44},
"zhongji_walk_2 副本_png":{"x":69,"y":284,"w":66,"h":80},
"huangji_walk_7 副本_png":{"x":341,"y":95,"w":83,"h":94},
"zhongji_stand_3 副本_png":{"x":205,"y":364,"w":67,"h":78},
"huangji_walk_6 副本_png":{"x":85,"y":0,"w":83,"h":95},
"huangji_stand_2 副本_png":{"x":85,"y":190,"w":83,"h":92},
"xiaoji_stand_1_png":{"x":342,"y":491,"w":38,"h":44},
"zhongji_stand_7 副本_png":{"x":340,"y":284,"w":68,"h":77},
"zhongji_walk_7 副本_png":{"x":0,"y":284,"w":67,"h":80},
"zhongji_walk_1 副本_png":{"x":428,"y":0,"w":68,"h":79},
"huangji_walk_1 副本_png":{"x":342,"y":0,"w":84,"h":93},
"zhongji_walk_0 副本_png":{"x":69,"y":366,"w":66,"h":79},
"xiaoji_stand_7 副本_png":{"x":41,"y":447,"w":38,"h":44},
"huangji_stand_7 副本_png":{"x":0,"y":97,"w":84,"h":91},
"xiaoji_stand_3 副本_png":{"x":464,"y":492,"w":38,"h":44},
"zhongji_stand_2 副本_png":{"x":415,"y":364,"w":67,"h":78},
"zhongji_walk_5 副本_png":{"x":86,"y":97,"w":68,"h":79},
"xiaoji_stand_0_png":{"x":80,"y":493,"w":37,"h":44},
"zhongji_stand_6 副本_png":{"x":275,"y":363,"w":68,"h":77},
"xiaoji_stand_6 副本_png":{"x":40,"y":493,"w":38,"h":44},
"zhongji_walk_3 副本_png":{"x":425,"y":282,"w":67,"h":80},
"xiaoji_walk_3 副本_png":{"x":205,"y":444,"w":39,"h":47},
"zhongji_stand_1_png":{"x":0,"y":366,"w":67,"h":78},
"huangji_walk_0 副本_png":{"x":256,"y":0,"w":84,"h":93},
"zhongji_walk_6 副本_png":{"x":137,"y":284,"w":66,"h":80},
"huangji_walk_3 副本_png":{"x":256,"y":95,"w":83,"h":94},
"xiaoji_walk_6 副本_png":{"x":275,"y":285,"w":39,"h":48},
"xiaoji_stand_2 副本_png":{"x":424,"y":492,"w":38,"h":44},
"huangji_walk_2 副本_png":{"x":0,"y":0,"w":83,"h":95},
"xiaoji_walk_2 副本_png":{"x":383,"y":444,"w":39,"h":47},
"huangji_walk_4 副本_png":{"x":170,"y":0,"w":84,"h":93},
"huangji_stand_3 副本_png":{"x":255,"y":191,"w":83,"h":92},
"huangji_walk_5 副本_png":{"x":170,"y":95,"w":84,"h":93},
"huangji_stand_6 副本_png":{"x":426,"y":95,"w":84,"h":91}
}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

View File

@ -0,0 +1,309 @@
{"mc":{
"muchang_niumc":{
"frameRate":6,
"labels":[
{"name":"small_a0","frame":1,"end":8}
,{"name":"small_a1","frame":9,"end":16}
,{"name":"middle_a0","frame":17,"end":24}
,{"name":"middle_a1","frame":25,"end":32}
,{"name":"big_a0","frame":33,"end":40}
,{"name":"big_a1","frame":41,"end":48}
],
"events":[
],
"frames":[
{
"res":"nainiuyouzai-stand_0_png",
"x":0,
"y":1
},
{
"res":"nainiuyouzai-stand_1_png",
"x":0,
"y":1
},
{
"res":"nainiuyouzai-stand_2_png",
"x":0,
"y":0
},
{
"res":"nainiuyouzai-stand_3_png",
"x":0,
"y":0
},
{
"res":"nainiuyouzai-stand_4_png",
"x":0,
"y":0
},
{
"res":"nainiuyouzai-stand_5_png",
"x":0,
"y":0
},
{
"res":"nainiuyouzai-stand_6_png",
"x":0,
"y":0
},
{
"res":"nainiuyouzai-stand_7_png",
"x":0,
"y":0
},
{
"res":"nainiuyouzai-walk_0_png",
"x":1,
"y":1
},
{
"res":"nainiuyouzai-walk_1_png",
"x":1,
"y":0
},
{
"res":"nainiuyouzai-walk_2_png",
"x":1,
"y":0
},
{
"res":"nainiuyouzai-walk_3_png",
"x":1,
"y":0
},
{
"res":"nainiuyouzai-walk_4_png",
"x":1,
"y":1
},
{
"res":"nainiuyouzai-walk_5_png",
"x":1,
"y":0
},
{
"res":"nainiuyouzai-walk_6_png",
"x":1,
"y":0
},
{
"res":"nainiuyouzai-walk_7_png",
"x":1,
"y":0
},
{
"res":"armatureName-stand_0_png",
"x":0,
"y":1
},
{
"res":"armatureName-stand_1_png",
"x":0,
"y":1
},
{
"res":"armatureName-stand_2_png",
"x":0,
"y":1
},
{
"res":"armatureName-stand_3_png",
"x":0,
"y":2
},
{
"res":"armatureName-stand_4_png",
"x":0,
"y":2
},
{
"res":"armatureName-stand_5_png",
"x":0,
"y":2
},
{
"res":"armatureName-stand_6_png",
"x":0,
"y":1
},
{
"res":"armatureName-stand_7_png",
"x":0,
"y":1
},
{
"res":"armatureName-walk_0_png",
"x":0,
"y":2
},
{
"res":"armatureName-walk_1_png",
"x":0,
"y":2
},
{
"res":"armatureName-walk_2_png",
"x":0,
"y":1
},
{
"res":"armatureName-walk_3_png",
"x":0,
"y":1
},
{
"res":"armatureName-walk_4_png",
"x":0,
"y":2
},
{
"res":"armatureName-walk_5_png",
"x":0,
"y":2
},
{
"res":"armatureName-walk_6_png",
"x":0,
"y":1
},
{
"res":"armatureName-walk_7_png",
"x":0,
"y":1
},
{
"res":"nainiu-stand_0_png",
"x":0,
"y":1
},
{
"res":"nainiu-stand_1_png",
"x":0,
"y":0
},
{
"res":"nainiu-stand_2_png",
"x":0,
"y":1
},
{
"res":"nainiu-stand_3_png",
"x":0,
"y":1
},
{
"res":"nainiu-stand_4_png",
"x":0,
"y":2
},
{
"res":"nainiu-stand_5_png",
"x":0,
"y":2
},
{
"res":"nainiu-stand_6_png",
"x":0,
"y":2
},
{
"res":"nainiu-stand_7_png",
"x":0,
"y":2
},
{
"res":"nainiu-walk_0_png",
"x":0,
"y":2
},
{
"res":"nainiu-walk_1_png",
"x":0,
"y":2
},
{
"res":"nainiu-walk_2_png",
"x":0,
"y":0
},
{
"res":"nainiu-walk_3_png",
"x":0,
"y":0
},
{
"res":"nainiu-walk_4_png",
"x":0,
"y":2
},
{
"res":"nainiu-walk_5_png",
"x":0,
"y":2
},
{
"res":"nainiu-walk_6_png",
"x":0,
"y":0
},
{
"res":"nainiu-walk_7_png",
"x":0,
"y":0
}
]
}},
"res":{
"nainiu-walk_4_png":{"x":899,"y":0,"w":110,"h":88},
"nainiuyouzai-stand_1_png":{"x":591,"y":249,"w":60,"h":48},
"nainiuyouzai-walk_2_png":{"x":162,"y":181,"w":58,"h":47},
"nainiuyouzai-stand_2_png":{"x":945,"y":248,"w":59,"h":49},
"nainiuyouzai-walk_4_png":{"x":262,"y":298,"w":58,"h":46},
"nainiu-stand_7_png":{"x":896,"y":90,"w":111,"h":87},
"nainiu-stand_1_png":{"x":448,"y":0,"w":110,"h":89},
"nainiuyouzai-stand_4_png":{"x":81,"y":249,"w":59,"h":49},
"nainiuyouzai-walk_6_png":{"x":202,"y":298,"w":58,"h":47},
"armatureName-walk_2_png":{"x":721,"y":180,"w":79,"h":67},
"armatureName-walk_1_png":{"x":243,"y":230,"w":79,"h":66},
"nainiu-walk_5_png":{"x":560,"y":0,"w":111,"h":88},
"armatureName-walk_0_png":{"x":324,"y":248,"w":79,"h":66},
"armatureName-stand_7_png":{"x":308,"y":92,"w":81,"h":67},
"nainiuyouzai-walk_7_png":{"x":714,"y":249,"w":58,"h":47},
"nainiu-walk_3_png":{"x":0,"y":0,"w":110,"h":90},
"armatureName-walk_3_png":{"x":640,"y":180,"w":79,"h":67},
"armatureName-stand_0_png":{"x":308,"y":161,"w":81,"h":67},
"nainiuyouzai-walk_3_png":{"x":0,"y":250,"w":58,"h":47},
"nainiuyouzai-stand_3_png":{"x":467,"y":248,"w":60,"h":49},
"armatureName-stand_3_png":{"x":391,"y":180,"w":81,"h":66},
"nainiuyouzai-walk_1_png":{"x":774,"y":249,"w":58,"h":47},
"nainiu-stand_4_png":{"x":448,"y":91,"w":110,"h":87},
"armatureName-walk_5_png":{"x":162,"y":230,"w":79,"h":66},
"armatureName-stand_1_png":{"x":225,"y":92,"w":81,"h":67},
"nainiu-walk_6_png":{"x":112,"y":0,"w":110,"h":90},
"armatureName-walk_6_png":{"x":0,"y":181,"w":79,"h":67},
"nainiuyouzai-stand_7_png":{"x":883,"y":248,"w":60,"h":49},
"armatureName-stand_5_png":{"x":474,"y":180,"w":81,"h":66},
"nainiu-walk_2_png":{"x":336,"y":0,"w":110,"h":90},
"armatureName-stand_6_png":{"x":896,"y":179,"w":81,"h":67},
"nainiu-stand_0_png":{"x":560,"y":90,"w":110,"h":88},
"armatureName-stand_4_png":{"x":557,"y":180,"w":81,"h":66},
"nainiuyouzai-stand_5_png":{"x":529,"y":248,"w":60,"h":49},
"nainiuyouzai-walk_5_png":{"x":142,"y":298,"w":58,"h":47},
"armatureName-stand_2_png":{"x":225,"y":161,"w":81,"h":67},
"nainiu-stand_5_png":{"x":113,"y":92,"w":110,"h":87},
"nainiu-stand_3_png":{"x":673,"y":0,"w":111,"h":88},
"nainiuyouzai-stand_6_png":{"x":405,"y":248,"w":60,"h":49},
"armatureName-walk_7_png":{"x":802,"y":180,"w":79,"h":67},
"nainiu-stand_6_png":{"x":0,"y":92,"w":111,"h":87},
"nainiu-walk_7_png":{"x":224,"y":0,"w":110,"h":90},
"nainiuyouzai-walk_0_png":{"x":714,"y":298,"w":58,"h":46},
"nainiu-walk_0_png":{"x":784,"y":90,"w":110,"h":88},
"nainiu-walk_1_png":{"x":786,"y":0,"w":111,"h":88},
"armatureName-walk_4_png":{"x":81,"y":181,"w":79,"h":66},
"nainiu-stand_2_png":{"x":672,"y":90,"w":110,"h":88},
"nainiuyouzai-stand_0_png":{"x":653,"y":249,"w":59,"h":48}
}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,309 @@
{"mc":{
"muchang_yangmc":{
"frameRate":6,
"labels":[
{"name":"small_a0","frame":1,"end":8}
,{"name":"small_a1","frame":9,"end":16}
,{"name":"middle_a0","frame":17,"end":24}
,{"name":"middle_a1","frame":25,"end":32}
,{"name":"big_a0","frame":33,"end":40}
,{"name":"big_a1","frame":41,"end":48}
],
"events":[
],
"frames":[
{
"res":"mianyangyouzai_stand_0_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_stand_1_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_stand_2_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_stand_3_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_stand_4_png",
"x":0,
"y":1
},
{
"res":"mianyangyouzai_stand_5_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_stand_6_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_stand_7_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_walk_复制2_0 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangyouzai_walk_复制2_1 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangyouzai_walk_复制2_2 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_walk_复制2_3 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangyouzai_walk_复制2_4 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangyouzai_walk_复制2_5 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangyouzai_walk_复制2_6 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangyouzai_walk_复制2_7 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_stand_0_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_stand_1_png",
"x":0,
"y":0
},
{
"res":"mianyangchengzhang_stand_2 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengzhang_stand_3 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_stand_4 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_stand_5 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_stand_6 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_stand_7 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengzhang_walk_0 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_walk_1 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengzhang_walk_2 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengzhang_walk_3 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengzhang_walk_4 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengzhang_walk_5 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengzhang_walk_6 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengzhang_walk_7 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengshuqi_stand_0_png",
"x":0,
"y":1
},
{
"res":"mianyangchengshuqi_stand_1_png",
"x":0,
"y":0
},
{
"res":"mianyangchengshuqi_stand_2 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengshuqi_stand_3 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengshuqi_stand_4 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengshuqi_stand_5 副本_png",
"x":0,
"y":3
},
{
"res":"mianyangchengshuqi_stand_6 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengshuqi_stand_7 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengshuqi_walk_0 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengshuqi_walk_1 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengshuqi_walk_2 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengshuqi_walk_3 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengshuqi_walk_4 副本_png",
"x":0,
"y":2
},
{
"res":"mianyangchengshuqi_walk_5 副本_png",
"x":0,
"y":1
},
{
"res":"mianyangchengshuqi_walk_6 副本_png",
"x":0,
"y":0
},
{
"res":"mianyangchengshuqi_walk_7 副本_png",
"x":0,
"y":1
}
]
}},
"res":{
"mianyangyouzai_stand_5_png":{"x":244,"y":237,"w":68,"h":56},
"mianyangchengshuqi_walk_0 副本_png":{"x":736,"y":89,"w":101,"h":87},
"mianyangchengzhang_walk_0 副本_png":{"x":736,"y":178,"w":79,"h":65},
"mianyangchengzhang_stand_2 副本_png":{"x":82,"y":158,"w":79,"h":66},
"mianyangyouzai_walk_复制2_0 副本_png":{"x":594,"y":246,"w":68,"h":55},
"mianyangyouzai_stand_1_png":{"x":314,"y":245,"w":68,"h":56},
"mianyangyouzai_walk_复制2_1 副本_png":{"x":0,"y":285,"w":68,"h":55},
"mianyangchengzhang_walk_7 副本_png":{"x":640,"y":179,"w":79,"h":65},
"mianyangchengshuqi_walk_2 副本_png":{"x":0,"y":0,"w":104,"h":89},
"mianyangchengzhang_walk_2 副本_png":{"x":920,"y":226,"w":80,"h":64},
"mianyangchengzhang_stand_7 副本_png":{"x":839,"y":177,"w":79,"h":66},
"mianyangchengshuqi_walk_1 副本_png":{"x":319,"y":0,"w":105,"h":88},
"mianyangyouzai_stand_6_png":{"x":721,"y":245,"w":68,"h":56},
"mianyangchengzhang_walk_4 副本_png":{"x":0,"y":91,"w":80,"h":66},
"mianyangchengshuqi_walk_3 副本_png":{"x":842,"y":0,"w":100,"h":88},
"mianyangyouzai_stand_4_png":{"x":524,"y":246,"w":68,"h":55},
"mianyangchengshuqi_stand_7 副本_png":{"x":314,"y":90,"w":100,"h":86},
"mianyangyouzai_walk_复制2_5 副本_png":{"x":860,"y":292,"w":68,"h":55},
"mianyangchengzhang_walk_3 副本_png":{"x":163,"y":179,"w":79,"h":65},
"mianyangyouzai_walk_复制2_2 副本_png":{"x":244,"y":179,"w":68,"h":56},
"mianyangyouzai_walk_复制2_4 副本_png":{"x":930,"y":292,"w":68,"h":55},
"mianyangyouzai_stand_2_png":{"x":384,"y":245,"w":68,"h":56},
"mianyangchengshuqi_walk_5 副本_png":{"x":212,"y":0,"w":105,"h":88},
"mianyangchengshuqi_stand_1_png":{"x":530,"y":0,"w":102,"h":88},
"mianyangchengshuqi_stand_6 副本_png":{"x":416,"y":90,"w":99,"h":86},
"mianyangyouzai_stand_7_png":{"x":0,"y":227,"w":68,"h":56},
"mianyangyouzai_walk_复制2_6 副本_png":{"x":944,"y":0,"w":68,"h":56},
"mianyangchengshuqi_stand_5 副本_png":{"x":839,"y":90,"w":98,"h":85},
"mianyangchengshuqi_walk_4 副本_png":{"x":738,"y":0,"w":102,"h":87},
"mianyangchengzhang_stand_6 副本_png":{"x":478,"y":178,"w":79,"h":65},
"mianyangyouzai_stand_3_png":{"x":454,"y":245,"w":68,"h":56},
"mianyangchengzhang_stand_3 副本_png":{"x":314,"y":178,"w":80,"h":65},
"mianyangchengzhang_walk_6 副本_png":{"x":81,"y":226,"w":80,"h":64},
"mianyangchengshuqi_walk_6 副本_png":{"x":106,"y":0,"w":104,"h":89},
"mianyangchengzhang_walk_5 副本_png":{"x":939,"y":90,"w":80,"h":66},
"mianyangchengzhang_stand_4 副本_png":{"x":82,"y":91,"w":81,"h":65},
"mianyangchengshuqi_walk_7 副本_png":{"x":634,"y":89,"w":100,"h":88},
"mianyangyouzai_walk_复制2_3 副本_png":{"x":70,"y":292,"w":68,"h":55},
"mianyangchengzhang_stand_5 副本_png":{"x":396,"y":178,"w":80,"h":65},
"mianyangyouzai_walk_复制2_7 副本_png":{"x":163,"y":246,"w":68,"h":55},
"mianyangchengshuqi_stand_2 副本_png":{"x":426,"y":0,"w":102,"h":88},
"mianyangchengshuqi_stand_4 副本_png":{"x":517,"y":90,"w":98,"h":86},
"mianyangchengzhang_stand_0_png":{"x":559,"y":179,"w":79,"h":65},
"mianyangyouzai_stand_0_png":{"x":791,"y":245,"w":67,"h":56},
"mianyangchengzhang_walk_1 副本_png":{"x":0,"y":159,"w":79,"h":66},
"mianyangchengshuqi_stand_0_png":{"x":634,"y":0,"w":102,"h":87},
"mianyangchengzhang_stand_1_png":{"x":939,"y":158,"w":79,"h":66},
"mianyangchengshuqi_stand_3 副本_png":{"x":212,"y":90,"w":100,"h":87}
}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Some files were not shown because too many files have changed in this diff Show More