GroupManager updates

This commit is contained in:
Zach 2015-04-23 21:07:17 -05:00
parent 4b5c0e29be
commit eec533a48b
3 changed files with 16 additions and 16 deletions

View file

@ -12,10 +12,10 @@ class GroupManager(DistributedObject.DistributedObject):
self.shardGroups = {}
self.groupPlayers = {}
self.id2type = {
SellbotHQ: 'VP Group',
CashbotHQ: 'CFO Group',
LawbotHQ: 'CJ Group',
BossbotHQ: 'CEO Group',
SellbotHQ: 'VP',
CashbotHQ: 'CFO',
LawbotHQ: 'CJ',
BossbotHQ: 'CEO',
}
def announceGenerate(self):

View file

@ -10,10 +10,10 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
def __init__(self, air):
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
self.sellGroup = GlobalGroup('VP Group', SellbotHQ)
self.cashGroup = GlobalGroup('CFO Group', CashbotHQ)
self.lawGroup = GlobalGroup('CJ Group', LawbotHQ)
self.bossGroup = GlobalGroup('CEO Group', BossbotHQ)
self.sellGroup = GlobalGroup('VP', SellbotHQ)
self.cashGroup = GlobalGroup('CFO', CashbotHQ)
self.lawGroup = GlobalGroup('CJ', LawbotHQ)
self.bossGroup = GlobalGroup('CEO', BossbotHQ)
self.shardGroups = {
SellbotHQ: self.sellGroup,
CashbotHQ: self.cashGroup,
@ -27,10 +27,10 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
BossbotHQ: [],
}
self.id2type = {
SellbotHQ: 'VP Group',
CashbotHQ: 'CFO Group',
LawbotHQ: 'CJ Group',
BossbotHQ: 'CEO Group',
SellbotHQ: 'VP',
CashbotHQ: 'CFO',
LawbotHQ: 'CJ',
BossbotHQ: 'CEO',
}
self.childId = None
@ -67,7 +67,7 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
for groupId, group in self.groupPlayers.items():
for player in group:
toon = simbase.air.doId2do.get(player)
if toon.zoneId != groupId:
if (toon.zoneId != groupId) or (toon.zoneId + 100 != groupId):
self.removePlayerFromGroup(groupId, player)
return task.again

View file

@ -365,9 +365,9 @@ class ShardPage(ShtikerPage.ShtikerPage):
if base.cr.groupManager.isInGroup(base.localAvatar.doId, gid):
self.rejectGroup(4)
return
if len(base.cr.groupManager.getGroupPlayers(groupId)) >= 8:
self.rejectGroup(3)
return
#if len(base.cr.groupManager.getGroupPlayers(groupId)) >= 8:
# self.rejectGroup(3)
# return
suitIdx = -1
gids = {10000:0, 11000:1, 12000:2, 13000:3}
suitIdx = gids.get(groupId)