From 210a8f012ee54ad98785d9e21c50630f392e18ce Mon Sep 17 00:00:00 2001 From: Loudrob Date: Thu, 11 Jun 2015 15:23:44 -0400 Subject: [PATCH] Toons can't destroy other toon's money. --- toontown/estate/DistributedGardenPlotAI.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/toontown/estate/DistributedGardenPlotAI.py b/toontown/estate/DistributedGardenPlotAI.py index b06d8d1a..49b9e34e 100755 --- a/toontown/estate/DistributedGardenPlotAI.py +++ b/toontown/estate/DistributedGardenPlotAI.py @@ -182,6 +182,11 @@ class DistributedGardenPlotAI(DistributedLawnDecorAI): def plantNothing(self, burntBeans, toon): # TODO: Fix exploit. - av = simbase.air.doId2do.get(toon) - av.takeMoney(burntBeans) - self.planted = None + estate = simbase.air.doId2do.get(self.getEstate()) + sendAvId = self.air.getAvatarIdFromSender() + if sendAvId != toon or burntBeans > 8 or sendAvId not in estate.toons: + self.air.writeServerEvent('suspicious', sendAvId, 'DistributedGardenPlotAI.plantNothing attempted exploit') + else: + av = simbase.air.doId2do.get(toon) + av.takeMoney(burntBeans) + self.planted = None