2 次代碼提交 732fc480b4 ... 9b7baeb5e9

作者 SHA1 備註 提交日期
  SunnyLinSD 9b7baeb5e9 Merge branch '0.6' of http://svn.ouj.com:3000/DWG/allstar into 0.6 6 年之前
  SunnyLinSD a1f0d044a8 修复到city5时满级会出现艺人无法入驻的问题 6 年之前
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 4 1
      assets/scripts/levelHome/LevelHome.js
  2. 2 1
      assets/scripts/levelHome/LevelHomeItem.js

+ 4 - 1
assets/scripts/levelHome/LevelHome.js

@@ -2,6 +2,7 @@ const HomeApi = require("../net/HomeApi");
 const GameModule = require("../utils/GameModule");
 const { GameNotificationKey } = require("../utils/GameEnum")
 const AlertManager = require('../utils/AlertManager')
+const CityList = require("../data/city");
 cc.Class({
     extends: cc.Component,
 
@@ -227,7 +228,9 @@ cc.Class({
                     this._unlockBuilding[index] = model.isUnlocked ? 1 : 0;
                     if (model.isFull() && this.cityId === Global.devCityId) {
                         try {
-                            GameEvent.fire(GameNotificationKey.LevelHomeItemBuildingFull);
+                            if (this.cityId != CityList[CityList.length-1].id) {
+                                GameEvent.fire(GameNotificationKey.LevelHomeItemBuildingFull);   
+                            }
                         } catch (error) {
                             console.log(error);
                         }

+ 2 - 1
assets/scripts/levelHome/LevelHomeItem.js

@@ -4,6 +4,7 @@ const { RoomState, GameNotificationKey, LevelHomeArtistItemStyle } = require("..
 const GameModule = require("../utils/GameModule");
 const ThemeManager = require("../utils/ThemeManger");
 const HomeApi = require("../net/HomeApi");
+const CityList = require("../data/city");
 // const StateMachine = require('../lib/StateMachine');
 // const StateMachineHistory = require('../lib/StateMachineHistory');
 
@@ -811,7 +812,7 @@ cc.Class({
         this.config(buildModel, this.uid);
 
         // 如果满级了, 就发通知告诉userinfo
-        if (buildModel.hasNext != 1) {
+        if (buildModel.hasNext != 1 && this.cityId != CityList[CityList.length-1].id) {
             GameEvent.fire(GameNotificationKey.LevelHomeItemBuildingFull);
         }