|
@@ -180,23 +180,23 @@ class StoreProc {
|
|
|
|
|
|
public static function DailyRefreshWeapon($npcid = null) {
|
|
|
//没有数据初始化,有数据不在管
|
|
|
- if ($npcid != null && !StlUtil::dictHasProperty(ctx()->store()->weaponPool, $npcid)) {
|
|
|
- $ret = new \stdClass();
|
|
|
+ if ($npcid != null && !StlUtil::dictHasProperty(ctx()->store()->weaponPool, $npcid)) {
|
|
|
$list = GameConfig::shop_weapon_getItemArray($npcid);
|
|
|
|
|
|
foreach ($list as $value) {
|
|
|
+ $ret = new \stdClass();
|
|
|
$arr = explode(';', $value->weaponlist);
|
|
|
foreach ($arr as $item) {
|
|
|
$itemList = explode(',', $item);
|
|
|
$id = $itemList[0];
|
|
|
$per = $itemList[1];
|
|
|
$ret->$id = $per;
|
|
|
- }
|
|
|
+ }
|
|
|
$retArr = array();
|
|
|
$type = $value->id;
|
|
|
$pArr = self::randweapon($ret, $value->num);
|
|
|
//数组合并
|
|
|
- $retArr = array_merge($retArr, $pArr);
|
|
|
+ $retArr = array_merge($retArr, $pArr);
|
|
|
ctx()->store()->weaponPool->$npcid->$type = $retArr;
|
|
|
}
|
|
|
} else {
|