Holocaust

This commit is contained in:
DenialMC 2015-04-07 22:56:58 +03:00
parent 7cfa2866b9
commit bc14a3dd9c
28 changed files with 1 additions and 592 deletions

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -32,10 +32,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -34,10 +34,6 @@ uberdogs:
id: 4666
anonymous: false
- class: DistributedDeliveryManager
id: 4683
anonymous: false
- class: TTCodeRedemptionMgr
id: 4695
anonymous: false

View file

@ -616,8 +616,6 @@ from toontown.racing import DistributedGag/AI
from toontown.racing import DistributedProjectile/AI
from toontown.racing.DistributedStartingBlock/AI import DistributedViewingBlock/AI
from toontown.uberdog.ClientServicesManager/UD import ClientServicesManager/UD
from toontown.uberdog.DistributedDeliveryManager/AI/UD import DistributedDeliveryManager/AI/UD
from toontown.uberdog.DistributedDataStoreManager/AI/UD import DistributedDataStoreManager/AI/UD
from toontown.suit import DistributedLawbotBoss/AI
from toontown.coghq import DistributedLawbotBossGavel/AI
from toontown.suit import DistributedLawbotBossSuit/AI
@ -690,7 +688,6 @@ from toontown.minigame import DistributedTwoDGame/AI
from toontown.safezone import DistributedChineseCheckers/AI
from toontown.safezone import DistributedCheckers/AI
from toontown.safezone import DistributedFindFour/AI
from toontown.uberdog.DistributedMailManager/AI/UD import DistributedMailManager/AI/UD
from toontown.uberdog.DistributedPartyManager/AI/UD import DistributedPartyManager/AI/UD
from toontown.rpc.AwardManager/UD import AwardManager/UD
from toontown.coderedemption.TTCodeRedemptionMgr/AI import TTCodeRedemptionMgr/AI
@ -2804,14 +2801,6 @@ dclass DistributedWinterCarolingTarget : DistributedObject {
requestScavengerHunt() airecv clsend;
};
dclass DistributedDataStoreManager : DistributedObject {
startStore(uint8);
stopStore(uint8);
queryStore(uint8, string);
receiveResults(uint8, string);
deleteBackupStores();
};
dclass DistributedVehicle : DistributedSmoothNode {
setOwner(uint32) required broadcast ram;
setState(char, uint32) broadcast ram;
@ -2916,33 +2905,6 @@ dclass DistributedLeaderBoard : DistributedObject {
setDisplay(blob) broadcast ram;
};
dclass DistributedDeliveryManager : DistributedObject {
hello(string) clsend;
rejectHello(string);
helloResponse(string);
getName(uint32);
receiveRejectGetName(string);
receiveAcceptGetName(string);
addName(uint32, string);
receiveRejectAddName(uint32);
receiveAcceptAddName(uint32);
addGift(uint32, blob, uint32, uint32, uint32);
receiveRejectAddGift(uint32);
receiveAcceptAddGift(uint32, uint32, uint32, uint32);
deliverGifts(uint32, uint32);
receiveAcceptDeliverGifts(uint32, string);
receiveRejectDeliverGifts(uint32, string);
receiveRequestPayForGift(blob, uint32, uint32) airecv clsend;
receiveRequestPurchaseGift(blob, uint32, uint32, uint32) airecv;
receiveAcceptPurchaseGift(uint32, uint32, int16);
receiveRejectPurchaseGift(uint32, uint32, int16, uint16);
heartbeat() airecv;
giveBeanBonus(uint32, uint16);
requestAck() clsend;
returnAck();
givePartyRefund(uint32, uint32, uint64, int8, uint16);
};
dclass DistributedLawbotBoss : DistributedBossCog {
setState(string) broadcast ram;
setBossDamage(uint16, uint8, int16) broadcast ram;
@ -3477,11 +3439,6 @@ dclass DistributedFindFour : DistributedNode {
tie() broadcast;
};
dclass DistributedMailManager : DistributedObject {
sendSimpleMail(uint32, uint32, string);
setNumMailItems(uint32, uint32) airecv;
};
dclass DistributedPartyManager : DistributedObject {
addParty(uint32, uint32, string, string, int8, int8, activity [], decoration [], uint32[], uint16);
addPartyRequest(uint32, char [0-256], char [0-256], int8, int8, activity [], decoration [], uint32[]) airecv clsend;

View file

@ -2,7 +2,7 @@
from pandac.PandaModules import *
hashVal = 1846521813
hashVal = 660566761
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
@ -15,7 +15,6 @@ from toontown.shtiker import DeleteManager, PurchaseManager, NewbiePurchaseManag
from toontown.groups import GroupManager
from toontown.uberdog.ClientServicesManager import ClientServicesManager
from toontown.ai import WelcomeValleyManager, NewsManager, DistributedAprilToonsMgr, DistributedBlackCatMgr, DistributedPolarBearMgr, DistributedPolarPlaceEffectMgr, DistributedGreenToonEffectMgr, DistributedResistanceEmoteMgr, DistributedScavengerHuntTarget, DistributedTrickOrTreatTarget, DistributedWinterCarolingTarget, DistributedSillyMeterMgr
from toontown.uberdog.DistributedMailManager import DistributedMailManager
from otp.chat import ChatAgent
from toontown.parties.GlobalPartyManager import GlobalPartyManager
from toontown.racing.DistributedStartingBlock import DistributedViewingBlock
@ -23,7 +22,6 @@ from toontown.pets.PetDCImports import *
from toontown.suit import DistributedSuitPlanner, DistributedSuitBase, DistributedSuit, DistributedTutorialSuit, DistributedFactorySuit, DistributedMintSuit, DistributedStageSuit, DistributedSellbotBoss, DistributedCashbotBoss, DistributedCashbotBossGoon, DistributedGoon, DistributedGridGoon, DistributedLawbotBoss, DistributedLawbotBossSuit, DistributedBossbotBoss
from toontown.distributed import ToontownDistrict, ToontownDistrictStats, DistributedTimer
from toontown.effects import DistributedFireworkShow
from toontown.uberdog.DistributedDataStoreManager import DistributedDataStoreManager
from toontown.safezone import DistributedTrolley, DistributedPartyGate, DistributedBoat, DistributedButterfly, DistributedMMPiano, DistributedDGFlower, DistributedFishingSpot, SafeZoneManager, DistributedTreasure, DistributedGolfKart, DistributedPicnicBasket, DistributedGameTable, DistributedChineseCheckers, DistributedCheckers, DistributedFindFour
from toontown.fishing import DistributedFishingPond, DistributedFishingTarget, DistributedPondBingoManager
from toontown.minigame import DistributedMinigame, DistributedMinigameTemplate, DistributedRaceGame, DistributedCannonGame, DistributedPhotoGame, DistributedPatternGame, DistributedRingGame, DistributedTagGame, DistributedMazeGame, DistributedTugOfWarGame, DistributedCatchGame, DistributedDivingGame, DistributedTargetGame, DistributedTravelGame, DistributedPairingGame, DistributedVineGame, DistributedIceGame, DistributedCogThiefGame, DistributedTwoDGame
@ -41,7 +39,6 @@ from toontown.toon import DistributedToon, DistributedNPCToonBase, DistributedNP
from toontown.tutorial import DistributedBattleTutorial, TutorialManager
from toontown.pets import DistributedPetProxy
from toontown.coderedemption.TTCodeRedemptionMgr import TTCodeRedemptionMgr
from toontown.uberdog.DistributedDeliveryManager import DistributedDeliveryManager
from direct.distributed import DistributedObject, DistributedNode, DistributedSmoothNode, DistributedCartesianGrid, DistributedCamera, DistributedObjectGlobal
from otp.ai import TimeManager, MagicWordManager
from otp.avatar import DistributedAvatar, DistributedPlayer, AvatarHandle

View file

@ -32,7 +32,6 @@ OTP_DO_ID_PIRATES_TRAVEL_AGENT = 4679
OTP_DO_ID_PIRATES_FRIENDS_MANAGER = 4680
OTP_DO_ID_CHAT_MANAGER = 4681
OTP_DO_ID_TOONTOWN_AVATAR_MANAGER = 4682
OTP_DO_ID_TOONTOWN_DELIVERY_MANAGER = 4683
OTP_DO_ID_TOONTOWN_TEMP_STORE_MANAGER = 4684
OTP_DO_ID_SWITCHBOARD_MANAGER = 4685
OTP_DO_ID_PLAYER_FRIENDS_MANAGER = 4687

View file

@ -139,8 +139,6 @@ class ToontownAIRepository(ToontownInternalRepository):
self.estateManager.generateWithRequired(2)
self.catalogManager = CatalogManagerAI(self)
self.catalogManager.generateWithRequired(2)
self.deliveryManager = self.generateGlobalObject(
OTP_DO_ID_TOONTOWN_DELIVERY_MANAGER, 'DistributedDeliveryManager')
if self.wantPets:
self.petMgr = PetManagerAI(self)
if self.wantParties:

View file

@ -90,7 +90,6 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
self.csm = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_CLIENT_SERVICES_MANAGER, 'ClientServicesManager')
self.playerFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PLAYER_FRIENDS_MANAGER, 'TTPlayerFriendsManager')
self.ttuFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTU_FRIENDS_MANAGER, 'TTUFriendsManager')
self.deliveryManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_DELIVERY_MANAGER, 'DistributedDeliveryManager')
self.streetSign = None
self.furnitureManager = None

