forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Fri Oct 20, 2017 11:33 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Apr 22, 2012 7:53 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
If a player takes a SC in an autumn-turn and I reprocess the game the owner of the territory is not changed back. I need to adjust this using PHPMyAdmin.

Oliver


Top
 Profile  
 
PostPosted: Mon Apr 23, 2012 12:26 pm 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Thanks for letting me know about that, not sure offhand why that would be but I'll take a look


Top
 Profile  
 
PostPosted: Mon Apr 23, 2012 12:59 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
If you turn back the turn from the Build-phase to the diplomacy-phase the TerrstatusArchive has already stored the new ID from the current turn.
It should use the CountryID from the turn bevore.


Top
 Profile  
 
PostPosted: Sun Apr 29, 2012 10:52 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Quickfix:
in AdminActionsRestricted, line 526:
Code:
         // - Move the old TerrStatusArchive back to TerrStatus
         $DB->sql_put("INSERT INTO wD_TerrStatus ( terrID, standoff, gameID, countryID, occupyingUnitID )
                  SELECT t.terrID, t.standoff, t.gameID, t2.countryID, u.id
                  FROM wD_TerrStatusArchive t
                     LEFT JOIN wD_Units u
                     ON ( ".$Game->Variant->deCoastCompare('t.terrID','u.terrID')." AND u.gameID = t.gameID )
                     LEFT JOIN wD_TerrStatusArchive t2
                     ON ( t2.gameID = t.gameID AND t2.terrID = t.terrID AND t2.turn = ".( ( $lastTurn == 0 ) ? 0 : $lastTurn-1 ).")
                  WHERE t.gameID = ".$Game->id." AND t.turn = ".$lastTurn);


Top
 Profile  
 
PostPosted: Sun Apr 29, 2012 11:11 pm 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Nicely done sleepcap, I'll integrate this change into the next version


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group