ShardPage update

This commit is contained in:
Zach 2015-03-08 20:49:47 -05:00
parent 25bb468501
commit fd720c4ebd

View file

@ -28,7 +28,7 @@ def compareShardTuples(a, b):
return 0 return 0
def setupInvasionMarkerAny(node): def setupInvasionMarkerAny(node):
pass # TODO pass
def setupInvasionMarker(node, invasionStatus): def setupInvasionMarker(node, invasionStatus):
if node.find('**/*invasion-marker'): if node.find('**/*invasion-marker'):
@ -369,14 +369,9 @@ class ShardPage(ShtikerPage.ShtikerPage):
self.rejectGroup(3) self.rejectGroup(3)
return return
suitIdx = -1 suitIdx = -1
if groupId == 10000: gids = {10000:0, 11000:1, 12000:2, 13000:3}
suitIdx = 0 suitIdx = gids.get(groupId)
elif groupId == 11000: if suitIdx is not None:
suitIdx = 1
elif groupId == 12000:
suitIdx = 2
elif groupId == 13000:
suitIdx = 3
merits = base.localAvatar.cogMerits[suitIdx] merits = base.localAvatar.cogMerits[suitIdx]
if CogDisguiseGlobals.getTotalMerits(base.localAvatar, suitIdx) > merits: if CogDisguiseGlobals.getTotalMerits(base.localAvatar, suitIdx) > merits:
self.rejectGroup(2, suitIdx) self.rejectGroup(2, suitIdx)
@ -423,14 +418,10 @@ class ShardPage(ShtikerPage.ShtikerPage):
except: except:
place = base.cr.playGame.hood.place place = base.cr.playGame.hood.place
hoodId = -1 hoodId = -1
if groupId == 10000: gids = {10000:1000, 11000:5000, 12000:9000, 13000:3000}
hoodId = 1000 hoodId = gids.get(groupId)
elif groupId == 11000: if hoodId is None:
hoodId = 5000 return
elif groupId == 12000:
hoodId = 9000
elif groupId == 13000:
hoodId = 3000
if ZoneUtil.getCanonicalHoodId(self.getCurrentZoneId()) != hoodId: if ZoneUtil.getCanonicalHoodId(self.getCurrentZoneId()) != hoodId:
place.requestTeleport(hoodId, hoodId, base.localAvatar.defaultShard, -1) place.requestTeleport(hoodId, hoodId, base.localAvatar.defaultShard, -1)
else: else:
@ -605,7 +596,6 @@ class ShardPage(ShtikerPage.ShtikerPage):
if self.currentGroupJoined: if self.currentGroupJoined:
self.rejectGroup(5) self.rejectGroup(5)
return return
if shardId == currentShardId: if shardId == currentShardId:
return return
elif shardId == base.localAvatar.defaultShard: elif shardId == base.localAvatar.defaultShard:
@ -619,5 +609,4 @@ class ShardPage(ShtikerPage.ShtikerPage):
place = base.cr.playGame.hood.loader.place place = base.cr.playGame.hood.loader.place
except: except:
place = base.cr.playGame.hood.place place = base.cr.playGame.hood.place
place.requestTeleport(canonicalHoodId, canonicalHoodId, shardId, -1) place.requestTeleport(canonicalHoodId, canonicalHoodId, shardId, -1)