View file

@ -2280,7 +2280,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
now = int(time.time() / 60 + 0.5)
delivered, remaining = self.onOrder.extractDeliveryItems(now)
deliveredGifts, remainingGifts = self.onGiftOrder.extractDeliveryItems(now)
#simbase.air.deliveryManager.sendDeliverGifts(self.getDoId(), now)
giftItem = CatalogItemList.CatalogItemList(deliveredGifts, store=CatalogItem.Customization | CatalogItem.DeliveryDate)
if len(giftItem) > 0:
self.air.writeServerEvent('Getting Gift', self.doId, 'sender %s receiver %s gift %s' % (giftItem[0].giftTag, self.doId, giftItem[0].getName()))
@ -2300,7 +2299,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
delivered, remaining = self.onGiftOrder.extractDeliveryItems(now)
self.notify.info('Gift Delivery for %s: %s.' % (self.doId, delivered))
self.b_setMailboxContents(self.mailboxContents + delivered)
simbase.air.deliveryManager.sendDeliverGifts(self.getDoId(), now)
self.b_setCatalogNotify(self.catalogNotify, ToontownGlobals.NewItems)
return Task.done

View file

@ -1,180 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from pandac.PandaModules import ConfigVariableBool
from direct.task import Task
from string import maketrans
import cPickle
import os
import sys
import dumbdbm
import anydbm
import time
class DataStore:
QueryTypes = []
QueryTypes = dict(zip(QueryTypes, range(len(QueryTypes))))
@classmethod
def addQueryTypes(cls, typeStrings):
superTypes = zip(cls.QueryTypes.values(), cls.QueryTypes.keys())
superTypes.sort()
newTypes = [ item[1] for item in superTypes ] + typeStrings
newTypes = dict(zip(newTypes, range(1 + len(newTypes))))
return newTypes
notify = DirectNotifyGlobal.directNotify.newCategory('DataStore')
wantAnyDbm = ConfigVariableBool('want-ds-anydbm', 1).getValue()
def __init__(self, filepath, writePeriod = 300, writeCountTrigger = 100):
self.filepath = filepath
self.writePeriod = writePeriod
self.writeCountTrigger = writeCountTrigger
self.writeCount = 0
self.data = None
self.className = self.__class__.__name__
if self.wantAnyDbm:
self.filepath += '-anydbm'
self.notify.debug('anydbm default module used: %s ' % anydbm._defaultmod.__name__)
self.open()
return
def readDataFromFile(self):
if self.wantAnyDbm:
try:
if os.path.exists(self.filepath):
self.data = anydbm.open(self.filepath, 'w')
self.notify.debug('Opening existing anydbm database at: %s.' % (self.filepath,))
else:
self.data = anydbm.open(self.filepath, 'c')
self.notify.debug('Creating new anydbm database at: %s.' % (self.filepath,))
except anydbm.error:
self.notify.warning('Cannot open anydbm database at: %s.' % (self.filepath,))
else:
try:
file = open(self.filepath + '.bu', 'r')
self.notify.debug('Opening backup pickle data file at %s.' % (self.filepath + '.bu',))
if os.path.exists(self.filepath):
os.remove(self.filepath)
except IOError:
try:
file = open(self.filepath, 'r')
self.notify.debug('Opening old pickle data file at %s..' % (self.filepath,))
except IOError:
file = None
self.notify.debug('New pickle data file will be written to %s.' % (self.filepath,))
if file:
data = cPickle.load(file)
file.close()
self.data = data
else:
self.data = {}
return
def writeDataToFile(self):
if self.data is not None:
self.notify.debug('Data is now synced with disk at %s' % self.filepath)
if self.wantAnyDbm:
self.data.sync()
else:
try:
backuppath = self.filepath + '.bu'
if os.path.exists(self.filepath):
os.rename(self.filepath, backuppath)
outfile = open(self.filepath, 'w')
cPickle.dump(self.data, outfile)
outfile.close()
if os.path.exists(backuppath):
os.remove(backuppath)
except EnvironmentError:
self.notify.warning(str(sys.exc_info()[1]))
else:
self.notify.warning('No data to write. Aborting sync.')
return
def syncTask(self, task):
task.timeElapsed += globalClock.getDt()
if task.timeElapsed > self.writePeriod:
if self.writeCount:
self.writeDataToFile()
self.resetWriteCount()
task.timeElapsed = 0.0
if self.writeCount > self.writeCountTrigger:
self.writeDataToFile()
self.resetWriteCount()
task.timeElapsed = 0.0
return Task.cont
def incrementWriteCount(self):
self.writeCount += 1
def resetWriteCount(self):
self.writeCount = 0
def close(self):
if self.data is not None:
self.writeDataToFile()
if self.wantAnyDbm:
self.data.close()
taskMgr.remove('%s-syncTask' % (self.className,))
self.data = None
return
def open(self):
self.close()
self.readDataFromFile()
self.resetWriteCount()
taskMgr.remove('%s-syncTask' % (self.className,))
t = taskMgr.add(self.syncTask, '%s-syncTask' % (self.className,))
t.timeElapsed = 0.0
def reset(self):
self.destroy()
self.open()
def destroy(self):
self.close()
if self.wantAnyDbm:
lt = time.asctime(time.localtime())
trans = maketrans(': ', '__')
t = lt.translate(trans)
head, tail = os.path.split(self.filepath)
newFileName = 'UDStoreBak' + t
if os.path.exists(self.filepath):
try:
os.rename(tail, newFileName)
uber.air.writeServerEvent('Uberdog data store Info', 0, 'Creating backup of file: %s saving as: %s' % (tail, newFileName))
except:
uber.air.writeServerEvent('Uberdog data store Info', 0, 'Unable to create backup of file: %s ' % tail)
else:
files = os.listdir(head)
for file in files:
if file.find(tail) > -1:
filename, ext = os.path.splitext(file)
try:
os.rename(file, newFileName + ext)
uber.air.writeServerEvent('Uberdog data store Info', 0, 'Creating backup of file: %s saving as: %s' % (file, newFileName + ext))
except:
uber.air.writeServerEvent('Uberdog data store Info', 0, 'Unable to create backup of file: %s ' % newFileName + ext)
else:
if os.path.exists(self.filepath + '.bu'):
os.remove(self.filepath + '.bu')
if os.path.exists(self.filepath):
os.remove(self.filepath)
def query(self, query):
if self.data is not None:
qData = cPickle.loads(query)
results = self.handleQuery(qData)
qResults = cPickle.dumps(results)
else:
results = None
qResults = cPickle.dumps(results)
return qResults
def handleQuery(self, query):
results = None
return results

