Clear chat on zone ID change

This commit is contained in:
John 2015-09-05 11:43:02 +03:00
parent 6a5d16b054
commit 5b3e475c78

View file

@ -179,11 +179,16 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
if not isinstance(self, DistributedNPCToonBaseAI): if not isinstance(self, DistributedNPCToonBaseAI):
self.sendUpdate('setDefaultShard', [self.air.districtId]) self.sendUpdate('setDefaultShard', [self.air.districtId])
def clearChat(self):
self.sendUpdate('setTalk', ['.'])
def setLocation(self, parentId, zoneId): def setLocation(self, parentId, zoneId):
DistributedPlayerAI.DistributedPlayerAI.setLocation(self, parentId, zoneId) DistributedPlayerAI.DistributedPlayerAI.setLocation(self, parentId, zoneId)
from toontown.toon.DistributedNPCToonBaseAI import DistributedNPCToonBaseAI from toontown.toon.DistributedNPCToonBaseAI import DistributedNPCToonBaseAI
if not isinstance(self, DistributedNPCToonBaseAI): if not isinstance(self, DistributedNPCToonBaseAI):
self.clearChat()
if 100 <= zoneId < ToontownGlobals.DynamicZonesBegin: if 100 <= zoneId < ToontownGlobals.DynamicZonesBegin:
hood = ZoneUtil.getHoodId(zoneId) hood = ZoneUtil.getHoodId(zoneId)
self.b_setLastHood(hood) self.b_setLastHood(hood)