mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Replace self.shard with the correct districtId.
This commit is contained in:
parent
5c776d6cc8
commit
00e3650737
2 changed files with 5 additions and 5 deletions
|
@ -197,7 +197,7 @@ class DistributedBuildingMgrAI:
|
|||
if not self.air.dbConn:
|
||||
simbase.backups.save('block-info', (self.air.districtId, self.branchId), backups)
|
||||
else:
|
||||
street = {'ai': self.shard, 'branch': self.branchID}
|
||||
street = {'district': self.air.districtId, 'branch': self.branchID}
|
||||
try:
|
||||
self.air.mongodb.toontown.blockinfo.update(street, {'$setOnInsert': street, '$set': {'buildings': backups}}, upsert=True)
|
||||
except AutoReconnect:
|
||||
|
@ -208,8 +208,8 @@ class DistributedBuildingMgrAI:
|
|||
if not self.air.dbConn:
|
||||
blocks = simbase.backups.load('block-info', (self.air.districtId, self.branchId), default={})
|
||||
return blocks
|
||||
self.air.mongodb.toontown.blockinfo.ensure_index([('ai', 1), ('branch', 1)])
|
||||
street = {'ai': self.shard, 'branch': self.branchID}
|
||||
self.air.mongodb.toontown.blockinfo.ensure_index([('district', 1), ('branch', 1)])
|
||||
street = {'district': self.air.districtId, 'branch': self.branchID}
|
||||
try:
|
||||
doc = self.air.mongodb.toontown.blockinfo.find_one(street)
|
||||
except AutoReconnect:
|
||||
|
|
|
@ -11,9 +11,9 @@ class LeaderboardMgrAI:
|
|||
self.database = simbase.backups.load('leaderboard', (self.air.districtId,), default=({}))
|
||||
else:
|
||||
self.air.mongodb.toontown.leaderboard.ensure_index([('ai', 1)])
|
||||
street = {'ai': self.air.districtId}
|
||||
district = {'ai': self.air.districtId}
|
||||
try:
|
||||
doc = self.air.mongodb.toontown.leaderboard.find_one(street)
|
||||
doc = self.air.mongodb.toontown.leaderboard.find_one(district)
|
||||
except AutoReconnect:
|
||||
return blocks
|
||||
|
||||
|
|
Loading…
Reference in a new issue