Explorar o código

修改聊天限制相关逻辑

gitxsm hai 1 mes
pai
achega
90a3bd44a3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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