Procházet zdrojové kódy

修改聊天限制相关逻辑

gitxsm před 1 měsícem
rodič
revize
90a3bd44a3
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      script/module/chat/ChatLogic.lua

+ 1 - 1
script/module/chat/ChatLogic.lua

@@ -84,7 +84,7 @@ function chat(human, recvMsg, isJson)
     end
 
     local needChargeVal = getNeedChargeVal()
-    if needChargeVal > human.db.topupAcount then
+    if needChargeVal > (human.db.topupAcount or 0) then
         return Broadcast.sendDown(human, Util.format(Lang.CHAT_ERR_CHARGE_NOT_ENOUGH, needChargeVal))
     end