1
This commit is contained in:
parent
256b236b91
commit
3489adc7b9
@ -73,7 +73,6 @@ CREATE TABLE `t_user` (
|
|||||||
`ride_car_kills` bigint NOT NULL DEFAULT '0' COMMENT '驾驶或乘坐载具累计击杀X个敌人',
|
`ride_car_kills` bigint NOT NULL DEFAULT '0' COMMENT '驾驶或乘坐载具累计击杀X个敌人',
|
||||||
`to_teammate_like_times` bigint NOT NULL DEFAULT '0' COMMENT '给队友点赞次数',
|
`to_teammate_like_times` bigint NOT NULL DEFAULT '0' COMMENT '给队友点赞次数',
|
||||||
`consume_gold` bigint NOT NULL DEFAULT '0' COMMENT '消费金币数',
|
`consume_gold` bigint NOT NULL DEFAULT '0' COMMENT '消费金币数',
|
||||||
`max_alive_time` bigint NOT NULL DEFAULT '0' COMMENT '最高存活时间',
|
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
PRIMARY KEY (`idx`),
|
PRIMARY KEY (`idx`),
|
||||||
|
@ -58,7 +58,7 @@ class UserController extends BaseAuthedController {
|
|||||||
$addItems = array();
|
$addItems = array();
|
||||||
{
|
{
|
||||||
foreach (mt\Parameter::getListValue('creator_hero_id') as $heroId) {
|
foreach (mt\Parameter::getListValue('creator_hero_id') as $heroId) {
|
||||||
$heroMeta = mt\Hero::get($heroId);
|
$heroMeta = mt\Item::get($heroId);
|
||||||
if ($heroMeta) {
|
if ($heroMeta) {
|
||||||
Hero::addHero($heroMeta);
|
Hero::addHero($heroMeta);
|
||||||
array_push($heroList, $heroMeta);
|
array_push($heroList, $heroMeta);
|
||||||
@ -70,7 +70,7 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
foreach (mt\Parameter::getListValue('creator_present_items') as $itemsStr) {
|
foreach (mt\Parameter::getListValue('creator_present_items') as $itemsStr) {
|
||||||
list($itemId, $itemNum) = explode(':', $itemStr);
|
list($itemId, $itemNum) = explode(':', $itemsStr);
|
||||||
if ($itemNum > 0) {
|
if ($itemNum > 0) {
|
||||||
switch ($itemId) {
|
switch ($itemId) {
|
||||||
case V_ITEM_GOLD:
|
case V_ITEM_GOLD:
|
||||||
@ -116,7 +116,7 @@ class UserController extends BaseAuthedController {
|
|||||||
$headId = !empty($headList) ? $headList[rand() % count($headList)] : 0;
|
$headId = !empty($headList) ? $headList[rand() % count($headList)] : 0;
|
||||||
$headFrame = !empty($headFrameList) ? $headFrameList[rand() % count($headFrameList)] : 0;
|
$headFrame = !empty($headFrameList) ? $headFrameList[rand() % count($headFrameList)] : 0;
|
||||||
$heroId = !empty($heroList) ? $heroList[rand() % count($heroList)]['id'] : 0;
|
$heroId = !empty($heroList) ? $heroList[rand() % count($heroList)]['id'] : 0;
|
||||||
if ($headId == 0) {
|
if ($headId == 0 || count($headList) <= 1) {
|
||||||
$headId = !empty($haveHeadHeroList) ?
|
$headId = !empty($haveHeadHeroList) ?
|
||||||
$haveHeadHeroList[rand() % count($haveHeadHeroList)]['hero_head'] : 0;
|
$haveHeadHeroList[rand() % count($haveHeadHeroList)]['hero_head'] : 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,6 @@ class Hero extends BaseModel {
|
|||||||
|
|
||||||
public static function addHero($heroMeta)
|
public static function addHero($heroMeta)
|
||||||
{
|
{
|
||||||
$defSkin = mt\Hero::getDefaultSkin($heroMeta);
|
|
||||||
SqlHelper::upsert(
|
SqlHelper::upsert(
|
||||||
myself()->_getSelfMysql(),
|
myself()->_getSelfMysql(),
|
||||||
't_hero',
|
't_hero',
|
||||||
@ -52,7 +51,7 @@ class Hero extends BaseModel {
|
|||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
'hero_id' => $heroMeta['id'],
|
'hero_id' => $heroMeta['id'],
|
||||||
'hero_lv' => 1,
|
'hero_lv' => 1,
|
||||||
'skin_id' => $defSkin,
|
#'skin_id' => $defSkin,
|
||||||
'skill_lv1' => 1,
|
'skill_lv1' => 1,
|
||||||
'skill_lv2' => 1,
|
'skill_lv2' => 1,
|
||||||
'yoke_lv' => 0,
|
'yoke_lv' => 0,
|
||||||
|
@ -16,7 +16,7 @@ class User extends BaseModel {
|
|||||||
'account_id' => $row['account_id'],
|
'account_id' => $row['account_id'],
|
||||||
'name' => $row['name'],
|
'name' => $row['name'],
|
||||||
'sex' => $row['sex'],
|
'sex' => $row['sex'],
|
||||||
'head_id' => $row['hero_id'],
|
'head_id' => $row['head_id'],
|
||||||
'head_frame' => $row['head_frame'],
|
'head_frame' => $row['head_frame'],
|
||||||
'level' => $row['level'],
|
'level' => $row['level'],
|
||||||
'exp' => $row['exp'],
|
'exp' => $row['exp'],
|
||||||
@ -39,7 +39,7 @@ class User extends BaseModel {
|
|||||||
'account_id' => $row['account_id'],
|
'account_id' => $row['account_id'],
|
||||||
'name' => $row['name'],
|
'name' => $row['name'],
|
||||||
'sex' => $row['sex'],
|
'sex' => $row['sex'],
|
||||||
'head_id' => $row['hero_id'],
|
'head_id' => $row['head_id'],
|
||||||
'head_frame' => $row['head_frame'],
|
'head_frame' => $row['head_frame'],
|
||||||
'level' => $row['level'],
|
'level' => $row['level'],
|
||||||
'exp' => $row['exp'],
|
'exp' => $row['exp'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user