| | |
| | | import EventShell
|
| | | import PyGameData
|
| | | import PlayerLove
|
| | | import math
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
|
| | |
| | | content = sendPack.GetContent()
|
| | |
|
| | | #通用判断
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, talkType=IPY_GameWorld.tcArea):
|
| | | return
|
| | |
|
| | | #通用设置
|
| | |
| | | content = sendPack.GetContent()
|
| | |
|
| | | #通用检测
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, checkSameMsg = False):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, checkSameMsg = False, talkType=IPY_GameWorld.tcWorld):
|
| | | return
|
| | |
|
| | | #通用设置
|
| | |
| | | content = sendPack.GetContent()
|
| | |
|
| | | #通用检测
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, checkSameMsg = False):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, checkSameMsg = False, talkType=IPY_GameWorld.tcCountry):
|
| | | return
|
| | |
|
| | | #通用设置
|
| | |
| | | #玩家聊天内容
|
| | | content = sendPack.GetContent()
|
| | |
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, talkType=IPY_GameWorld.tcFamily):
|
| | | return
|
| | | |
| | | #通用设置
|
| | | SetTalkTime(curPlayer, content, IPY_GameWorld.tcFamily, tick)
|
| | |
|
| | | extras = GetTalkExtraValue(curPlayer)
|
| | | curPlayer.ChatFamily(content, 0, extras)
|
| | |
| | | #玩家聊天内容
|
| | | content = sendPack.GetContent()
|
| | |
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, talkType=IPY_GameWorld.tcTeam):
|
| | | return
|
| | |
|
| | | #通用设置
|
| | |
| | | #玩家聊天内容
|
| | | content = sendPack.GetContent()
|
| | |
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, talkType=IPY_GameWorld.tcPrivate):
|
| | | return
|
| | |
|
| | | #通用设置
|
| | |
| | | #玩家聊天内容
|
| | | content = sendPack.GetContent()
|
| | |
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick):
|
| | | if not __CheckTalk(curPlayer, content, sendPack.GetLen(), tick, talkType=IPY_GameWorld.tcPrivate):
|
| | | return
|
| | |
|
| | | #通用设置
|
| | |
| | | # @param checkSameMsg 是否检查相同信息
|
| | | # @return True or False
|
| | | # @remarks 函数详细说明.
|
| | | def __CheckTalk(curPlayer, content, length, tick, checkGMForbidenTalk = True, checkSameMsg = True):
|
| | | def __CheckTalk(curPlayer, content, length, tick, checkGMForbidenTalk = True, checkSameMsg = True, talkType=None):
|
| | | if checkGMForbidenTalk and GetGMToolForbidTalk(curPlayer):
|
| | | #GeRen_chenxin_921745 对不起,您已被GM禁言,发送信息失败
|
| | | #PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_921745")
|
| | |
| | | #间隔时间
|
| | | if tick - curPlayer.GetLastChatTick() < ChConfig.Def_PlayerTalkTick:
|
| | | #PlayerControl.NotifyCode(curPlayer, "CanootTalk02")
|
| | | return False
|
| | | |
| | | #频道各自间隔时间
|
| | | if talkType != None:
|
| | | talkCDDict = IpyGameDataPY.GetFuncEvalCfg("TalkCD", 1, {})
|
| | | if str(talkType) in talkCDDict:
|
| | | cdTicks = talkCDDict[str(talkType)] * 1000
|
| | | lastTalkTick = curPlayer.GetTalkTick(talkType)
|
| | | remainTick = cdTicks - (tick - lastTalkTick)
|
| | | if remainTick > 0:
|
| | | PlayerControl.NotifyCode(curPlayer, "CanootTalk01", [int(math.ceil(remainTick/1000.0))])
|
| | | return False
|
| | |
|
| | | #聊天信息太长
|
| | |
| | | #设置当前聊天内容为玩家本次聊天内容
|
| | | #curPlayer.SetLastChatContent(content)
|
| | | #设置当前频道时间
|
| | | #curPlayer.SetTalkTick(type, tick)
|
| | | curPlayer.SetTalkTick(type, tick)
|
| | | return
|
| | |
|
| | | ## 信件2B封包
|