瀏覽代碼

清理活跃点bug

cyzhao 11 月之前
父節點
當前提交
0ccec213a2
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Gameserver/App/process/TaskProc.php

+ 2 - 1
Gameserver/App/process/TaskProc.php

@@ -319,7 +319,8 @@ class TaskProc {
      */
      */
     static function clearActivePointRewardReceived($type = 1) {
     static function clearActivePointRewardReceived($type = 1) {
         $reward = ctx()->task->activePointReceived;
         $reward = ctx()->task->activePointReceived;
-        for ($i = 0; $i < count($reward); $i++) {
+        $num = count($reward);
+        for ($i = 0; $i < $num; $i++) {
             $arr = explode('-', $reward[$i]);
             $arr = explode('-', $reward[$i]);
             if($arr[0] == $type){
             if($arr[0] == $type){
                 StlUtil::arrayRemoveAt(ctx()->task->activePointReceived,$i); 
                 StlUtil::arrayRemoveAt(ctx()->task->activePointReceived,$i);