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