View file

@ -1,12 +0,0 @@
from toontown.uberdog.ScavengerHuntDataStore import *
from toontown.uberdog.DataStore import *
SH = 1
GEN = 2
TYPES = {SH: (ScavengerHuntDataStore,),
GEN: (DataStore,)}
def getStoreClass(type):
storeClass = TYPES.get(type, None)
if storeClass:
return storeClass[0]
return

View file

@ -1,7 +0,0 @@
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
from toontown.uberdog import DataStoreGlobals
class DistributedDataStoreManager(DistributedObjectGlobal):
def __init__(self):
pass

View file

@ -1,21 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedDataStoreManagerAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedDataStoreManagerAI")
def startStore(self, todo0):
pass
def stopStore(self, todo0):
pass
def queryStore(self, todo0, todo1):
pass
def receiveResults(self, todo0, todo1):
pass
def deleteBackupStores(self):
pass

View file

@ -1,21 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD
class DistributedDataStoreManagerUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedDataStoreManagerUD")
def startStore(self, todo0):
pass
def stopStore(self, todo0):
pass
def queryStore(self, todo0, todo1):
pass
def receiveResults(self, todo0, todo1):
pass
def deleteBackupStores(self):
pass

View file

@ -1,25 +0,0 @@
from pandac.PandaModules import *
from direct.distributed.DistributedObject import DistributedObject
from toontown.catalog import CatalogItemList
from toontown.catalog import CatalogItem
class DistributedDeliveryManager(DistributedObject):
neverDisable = 1
def sendHello(self, message):
self.sendUpdate('hello', [message])
def rejectHello(self, message):
print 'rejected', message
def helloResponse(self, message):
print 'accepted', message
def sendAck(self):
self.sendUpdate('requestAck', [])
def returnAck(self):
messenger.send('DeliveryManagerAck')
def test(self):
print 'Distributed Delviery Manager Stub Test'

