浏览代码

Merge branch 'dev' of http://ylsjtt.game7000.com:3000/YLSJ/jzhj2024server into dev

wanggangzero 9 月之前
父节点
当前提交
d6c38a7a80
共有 3 个文件被更改,包括 11 次插入8 次删除
  1. 3 2
      Gameserver/App/process/HeroProc.php
  2. 1 1
      Gameserver/App/process/StoreProc.php
  3. 7 5
      Gameserver/App/process/TaskProc.php

+ 3 - 2
Gameserver/App/process/HeroProc.php

@@ -164,8 +164,8 @@ class HeroProc {
         if ($heroTypeId != 0) {
             $dic = ctx()->heros->Dic;
             foreach ($dic as $heroItem) {
-                $hero = GameConfig::hero_getItem($heroItem->id);
-                if ($hero->typeID == $heroTypeId) {
+                $hero = GameConfig::hero_getItem($heroItem->Id);
+                if ($hero->typeID == $heroTypeId && $heroItem->isUnlock == 1) {
                     $tag = true;
                     break;
                 }
@@ -183,6 +183,7 @@ class HeroProc {
                         HeroProc::UnlockNewHero($tMo->id);
                         ctx()->heros->roleCardUnlockHeroList[] = $tMo->id;
                         
+                        StoreProc::$reward[] = $itemId.',1'; 
                         //StoreProc::$reward_hero[] = $tMo->id;
                     } else {
                         StoreProc::AddMultiItemInStore($tMo->heroDebris_need);

+ 1 - 1
Gameserver/App/process/StoreProc.php

@@ -767,7 +767,7 @@ class StoreProc {
 
             list($itemId, $num) = $val;                                         # ID, 数量           
             $itemMo = GameConfig::item_getItem($itemId);
-            if($itemMo->itemType != 701 && $itemMo->itemType != 201 && $src != 1){               
+            if($itemMo->itemType != 701 && $itemMo->itemType != 201 && $itemMo->itemType != 502 && $src != 1){               
                 self::$reward[] = $value;                                                   
             }           
             

+ 7 - 5
Gameserver/App/process/TaskProc.php

@@ -100,9 +100,11 @@ class TaskProc {
                 break;
         }
 
-        $str = "5," . $point;
-        StoreProc::$reward[] = $str;
-
+        if($point != 0){
+            $str = "5," . $point;
+            StoreProc::$reward[] = $str;
+        }
+        
         UserProc::updateUserInfo();
         return Resp::ok(array("task" => ctx()->task,
                     "store" => ctx()->store,
@@ -110,7 +112,7 @@ class TaskProc {
                     'reward_Gem' => StoreProc::$reward_Gem,
                     'gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
-                    'hero'=> ctx()->heros,
+                    'heros'=> ctx()->heros,
         ));
     }
 
@@ -153,7 +155,7 @@ class TaskProc {
                     'reward_Gem' => StoreProc::$reward_Gem,
                     'gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
-                    'reward_hero'=> StoreProc::$reward_hero,
+                    'heros'=> ctx()->heros,
         ));
     }