2015-03-03 22:10:12 +00:00
|
|
|
from direct.distributed.DistributedObjectGlobalAI import DistributedObjectGlobalAI
|
|
|
|
from direct.distributed.PyDatagram import *
|
|
|
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
|
|
|
|
|
|
|
class GlobalPartyManagerAI(DistributedObjectGlobalAI):
|
|
|
|
notify = directNotify.newCategory('GlobalPartyManagerAI')
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def announceGenerate(self):
|
|
|
|
DistributedObjectGlobalAI.announceGenerate(self)
|
|
|
|
# Inform the UD that we as an AI have started up, and tell him the doId of our partymanager, so they can talk
|
|
|
|
self.sendUpdate('partyManagerAIHello', [simbase.air.partyManager.doId])
|
|
|
|
|
|
|
|
def sendAddParty(self, avId, partyId, start, end, isPrivate, inviteTheme, activities, decorations, inviteeIds):
|
|
|
|
self.sendUpdate('addParty', [avId, partyId, start, end, isPrivate, inviteTheme, activities, decorations, inviteeIds])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def queryPartyForHost(self, hostId):
|
|
|
|
self.sendUpdate('queryParty', [hostId])
|
|
|
|
|
|
|
|
def d_partyStarted(self, partyId, shardId, zoneId, hostName):
|
|
|
|
self.sendUpdate('partyHasStarted', [partyId, shardId, zoneId, hostName])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def partyStarted(self, partyId, shardId, zoneId, hostName):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def d_partyDone(self, partyId):
|
|
|
|
self.sendUpdate('partyDone', [partyId])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def partyDone(self, partyId):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def d_toonJoinedParty(self, partyId, avId):
|
|
|
|
self.sendUpdate('toonJoinedParty', [partyId, avId])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def toonJoinedParty(self, partyId, avId):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def d_toonLeftParty(self, partyId, avId):
|
|
|
|
self.sendUpdate('toonLeftParty', [partyId, avId])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def toonLeftParty(self, partyId, avId):
|
|
|
|
pass
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def d_requestPartySlot(self, partyId, avId, gateId):
|
|
|
|
self.sendUpdate('requestPartySlot', [partyId, avId, gateId])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def requestPartySlot(self, partyId, avId, gateId):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def d_allocIds(self, numIds):
|
|
|
|
self.sendUpdate('allocIds', [numIds])
|
2015-07-05 23:59:25 +00:00
|
|
|
|
2015-03-03 22:10:12 +00:00
|
|
|
def allocIds(self, numIds):
|
|
|
|
pass
|