Fix Signups
This commit is contained in:
parent
a5116641a3
commit
482ae91faf
|
@ -22,7 +22,7 @@ result = {"status":SUCCESS}
|
|||
|
||||
def TrySave():
|
||||
CharacterIds = jsonData['characterIds']
|
||||
ActualCharacterId = jsonData['ActualCharacterId']
|
||||
ActualCharacterId = jsonData['actualCharacterId']
|
||||
authToken = jsonData['authToken']
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ def TrySave():
|
|||
for CharacterId in CharacterIds:
|
||||
c.execute('DELETE from characterList where Name=? AND CharacterId=?',(username,CharacterId))
|
||||
c.execute('INSERT INTO characterList VAlUES (?,?,NULL)',(username,CharacterId))
|
||||
c.execute('DELETE from characterList WHERE Name=? and ActualCharacterId IS NOT NULL',(username,))
|
||||
c.execute('DELETE from characterList WHERE Name=? and actualCharacterId IS NOT NULL',(username,))
|
||||
c.execute('INSERT INTO characterList VAlUES (?,NULL,?)',(username,ActualCharacterId))
|
||||
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ try:
|
|||
c.execute("""
|
||||
CREATE TABLE areaList(
|
||||
Name TEXT(12),
|
||||
LastVisit int,
|
||||
LastVisit bigint,
|
||||
AreaId int,
|
||||
NextRubishSpawnTime bigint,
|
||||
ActualAreaId int
|
||||
|
|
|
@ -44,10 +44,17 @@ def TrySave():
|
|||
harvestables = Container['harvestables']
|
||||
areaId = Container['areaId']
|
||||
|
||||
harvestablesEncoded = json.dumps(harvestables)
|
||||
|
||||
c.execute('DELETE from containerList where Name=? and AreaId=? and containerName=?',(username,areaId,containerName))
|
||||
c.execute('INSERT INTO containerList VAlUES (?,?,?,?,?,?)',(username,harvestableTemplateId,lastHarvest,containerName,harvestablesEncoded,areaId))
|
||||
for harvestable in harvestables:
|
||||
itemTemplateId = harvestable['itemTemplateId']
|
||||
updateTime = harvestable['updateTime']
|
||||
index = harvestable['index']
|
||||
harvestableName = harvestable['harvestableName']
|
||||
|
||||
c.execute('DELETE from harvestablesList where Name=? and HarvestableName=? and AreaId=? and ParentContainerName=?',(username,harvestableName,areaId,containerName))
|
||||
c.execute('INSERT INTO harvestablesList VAlUES (?,?,?,?,?,?,?)',(username,itemTemplateId,updateTime,Index,harvestableName,areaId,containerName))
|
||||
|
||||
c.execute('DELETE from containerList where Name=? and AreaId=? and ContainerName=?',(username,areaId,containerName))
|
||||
c.execute('INSERT INTO containerList VAlUES (?,?,?,?,?)',(username,harvestableTemplateId,lastHarvest,containerName,areaId))
|
||||
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue