|
@@ -271,7 +271,7 @@ class StoreProc {
|
|
|
if($index % $composeNum == 0){
|
|
|
$res +=1;
|
|
|
$composeGem = self::initGem($gemConf->typeId);
|
|
|
- self::PutGemInStore2($composeGem,$maxGemNum);
|
|
|
+ self::PutGemInStore2($composeGem);
|
|
|
$composeArr[] = $composeGem;//临时放这
|
|
|
}
|
|
|
|
|
@@ -668,7 +668,7 @@ class StoreProc {
|
|
|
/**
|
|
|
* 新宝石入库
|
|
|
*/
|
|
|
- public static function PutGemInStore($id,$num) {
|
|
|
+ public static function PutGemInStore($id,$num=1) {
|
|
|
for ($i = 0; $i < $num; $i++) {
|
|
|
$gem = self::initGem($id);
|
|
|
$length = $gem->uid;
|
|
@@ -677,7 +677,7 @@ class StoreProc {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static function PutGemInStore2($gem,$num) {
|
|
|
+ public static function PutGemInStore2($gem,$num=1) {
|
|
|
for ($i = 0; $i < $num; $i++) {
|
|
|
$length = $gem->uid;
|
|
|
ctx()->store->gemStore->$length = $gem;
|
|
@@ -716,7 +716,7 @@ class StoreProc {
|
|
|
*/
|
|
|
public static function RandomGemPredicateId($id) {
|
|
|
|
|
|
- return 0;
|
|
|
+ return 40;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -736,5 +736,23 @@ class StoreProc {
|
|
|
|
|
|
return $tag == true?0:1;
|
|
|
}
|
|
|
+ //临时代码
|
|
|
+ public static function InitGemInfo() {
|
|
|
+ if(count((array)ctx()->store->gemStore) > 0){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ $index = 0;
|
|
|
+ $gem = GameConfig::gem();
|
|
|
+ foreach ($gem as $key => $value) {
|
|
|
+ self::PutGemInStore($value->typeId);
|
|
|
+ $index += 1;
|
|
|
+ if($index >= 21){
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|