فهرست منبع

fixed 遗失神庙相关推送问题

mafei 1 سال پیش
والد
کامیت
dc128058b0
1فایلهای تغییر یافته به همراه24 افزوده شده و 34 حذف شده
  1. 24 34
      script/module/lostTemple/lostTempleLogic.lua

+ 24 - 34
script/module/lostTemple/lostTempleLogic.lua

@@ -42,23 +42,23 @@ end
 
 
 --
 --
 local function isOpen(human)
 local function isOpen(human)
-    --local openDay = CommonDB.getServerOpenDay()
-    --if not openDay then
-    --    return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    --end
-    --
-    --if openDay < 7 then
-    --    return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    --end
-    --
+    local openDay = CommonDB.getServerOpenDay()
+    if not openDay then
+        return 
+    end
+    
+    if openDay < 7 then
+        return 
+    end
+    
     ---- �Ѿ�����
     ---- �Ѿ�����
-    --if (openDay - 7 + 1) % 2 ~= 1 then
-    --    return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    --end
-    --
-    --if not RoleSystemLogic.isOpen(human, RoleSystemDefine.ROLE_SYS_ID_1208) then
-    --   return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    --end
+    if (openDay - 7 + 1) % 2 ~= 1 then
+        return 
+    end
+    
+    if not RoleSystemLogic.isOpen(human, RoleSystemDefine.ROLE_SYS_ID_1208) then
+       return 
+    end
     return true
     return true
 end
 end
 
 
@@ -83,24 +83,14 @@ end
 
 
 
 
 function updateDaily(human)
 function updateDaily(human)
-    --local openDay = CommonDB.getServerOpenDay()
-    --if not openDay then
-    --    return
-    --end
-    --
-    --if openDay < 7 then
-    --    return
-    --end
-    --
-    ---- �Ѿ��ر�
-    --if (openDay - 7 + 1) % 2 ~= 0 then
-    --    return
-    --end
-    --
-    --human.lostTemple = nil
-    --
-    --local msgRet = Msg.gc.GC_LOST_TEMPLE_CLOSE
-    --Msg.send(msgRet, human.fd)
+    if not isOpen(human) then 
+        return
+    end
+    
+    human.lostTemple = nil
+    
+    local msgRet = Msg.gc.GC_LOST_TEMPLE_CLOSE
+    Msg.send(msgRet, human.fd)
 end
 end
 
 
 -- db
 -- db