View file

@ -1,78 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedDeliveryManagerAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedDeliveryManagerAI")
def hello(self, todo0):
pass
def rejectHello(self, todo0):
pass
def helloResponse(self, todo0):
pass
def getName(self, todo0):
pass
def receiveRejectGetName(self, todo0):
pass
def receiveAcceptGetName(self, todo0):
pass
def addName(self, todo0, todo1):
pass
def receiveRejectAddName(self, todo0):
pass
def receiveAcceptAddName(self, todo0):
pass
def addGift(self, todo0, todo1, todo2, todo3, todo4):
pass
def receiveRejectAddGift(self, todo0):
pass
def receiveAcceptAddGift(self, todo0, todo1, todo2, todo3):
pass
def deliverGifts(self, todo0, todo1):
pass
def receiveAcceptDeliverGifts(self, todo0, todo1):
pass
def receiveRejectDeliverGifts(self, todo0, todo1):
pass
def receiveRequestPayForGift(self, todo0, todo1, todo2):
pass
def receiveRequestPurchaseGift(self, todo0, todo1, todo2, todo3):
pass
def receiveAcceptPurchaseGift(self, todo0, todo1, todo2):
pass
def receiveRejectPurchaseGift(self, todo0, todo1, todo2, todo3):
pass
def heartbeat(self):
pass
def giveBeanBonus(self, todo0, todo1):
pass
def requestAck(self):
pass
def returnAck(self):
pass
def givePartyRefund(self, todo0, todo1, todo2, todo3, todo4):
pass

