Просмотр исходного кода

修改聊天限制相关逻辑

gitxsm 1 месяц назад
Родитель
Сommit
90a3bd44a3
1 измененных файлов с 1 добавлено и 1 удалено
  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