- Fixed duplicated wormhole jump logs, fixed #822

This commit is contained in:
Mark Friedrich
2019-07-23 20:01:15 +02:00
parent 01a39ec251
commit 9da2a787ed
2 changed files with 18 additions and 2 deletions

View File

@@ -942,14 +942,29 @@ class Map extends Controller\AccessController {
if(
( $mapScope = $map->getScope() ) &&
( $mapScope->name != 'none' ) && // tracking is disabled for map
( $targetLog = $character->getLog() )
( $targetLog = $character->getLog() ) &&
( $user = $character->getUser() )
){
$targetLog->virtual('tmpStamp', (int)strtotime($targetLog->updated));
// character is currently in a system
$targetSystemId = (int)$targetLog->systemId;
// get 'character log' from source system. If not log found -> assume $sourceLog == $targetLog
$sourceLog = $character->getLogPrevSystem($targetSystemId) ? : $targetLog;
$sourceSystemId = (int)$sourceLog->systemId;
$sourceSystemId = 0;
if(
!empty($sessionCharacter = $user->getSessionCharacterData($character->_id)) &&
$sessionCharacter['ID'] === $character->_id &&
$sourceLog->tmpStamp > (int)$sessionCharacter['TMP_STAMP']
){
$sourceSystemId = (int)$sourceLog->systemId;
$sessionCharacter['TMP_STAMP'] = $sourceLog->tmpStamp;
$sessionCharacters = Pathfinder\CharacterModel::mergeSessionCharacterData([$sessionCharacter]);
$this->getF3()->set(User::SESSION_KEY_CHARACTERS, $sessionCharacters);
}
if($sourceSystemId){
$sourceSystem = null;

View File

@@ -1163,6 +1163,7 @@ class CharacterModel extends AbstractPathfinderModel {
*/
$characterLog = $this->rel('characterLog');
$characterLog->setData($historyEntry['log']);
$characterLog->virtual('tmpStamp', (int)$historyEntry['stamp']);
}
return $characterLog;