View file

@ -1,78 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD
class DistributedDeliveryManagerUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedDeliveryManagerUD")
def hello(self, todo0):
pass
def rejectHello(self, todo0):
pass
def helloResponse(self, todo0):
pass
def getName(self, todo0):
pass
def receiveRejectGetName(self, todo0):
pass
def receiveAcceptGetName(self, todo0):
pass
def addName(self, todo0, todo1):
pass
def receiveRejectAddName(self, todo0):
pass
def receiveAcceptAddName(self, todo0):
pass
def addGift(self, todo0, todo1, todo2, todo3, todo4):
pass
def receiveRejectAddGift(self, todo0):
pass
def receiveAcceptAddGift(self, todo0, todo1, todo2, todo3):
pass
def deliverGifts(self, todo0, todo1):
pass
def receiveAcceptDeliverGifts(self, todo0, todo1):
pass
def receiveRejectDeliverGifts(self, todo0, todo1):
pass
def receiveRequestPayForGift(self, todo0, todo1, todo2):
pass
def receiveRequestPurchaseGift(self, todo0, todo1, todo2, todo3):
pass
def receiveAcceptPurchaseGift(self, todo0, todo1, todo2):
pass
def receiveRejectPurchaseGift(self, todo0, todo1, todo2, todo3):
pass
def heartbeat(self):
pass
def giveBeanBonus(self, todo0, todo1):
pass
def requestAck(self):
pass
def returnAck(self):
pass
def givePartyRefund(self, todo0, todo1, todo2, todo3, todo4):
pass

