1
This commit is contained in:
parent
a39eaf6e0a
commit
aa6c1e98bf
@ -15,7 +15,7 @@ class Team(object):
|
|||||||
_common.ReqHead(),
|
_common.ReqHead(),
|
||||||
['node_id', 0, '节点id'],
|
['node_id', 0, '节点id'],
|
||||||
['map_id', 0, '地图id'],
|
['map_id', 0, '地图id'],
|
||||||
['match_mode', 0, '0: 匹配赛模式 1: 排位赛 3: pve'],
|
['match_mode', 0, '0: 匹配赛模式 1: 排位赛 2: pve'],
|
||||||
['pve_instance_id', 0, 'pve副本id'],
|
['pve_instance_id', 0, 'pve副本id'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
|
@ -701,6 +701,7 @@ class Chip(object):
|
|||||||
['strength', '', '前一天体力值'],
|
['strength', '', '前一天体力值'],
|
||||||
['strength_temporary', '', '升级成功所得出的总体力值'],
|
['strength_temporary', '', '升级成功所得出的总体力值'],
|
||||||
['mint', '', '所需mint费'],
|
['mint', '', '所需mint费'],
|
||||||
|
['belong_to_item_id', '', '所镶嵌的英雄或枪械的item id'],
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -94,9 +94,31 @@ class Chip extends BaseModel
|
|||||||
$row['rand_attr'] = $attrs;
|
$row['rand_attr'] = $attrs;
|
||||||
$row['today_get_gold'] = $todayGetGold;
|
$row['today_get_gold'] = $todayGetGold;
|
||||||
$row['last_get_gold_time'] = $lastGetGoldTime;
|
$row['last_get_gold_time'] = $lastGetGoldTime;
|
||||||
|
$row['belong_to_item_id'] = self::belongsToWhere($row);
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function belongsToWhere($row){
|
||||||
|
if ($row['chip_type'] == 1){
|
||||||
|
$heroDb = array();
|
||||||
|
Hero::getHeroList(function ($hero) use ($row,&$heroDb) {
|
||||||
|
if ($hero['chip_ids'] && strstr($hero['chip_ids']."|",strval($row['idx']."|")) ){
|
||||||
|
$heroDb = $hero;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return $heroDb['hero_id'];
|
||||||
|
}
|
||||||
|
if ($row['chip_type'] == 2){
|
||||||
|
$gunDb = array();
|
||||||
|
Gun::getGunList(function ($gun) use($row,&$gunDb) {
|
||||||
|
if ($gun['chip_ids'] && strstr($gun['chip_ids']."|",strval($row['idx']."|")) ){
|
||||||
|
$gunDb = $gun;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return $gunDb['gun_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function addChip($itemId, $tokenId)
|
public static function addChip($itemId, $tokenId)
|
||||||
{
|
{
|
||||||
return self::internalAddItem(
|
return self::internalAddItem(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user