hero升级&&GIFT标签
This commit is contained in:
parent
400627a4ed
commit
efed668b2f
@ -187,7 +187,7 @@ class Gun(object):
|
|||||||
{
|
{
|
||||||
'name': 'getUpgradeQualityList',
|
'name': 'getUpgradeQualityList',
|
||||||
'desc': '获取升阶中的枪械列表',
|
'desc': '获取升阶中的枪械列表',
|
||||||
'group': 'Hero',
|
'group': 'Gun',
|
||||||
'url': 'webapp/index.php?c=Hero&a=getUpgradeQualityList',
|
'url': 'webapp/index.php?c=Hero&a=getUpgradeQualityList',
|
||||||
'params': [
|
'params': [
|
||||||
_common.ReqHead(),
|
_common.ReqHead(),
|
||||||
|
16
doc/Hero.py
16
doc/Hero.py
@ -227,6 +227,22 @@ class Hero(object):
|
|||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
['property_chg', _common.PropertyChg(), '属性变更'],
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||||
]
|
]
|
||||||
|
},{
|
||||||
|
'name': 'upgradeLv',
|
||||||
|
'desc': '升级',
|
||||||
|
'group': 'Hero',
|
||||||
|
'url': 'webapp/index.php?c=Hero&a=upgradeLv',
|
||||||
|
'params': [
|
||||||
|
_common.ReqHead(),
|
||||||
|
['hero_uniid', 0, '英雄唯一id'],
|
||||||
|
['cost_hero_uniid', 0, '材料英雄id(非必选参数--4|9|14等级必选)'],
|
||||||
|
],
|
||||||
|
'response': [
|
||||||
|
_common.RspHead(),
|
||||||
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||||
|
['old_hero', _common.Hero(), '英雄-老'],
|
||||||
|
['new_hero', _common.Hero(), '英雄-新'],
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -78,7 +78,7 @@ class Gun(object):
|
|||||||
['token_id', '', 'token id'],
|
['token_id', '', 'token id'],
|
||||||
['gun_uniid', 0, '枪唯一id'],
|
['gun_uniid', 0, '枪唯一id'],
|
||||||
['gun_id', 0, '枪id'],
|
['gun_id', 0, '枪id'],
|
||||||
['state', 0, '0:已购买 1:体验中'],
|
['state', 0, '0:已购买 1:免费(GIFT标签)'],
|
||||||
['gun_lv', 0, '枪等级'],
|
['gun_lv', 0, '枪等级'],
|
||||||
['quality', 0, '品阶'],
|
['quality', 0, '品阶'],
|
||||||
['durability', 0, '耐久'],
|
['durability', 0, '耐久'],
|
||||||
@ -239,7 +239,7 @@ class Hero(object):
|
|||||||
['hero_lv', 0, '英雄等级'],
|
['hero_lv', 0, '英雄等级'],
|
||||||
['hero_tili', 0, '英雄体力'],
|
['hero_tili', 0, '英雄体力'],
|
||||||
['hero_tili_max', 0, '英雄最大体力'],
|
['hero_tili_max', 0, '英雄最大体力'],
|
||||||
['state', 0, '0:已购买 1:体验中'],
|
['state', 0, '0:已购买 1:免费(GIFT标签)'],
|
||||||
['skin_id', 0, '英雄皮肤id'],
|
['skin_id', 0, '英雄皮肤id'],
|
||||||
['quality', 0, '品阶'],
|
['quality', 0, '品阶'],
|
||||||
['skill_lv1', 0, '主动技能等级'],
|
['skill_lv1', 0, '主动技能等级'],
|
||||||
@ -798,7 +798,7 @@ class Chip(object):
|
|||||||
['item_num', 0, '道具数量'],
|
['item_num', 0, '道具数量'],
|
||||||
['chip_grade', 0, '芯片等级'],
|
['chip_grade', 0, '芯片等级'],
|
||||||
['chip_type', 0, '芯片类型:1 攻击;2 防御;3 辅助'],
|
['chip_type', 0, '芯片类型:1 攻击;2 防御;3 辅助'],
|
||||||
['state', 0, '状态:0 免费;1 常规'],
|
['state', 0, '0:已购买 1:免费(GIFT标签)'],
|
||||||
['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'],
|
['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'],
|
||||||
['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'],
|
['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'],
|
||||||
['!rand_attr', [ChipAttr()], '属性'],
|
['!rand_attr', [ChipAttr()], '属性'],
|
||||||
|
@ -146,7 +146,7 @@ class ChipController extends BaseAuthedController
|
|||||||
$this->_rspErr(1, "Unable to use nft chip");
|
$this->_rspErr(1, "Unable to use nft chip");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!$chipDbParam['state']) {
|
if ($chipDbParam['state'] == Chip::FREE_STATE) {
|
||||||
$this->_rspErr(1, "Unable to use free chip");
|
$this->_rspErr(1, "Unable to use free chip");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ class ChipController extends BaseAuthedController
|
|||||||
Chip::update2($idxMain,
|
Chip::update2($idxMain,
|
||||||
array(
|
array(
|
||||||
'chip_grade' => $chipDbMain['chip_grade']+1,
|
'chip_grade' => $chipDbMain['chip_grade']+1,
|
||||||
'state' => 1,
|
'state' => Chip::GETED_STATE,
|
||||||
'rand_attr' => json_encode($rand_attr),
|
'rand_attr' => json_encode($rand_attr),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -830,6 +830,10 @@ class GunController extends BaseAuthedController {
|
|||||||
$this->_rspErr(100, 'NFT cannot be a material');
|
$this->_rspErr(100, 'NFT cannot be a material');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($costGunDb['state'] == Gun::FREE_STATE){
|
||||||
|
$this->_rspErr(100, 'Unable to use free gun');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ($gunDb['gun_lv'] != $costGunDb['gun_lv']){
|
if ($gunDb['gun_lv'] != $costGunDb['gun_lv']){
|
||||||
$this->_rspErr(100, 'You need the same level to do it');
|
$this->_rspErr(100, 'You need the same level to do it');
|
||||||
return;
|
return;
|
||||||
@ -859,6 +863,7 @@ class GunController extends BaseAuthedController {
|
|||||||
Gun::update($gunUniId,
|
Gun::update($gunUniId,
|
||||||
array(
|
array(
|
||||||
'gun_lv' => $gunDb['gun_lv'] + 1,
|
'gun_lv' => $gunDb['gun_lv'] + 1,
|
||||||
|
'state' => 1,
|
||||||
'rand_attr' => json_encode($attrs),
|
'rand_attr' => json_encode($attrs),
|
||||||
));
|
));
|
||||||
Gun::update($costGunUniId,
|
Gun::update($costGunUniId,
|
||||||
|
@ -952,4 +952,81 @@ class HeroController extends BaseAuthedController {
|
|||||||
'old_hero'=>Hero::toDto($oldHeroDb)
|
'old_hero'=>Hero::toDto($oldHeroDb)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function upgradeLv()
|
||||||
|
{
|
||||||
|
$heroUniId = getReqVal('hero_uniid', 0);
|
||||||
|
$costHeroUniId = getReqVal('cost_hero_uniid', 0);
|
||||||
|
$heroDb = Hero::find($heroUniId);
|
||||||
|
$oldHero = Hero::toDto($heroDb);
|
||||||
|
$costHeroDb = Hero::findEx($costHeroUniId);
|
||||||
|
if (!$heroDb) {
|
||||||
|
$this->_rspErr(100, 'param error or null');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($heroDb['hero_lv'] == Hero::LV_1 ||
|
||||||
|
$heroDb['hero_lv'] == Hero::LV_2 ||
|
||||||
|
$heroDb['hero_lv'] == Hero::LV_3 ){
|
||||||
|
if (! $costHeroDb){
|
||||||
|
$this->_rspErr(100, 'material param error or null');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($costHeroDb['token_id']){
|
||||||
|
$this->_rspErr(100, 'NFT cannot be a material');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($costHeroDb['state'] == Hero::FREE_STATE){
|
||||||
|
$this->_rspErr(100, 'Unable to use free hero');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($heroDb['hero_lv'] != $costHeroDb['hero_lv']){
|
||||||
|
$this->_rspErr(100, 'You need the same level to do it');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$heroMeta = mt\Hero::get($heroDb['hero_id']);
|
||||||
|
if (!$heroMeta) {
|
||||||
|
$this->_rspErr(100, 'server internal error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$nextLevelMeta = mt\HeroLevelAttr::getByLevel($heroDb['hero_lv'] + 1);
|
||||||
|
if (!$nextLevelMeta) {
|
||||||
|
$this->_rspErr(5, "It's already the highest level");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//升级所需消耗
|
||||||
|
// $costItems = array();
|
||||||
|
// $lackItem = null;
|
||||||
|
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
|
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// $this->_decItems($costItems);
|
||||||
|
|
||||||
|
$attrs = mt\HeroLevelAttr::addRandAttrNew($heroDb,1);
|
||||||
|
Hero::update($heroUniId, array(
|
||||||
|
'hero_lv' => $heroDb['hero_lv'] + 1,
|
||||||
|
'rand_attr' => json_encode($attrs),
|
||||||
|
'state' => Hero::GETED_STATE,
|
||||||
|
'skill_points' => $heroDb['skill_points']+$nextLevelMeta['skill_point']
|
||||||
|
));
|
||||||
|
if ($costHeroDb){
|
||||||
|
Hero::update($costHeroUniId, array(
|
||||||
|
'account_id' => myself()->_getAccountId() . '!!!',
|
||||||
|
));
|
||||||
|
}
|
||||||
|
if ($heroDb['hero_lv'] + 1 > myself()->_getV(TN_HERO_MAX_LEVEL, 0)) {
|
||||||
|
myself()->_setV(TN_HERO_MAX_LEVEL, 0, $heroDb['hero_lv'] + 1);
|
||||||
|
}
|
||||||
|
$newHero = Hero::toDto(Hero::find($heroUniId));
|
||||||
|
$propertyChgService = new services\PropertyChgService();
|
||||||
|
$propertyChgService->addHeroChg();
|
||||||
|
$propertyChgService->addUserChg();
|
||||||
|
$this->_rspData(array(
|
||||||
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
|
'old_hero' => $oldHero,
|
||||||
|
'new_hero' => $newHero,
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -729,8 +729,8 @@ class UserController extends BaseAuthedController {
|
|||||||
if ($heroMeta['normal_gift'] && !in_array($heroMeta['normal_gift'],$headList)){
|
if ($heroMeta['normal_gift'] && !in_array($heroMeta['normal_gift'],$headList)){
|
||||||
array_push($headList,$heroMeta['normal_gift']);
|
array_push($headList,$heroMeta['normal_gift']);
|
||||||
}
|
}
|
||||||
Hero::addHero($heroMeta);
|
Hero::addFreeHero($heroMeta);
|
||||||
Gun::addGun($gunMeta);
|
Gun::addFreeGun($gunMeta);
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'hero_id' => $temp ? $temp[1] : 0,
|
'hero_id' => $temp ? $temp[1] : 0,
|
||||||
'head_id' => $temp ? $temp[0] : 0,
|
'head_id' => $temp ? $temp[0] : 0,
|
||||||
|
@ -18,6 +18,9 @@ use services\FormulaService;
|
|||||||
|
|
||||||
class Chip extends BaseModel
|
class Chip extends BaseModel
|
||||||
{
|
{
|
||||||
|
const GETED_STATE = 0;
|
||||||
|
const FREE_STATE = 1;
|
||||||
|
|
||||||
const CHIP_LV_MAX = 3;
|
const CHIP_LV_MAX = 3;
|
||||||
|
|
||||||
public static function find($chipUniId)
|
public static function find($chipUniId)
|
||||||
@ -134,6 +137,7 @@ class Chip extends BaseModel
|
|||||||
$fieldsKv = array(
|
$fieldsKv = array(
|
||||||
'item_id' => $itemMeta['id'],
|
'item_id' => $itemMeta['id'],
|
||||||
'item_num' => 1,
|
'item_num' => 1,
|
||||||
|
'state' => self::GETED_STATE,
|
||||||
'rand_attr' => json_encode($randAttr),
|
'rand_attr' => json_encode($randAttr),
|
||||||
'chip_grade' => 1,
|
'chip_grade' => 1,
|
||||||
'chip_type' => $itemMeta['sub_type'],
|
'chip_type' => $itemMeta['sub_type'],
|
||||||
@ -179,6 +183,16 @@ class Chip extends BaseModel
|
|||||||
return $dto;
|
return $dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function addFreeChip($itemMeta)
|
||||||
|
{
|
||||||
|
|
||||||
|
return self::internalAddItem(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
$itemMeta,
|
||||||
|
myself()->_getAccountId(),
|
||||||
|
null,
|
||||||
|
self::FREE_STATE);
|
||||||
|
}
|
||||||
|
|
||||||
public static function addChip($itemMeta)
|
public static function addChip($itemMeta)
|
||||||
{
|
{
|
||||||
@ -187,7 +201,8 @@ class Chip extends BaseModel
|
|||||||
myself()->_getSelfMysql(),
|
myself()->_getSelfMysql(),
|
||||||
$itemMeta,
|
$itemMeta,
|
||||||
myself()->_getAccountId(),
|
myself()->_getAccountId(),
|
||||||
null);
|
null,
|
||||||
|
self::GETED_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function addNftChip($itemMeta,$tokenId)
|
public static function addNftChip($itemMeta,$tokenId)
|
||||||
@ -197,10 +212,11 @@ class Chip extends BaseModel
|
|||||||
myself()->_getMysql($tokenId),
|
myself()->_getMysql($tokenId),
|
||||||
$itemMeta,
|
$itemMeta,
|
||||||
null,
|
null,
|
||||||
$tokenId);
|
$tokenId,
|
||||||
|
self::GETED_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function internalAddItem($conn, $itemMeta, $accountId, $tokenId)
|
public static function internalAddItem($conn, $itemMeta, $accountId, $tokenId,$state)
|
||||||
{
|
{
|
||||||
if (!$itemMeta) {
|
if (!$itemMeta) {
|
||||||
return;
|
return;
|
||||||
@ -223,6 +239,7 @@ class Chip extends BaseModel
|
|||||||
$fieldsKv = array(
|
$fieldsKv = array(
|
||||||
'item_id' => $itemMeta['id'],
|
'item_id' => $itemMeta['id'],
|
||||||
'item_num' => 1,
|
'item_num' => 1,
|
||||||
|
'state' => $state,
|
||||||
'rand_attr' => json_encode($randAttr),
|
'rand_attr' => json_encode($randAttr),
|
||||||
'chip_grade' => 1,
|
'chip_grade' => 1,
|
||||||
'chip_type' => $itemMeta['sub_type'],
|
'chip_type' => $itemMeta['sub_type'],
|
||||||
|
@ -20,7 +20,7 @@ use models\ChipPlugin;
|
|||||||
class Gun extends BaseModel {
|
class Gun extends BaseModel {
|
||||||
|
|
||||||
const GETED_STATE = 0;
|
const GETED_STATE = 0;
|
||||||
const TRY_STATE = 1;
|
const FREE_STATE = 1;
|
||||||
|
|
||||||
const NO_LOCK = 0;
|
const NO_LOCK = 0;
|
||||||
const LEVEL_LOCK = 1;
|
const LEVEL_LOCK = 1;
|
||||||
@ -317,13 +317,24 @@ class Gun extends BaseModel {
|
|||||||
return $dto;
|
return $dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function addFreeGun($gunMeta)
|
||||||
|
{
|
||||||
|
return self::internalAddGun(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
$gunMeta,
|
||||||
|
myself()->_getAccountId(),
|
||||||
|
null,
|
||||||
|
self::FREE_STATE);
|
||||||
|
}
|
||||||
|
|
||||||
public static function addGun($gunMeta)
|
public static function addGun($gunMeta)
|
||||||
{
|
{
|
||||||
return self::internalAddGun(
|
return self::internalAddGun(
|
||||||
myself()->_getSelfMysql(),
|
myself()->_getSelfMysql(),
|
||||||
$gunMeta,
|
$gunMeta,
|
||||||
myself()->_getAccountId(),
|
myself()->_getAccountId(),
|
||||||
null);
|
null,
|
||||||
|
self::GETED_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function addNftGun($gunMeta, $tokenId)
|
public static function addNftGun($gunMeta, $tokenId)
|
||||||
@ -332,10 +343,11 @@ class Gun extends BaseModel {
|
|||||||
myself()->_getMysql($tokenId),
|
myself()->_getMysql($tokenId),
|
||||||
$gunMeta,
|
$gunMeta,
|
||||||
null,
|
null,
|
||||||
$tokenId);
|
$tokenId,
|
||||||
|
self::GETED_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function internalAddGun($conn, $gunMeta, $accountId, $tokenId)
|
private static function internalAddGun($conn, $gunMeta, $accountId, $tokenId,$state)
|
||||||
{
|
{
|
||||||
$randAttr = array();
|
$randAttr = array();
|
||||||
{
|
{
|
||||||
@ -348,7 +360,7 @@ class Gun extends BaseModel {
|
|||||||
'gun_id' => $gunMeta['id'],
|
'gun_id' => $gunMeta['id'],
|
||||||
'gun_lv' => 1,
|
'gun_lv' => 1,
|
||||||
'quality' => 1,
|
'quality' => 1,
|
||||||
'state' => self::GETED_STATE,
|
'state' => $state,
|
||||||
'durability' => FormulaService::Weapon_NFT_Maximum_Durability(1,FormulaService::Weapon_Advanced_Lucky_Value(1)),
|
'durability' => FormulaService::Weapon_NFT_Maximum_Durability(1,FormulaService::Weapon_Advanced_Lucky_Value(1)),
|
||||||
'rand_attr' => json_encode($randAttr),
|
'rand_attr' => json_encode($randAttr),
|
||||||
'lock_type' => self::NO_LOCK,
|
'lock_type' => self::NO_LOCK,
|
||||||
@ -396,7 +408,7 @@ class Gun extends BaseModel {
|
|||||||
'gun_id' => $gunMeta['id'],
|
'gun_id' => $gunMeta['id'],
|
||||||
'gun_lv' => 1,
|
'gun_lv' => 1,
|
||||||
'quality' => 1,
|
'quality' => 1,
|
||||||
'state' => self::TRY_STATE,
|
'state' => self::FREE_STATE,
|
||||||
'try_count' => $tryCount,
|
'try_count' => $tryCount,
|
||||||
'durability' => $gunMeta['init_durability'],
|
'durability' => $gunMeta['init_durability'],
|
||||||
'rand_attr' => json_encode($randAttr),
|
'rand_attr' => json_encode($randAttr),
|
||||||
|
@ -27,13 +27,17 @@ use models\ChipPlugin;
|
|||||||
class Hero extends BaseModel {
|
class Hero extends BaseModel {
|
||||||
|
|
||||||
const GETED_STATE = 0;
|
const GETED_STATE = 0;
|
||||||
const TRY_STATE = 1;
|
const FREE_STATE = 1;
|
||||||
|
|
||||||
const NO_LOCK = 0;
|
const NO_LOCK = 0;
|
||||||
const LEVEL_LOCK = 1;
|
const LEVEL_LOCK = 1;
|
||||||
const QUALITY_LOCK = 2;
|
const QUALITY_LOCK = 2;
|
||||||
const SEND_LOCK = 3;
|
const SEND_LOCK = 3;
|
||||||
const COST_LOCK = 4;
|
const COST_LOCK = 4;
|
||||||
|
//需要材料所需等级
|
||||||
|
const LV_1 = 4;
|
||||||
|
const LV_2 = 9;
|
||||||
|
const LV_3 = 14;
|
||||||
|
|
||||||
public static function find($heroUniId)
|
public static function find($heroUniId)
|
||||||
{
|
{
|
||||||
@ -48,6 +52,11 @@ class Hero extends BaseModel {
|
|||||||
'idx' => $heroUniId,
|
'idx' => $heroUniId,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if ($row) {
|
||||||
|
if ($row['account_id'] != myself()->_getAccountId()) {
|
||||||
|
$row = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,13 +323,24 @@ class Hero extends BaseModel {
|
|||||||
return $dto;
|
return $dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function addFreeHero($heroMeta)
|
||||||
|
{
|
||||||
|
return self::internalAddHero(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
$heroMeta,
|
||||||
|
myself()->_getAccountId(),
|
||||||
|
null,
|
||||||
|
self::FREE_STATE);
|
||||||
|
}
|
||||||
|
|
||||||
public static function addHero($heroMeta)
|
public static function addHero($heroMeta)
|
||||||
{
|
{
|
||||||
return self::internalAddHero(
|
return self::internalAddHero(
|
||||||
myself()->_getSelfMysql(),
|
myself()->_getSelfMysql(),
|
||||||
$heroMeta,
|
$heroMeta,
|
||||||
myself()->_getAccountId(),
|
myself()->_getAccountId(),
|
||||||
null);
|
null,
|
||||||
|
self::GETED_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function addNftHero($heroMeta, $tokenId)
|
public static function addNftHero($heroMeta, $tokenId)
|
||||||
@ -329,10 +349,11 @@ class Hero extends BaseModel {
|
|||||||
myself()->_getMysql($tokenId),
|
myself()->_getMysql($tokenId),
|
||||||
$heroMeta,
|
$heroMeta,
|
||||||
null,
|
null,
|
||||||
$tokenId);
|
$tokenId,
|
||||||
|
self::GETED_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function internalAddHero($conn, $heroMeta, $accountId, $tokenId)
|
public static function internalAddHero($conn, $heroMeta, $accountId, $tokenId,$state)
|
||||||
{
|
{
|
||||||
$realHeroMeta = mt\Hero::get($heroMeta['id']);
|
$realHeroMeta = mt\Hero::get($heroMeta['id']);
|
||||||
$randAttr = array();
|
$randAttr = array();
|
||||||
@ -341,7 +362,7 @@ class Hero extends BaseModel {
|
|||||||
'hero_lv' => 1,
|
'hero_lv' => 1,
|
||||||
'quality' => 1,
|
'quality' => 1,
|
||||||
'hero_tili' => FormulaService::Hero_NFT_Maximum_Physical_Strength(1,FormulaService::Hero_Advanced_Lucky_Value(1)),
|
'hero_tili' => FormulaService::Hero_NFT_Maximum_Physical_Strength(1,FormulaService::Hero_Advanced_Lucky_Value(1)),
|
||||||
'state' => self::GETED_STATE,
|
'state' => $state,
|
||||||
'skill_lv1' => 1,
|
'skill_lv1' => 1,
|
||||||
'skill_lv2' => 1,
|
'skill_lv2' => 1,
|
||||||
'rand_attr' => json_encode($randAttr),
|
'rand_attr' => json_encode($randAttr),
|
||||||
@ -393,7 +414,7 @@ class Hero extends BaseModel {
|
|||||||
'hero_lv' => 1,
|
'hero_lv' => 1,
|
||||||
'quality' => 1,
|
'quality' => 1,
|
||||||
'hero_tili' => $realHeroMeta ? $realHeroMeta['tili'] : 0,
|
'hero_tili' => $realHeroMeta ? $realHeroMeta['tili'] : 0,
|
||||||
'state' => self::TRY_STATE,
|
'state' => self::FREE_STATE,
|
||||||
'try_count' => $tryCount,
|
'try_count' => $tryCount,
|
||||||
'skill_lv1' => 1,
|
'skill_lv1' => 1,
|
||||||
'skill_lv2' => 1,
|
'skill_lv2' => 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user