View file

@ -1,4 +0,0 @@
from direct.distributed.DistributedObject import DistributedObject
class DistributedMailManager(DistributedObject):
neverDisable = 1

View file

@ -1,12 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedMailManagerAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedMailManagerAI")
def sendSimpleMail(self, todo0, todo1, todo2):
pass
def setNumMailItems(self, todo0, todo1):
pass

View file

@ -1,12 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD
class DistributedMailManagerUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedMailManagerUD")
def sendSimpleMail(self, todo0, todo1, todo2):
pass
def setNumMailItems(self, todo0, todo1):
pass

View file

@ -1,52 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from toontown.uberdog.DataStore import *
class ScavengerHuntDataStore(DataStore):
QueryTypes = DataStore.addQueryTypes(['GetGoals', 'AddGoal'])
notify = DirectNotifyGlobal.directNotify.newCategory('ScavengerHuntDataStore')
def __init__(self, filepath):
DataStore.__init__(self, filepath)
def handleQuery(self, query):
qId, qData = query
if qId == self.QueryTypes['GetGoals']:
avId, goal = qData
goals = self.__getGoalsForAvatarId(avId)
return (qId, (avId, goal, goals))
elif qId == self.QueryTypes['AddGoal']:
avId, goal = qData
self.__addGoalToAvatarId(avId, goal)
return (qId, (avId,))
return None
def __addGoalToAvatarId(self, avId, goal):
if self.wantAnyDbm:
pAvId = cPickle.dumps(avId)
pGoal = cPickle.dumps(goal)
pData = self.data.get(pAvId, None)
if pData is not None:
data = cPickle.loads(pData)
else:
data = set()
data.add(goal)
pData = cPickle.dumps(data)
self.data[pAvId] = pData
else:
self.data.setdefault(avId, set())
self.data[avId].add(goal)
self.incrementWriteCount()
return
def __getGoalsForAvatarId(self, avId):
if self.wantAnyDbm:
pAvId = cPickle.dumps(avId)
pData = self.data.get(pAvId, None)
if pData is not None:
data = list(cPickle.loads(pData))
else:
data = []
return data
else:
return list(self.data.get(avId, []))
return

View file

@ -52,5 +52,4 @@ class ToontownUberRepository(ToontownInternalRepository):
self.chatAgent = simbase.air.generateGlobalObject(OTP_DO_ID_CHAT_MANAGER, 'ChatAgent')
self.friendsManager = simbase.air.generateGlobalObject(OTP_DO_ID_TTU_FRIENDS_MANAGER, 'TTUFriendsManager')
self.globalPartyMgr = simbase.air.generateGlobalObject(OTP_DO_ID_GLOBAL_PARTY_MANAGER, 'GlobalPartyManager')
self.deliveryManager = simbase.air.generateGlobalObject(OTP_DO_ID_TOONTOWN_DELIVERY_MANAGER, 'DistributedDeliveryManager')
self.groupManager = simbase.air.generateGlobalObject(OPT_DO_ID_GROUP_MANAGER, 'GroupManager')