mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00: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:
|
if not self.air.dbConn:
|
||||||
simbase.backups.save('block-info', (self.air.districtId, self.branchId), backups)
|
simbase.backups.save('block-info', (self.air.districtId, self.branchId), backups)
|
||||||
else:
|
else:
|
||||||
street = {'ai': self.shard, 'branch': self.branchID}
|
street = {'district': self.air.districtId, 'branch': self.branchID}
|
||||||
try:
|
try:
|
||||||
self.air.mongodb.toontown.blockinfo.update(street, {'$setOnInsert': street, '$set': {'buildings': backups}}, upsert=True)
|
self.air.mongodb.toontown.blockinfo.update(street, {'$setOnInsert': street, '$set': {'buildings': backups}}, upsert=True)
|
||||||
except AutoReconnect:
|
except AutoReconnect:
|
||||||
|
@ -208,8 +208,8 @@ class DistributedBuildingMgrAI:
|
||||||
if not self.air.dbConn:
|
if not self.air.dbConn:
|
||||||
blocks = simbase.backups.load('block-info', (self.air.districtId, self.branchId), default={})
|
blocks = simbase.backups.load('block-info', (self.air.districtId, self.branchId), default={})
|
||||||
return blocks
|
return blocks
|
||||||
self.air.mongodb.toontown.blockinfo.ensure_index([('ai', 1), ('branch', 1)])
|
self.air.mongodb.toontown.blockinfo.ensure_index([('district', 1), ('branch', 1)])
|
||||||
street = {'ai': self.shard, 'branch': self.branchID}
|
street = {'district': self.air.districtId, 'branch': self.branchID}
|
||||||
try:
|
try:
|
||||||
doc = self.air.mongodb.toontown.blockinfo.find_one(street)
|
doc = self.air.mongodb.toontown.blockinfo.find_one(street)
|
||||||
except AutoReconnect:
|
except AutoReconnect:
|
||||||
|
|
|
@ -11,9 +11,9 @@ class LeaderboardMgrAI:
|
||||||
self.database = simbase.backups.load('leaderboard', (self.air.districtId,), default=({}))
|
self.database = simbase.backups.load('leaderboard', (self.air.districtId,), default=({}))
|
||||||
else:
|
else:
|
||||||
self.air.mongodb.toontown.leaderboard.ensure_index([('ai', 1)])
|
self.air.mongodb.toontown.leaderboard.ensure_index([('ai', 1)])
|
||||||
street = {'ai': self.air.districtId}
|
district = {'ai': self.air.districtId}
|
||||||
try:
|
try:
|
||||||
doc = self.air.mongodb.toontown.leaderboard.find_one(street)
|
doc = self.air.mongodb.toontown.leaderboard.find_one(district)
|
||||||
except AutoReconnect:
|
except AutoReconnect:
|
||||||
return blocks
|
return blocks
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue