@@ -128,14 +128,14 @@ package
128128 clientDimentionSo = CustomSharedObject. getLocal ("clientData" );
129129 osId = Capabilities . os . substr (0 ,3 );
130130 sizeInitialised = false ;
131- if (! (clientDimentionSo. data == null ) && clientDimentionSo. data . width > 0 && clientDimentionSo. data . height > 0 )
131+ if (( ! (clientDimentionSo. data == null )) && ( clientDimentionSo. data . width > 0 ) && ( clientDimentionSo. data . height > 0 ) )
132132 {
133- if (clientDimentionSo. data . displayState == NativeWindowDisplayState. MAXIMIZED && osId == "Win" && ! (stage . displayState == StageDisplayState [ "FULL_SCREEN_INTERACTIVE" ] ))
133+ if (( clientDimentionSo. data . displayState == NativeWindowDisplayState. MAXIMIZED ) && ( osId == "Win" ) && ( ! (stage . displayState == StageDisplayState [ "FULL_SCREEN_INTERACTIVE" ] ) ))
134134 {
135135 stage . nativeWindow . maximize ();
136136 this . _displayState = NativeWindowDisplayState. MAXIMIZED ;
137137 }
138- if (clientDimentionSo. data . width > 0 && clientDimentionSo. data . height > 0 )
138+ if (( clientDimentionSo. data . width > 0 ) && ( clientDimentionSo. data . height > 0 ) )
139139 {
140140 mainWindow. width = clientDimentionSo. data . width ;
141141 mainWindow. height = clientDimentionSo. data . height ;
@@ -197,6 +197,7 @@ package
197197 }
198198 catch (e: Error )
199199 {
200+ trace ("Erreur sur la gestion du multicompte :\n " + e. getStackTrace ());
200201 }
201202 }
202203 if (AirScanner. hasAir())
@@ -243,7 +244,7 @@ package
243244
244245 public var REG_LOCAL_CONNECTION_ID : uint = 0 ;
245246
246- private function onCall (param1 :InvokeEvent ) : void {
247+ private function onCall (e :InvokeEvent ) : void {
247248 var file : File = null ;
248249 var stream: FileStream = null ;
249250 var content : String = null ;
@@ -254,7 +255,6 @@ package
254255 var versionSplitted: Array = null ;
255256 var version : String = null ;
256257 var part: ContentPart = null ;
257- var e: InvokeEvent = param1;
258258 if (! this . _initialized )
259259 {
260260 CommandLineArguments. getInstance (). setArguments(e. arguments );
@@ -279,7 +279,7 @@ package
279279 part. id = configNode. attributes [ "name" ];
280280 part. state = version ? PartStateEnum. PART_UP_TO_DATE : PartStateEnum. PART_NOT_INSTALLED ;
281281 PartManager. getInstance (). updatePart(part);
282- if ((version ) && (upperVersion == null ) || version > upperVersion)
282+ if ((version ) && (upperVersion == null ) || ( version > upperVersion) )
283283 {
284284 upperVersion = version ;
285285 }
@@ -333,9 +333,11 @@ package
333333 }
334334 catch (e: Error )
335335 {
336+ trace (e. toString ());
336337 BuildInfos. BUILD_VERSION . revision = BuildInfos. BUILD_REVISION ;
337338 BuildInfos. BUILD_VERSION . patch = BuildInfos. BUILD_PATCH ;
338339 }
340+ trace ("Version : " + BuildInfos. BUILD_VERSION . major + "." + BuildInfos. BUILD_VERSION . minor + "." + BuildInfos. BUILD_VERSION . release + "." + BuildInfos. BUILD_REVISION + "." + BuildInfos. BUILD_PATCH );
339341 if (BuildInfos. BUILD_TYPE < BuildTypeEnum. INTERNAL )
340342 {
341343 Uri. enableSecureURI();
@@ -367,7 +369,7 @@ package
367369 }
368370 }
369371
370- private function onResize (param1 :NativeWindowBoundsEvent ) : void {
372+ private function onResize (e :NativeWindowBoundsEvent ) : void {
371373 this . _displayState = stage . nativeWindow . displayState ;
372374 if (this . _displayState != NativeWindowDisplayState. MAXIMIZED )
373375 {
@@ -396,37 +398,37 @@ package
396398 return this . _forcedLang ;
397399 }
398400
399- public function setDisplayOptions (param1 :DofusOptions ) : void {
400- this . _doOptions = param1 ;
401+ public function setDisplayOptions (opt :DofusOptions ) : void {
402+ this . _doOptions = opt ;
401403 this . _doOptions . addEventListener (PropertyChangeEvent . PROPERTY_CHANGED ,this . onOptionChange);
402404 this . _doOptions . flashQuality = this . _doOptions . flashQuality;
403405 this . _doOptions . fullScreen = this . _doOptions . fullScreen ;
404406 }
405407
406- public function init (param1 :DisplayObject , param2 :uint = 0 , param3 :String = null , param4 :Array = null ) : void {
407- if (param4 )
408+ public function init (rootClip :DisplayObject , instanceId :uint = 0 , forcedLang :String = null , args :Array = null ) : void {
409+ if (args )
408410 {
409- CommandLineArguments. getInstance (). setArguments(param4 );
411+ CommandLineArguments. getInstance (). setArguments(args );
410412 }
411- this . _instanceId = param2 ;
412- this . _forcedLang = param3 ;
413- var _loc5_ : Sprite = new Sprite ();
414- _loc5_ . name = "catchMouseEventCtr" ;
415- _loc5_ . graphics . beginFill (0 );
416- _loc5_ . graphics . drawRect (0 ,0 ,StageShareManager. startWidth,StageShareManager. startHeight);
417- _loc5_ . graphics . endFill ();
418- addChild (_loc5_ );
419- var _loc6_ : CustomSharedObject = CustomSharedObject. getLocal ("appVersion" );
420- if (! _loc6_ . data . lastBuildVersion || ! ( _loc6_ . data . lastBuildVersion == BuildInfos. BUILD_REVISION ) && BuildInfos. BUILD_TYPE < BuildTypeEnum. INTERNAL )
413+ this . _instanceId = instanceId ;
414+ this . _forcedLang = forcedLang ;
415+ var catchMouseEventCtr : Sprite = new Sprite ();
416+ catchMouseEventCtr . name = "catchMouseEventCtr" ;
417+ catchMouseEventCtr . graphics . beginFill (0 );
418+ catchMouseEventCtr . graphics . drawRect (0 ,0 ,StageShareManager. startWidth,StageShareManager. startHeight);
419+ catchMouseEventCtr . graphics . endFill ();
420+ addChild (catchMouseEventCtr );
421+ var so : CustomSharedObject = CustomSharedObject. getLocal ("appVersion" );
422+ if (( ! so . data . lastBuildVersion) || ( ! (so . data . lastBuildVersion == BuildInfos. BUILD_REVISION )) && ( BuildInfos. BUILD_TYPE < BuildTypeEnum. INTERNAL ) )
421423 {
422424 this . clearCache(true );
423425 }
424- _loc6_ = CustomSharedObject. getLocal ("appVersion" );
425- _loc6_ . data . lastBuildVersion = BuildInfos. BUILD_REVISION ;
426- _loc6_ . flush ();
427- _loc6_ . close ();
426+ so = CustomSharedObject. getLocal ("appVersion" );
427+ so . data . lastBuildVersion = BuildInfos. BUILD_REVISION ;
428+ so . flush ();
429+ so . close ();
428430 SignedFileAdapter. defaultSignatureKey = SignatureKey. fromByte(new Constants. SIGNATURE_KEY_DATA () as ByteArray );
429- this . initKernel(this . stage ,param1 );
431+ this . initKernel(this . stage ,rootClip );
430432 this . initWorld();
431433 this . initUi();
432434 if (BuildInfos. BUILD_TYPE > BuildTypeEnum. ALPHA )
@@ -443,18 +445,18 @@ package
443445 Atouin. getInstance (). addListener(SoundManager. getInstance (). manager);
444446 }
445447
446- private function onExiting (param1 :Event ) : void {
448+ private function onExiting (pEvt :Event ) : void {
447449 this . saveClientSize();
448450 if (WebServiceDataHandler. getInstance (). quit())
449451 {
450- param1 . preventDefault ();
451- param1 . stopPropagation ();
452+ pEvt . preventDefault ();
453+ pEvt . stopPropagation ();
452454 WebServiceDataHandler. getInstance (). addEventListener (WebServiceDataHandler. ALL_DATA_SENT ,this . quitHandler);
453455 }
454456 }
455457
456- public function quit (param1 :int = 0 ) : void {
457- this . _returnCode = param1 ;
458+ public function quit (returnCode :int = 0 ) : void {
459+ this . _returnCode = returnCode ;
458460 if (! WebServiceDataHandler. getInstance (). quit())
459461 {
460462 this . quitHandler();
@@ -467,10 +469,10 @@ package
467469 }
468470 }
469471
470- private function quitHandler (param1 :Event = null ) : void {
471- if (param1 != null )
472+ private function quitHandler (pEvt :Event = null ) : void {
473+ if (pEvt != null )
472474 {
473- param1 . currentTarget . removeEventListener (WebServiceDataHandler. ALL_DATA_SENT ,this . quitHandler);
475+ pEvt . currentTarget . removeEventListener (WebServiceDataHandler. ALL_DATA_SENT ,this . quitHandler);
474476 _log . trace ("Data sent. Good to go. Bye bye" );
475477 }
476478 if (Constants. EVENT_MODE )
@@ -495,12 +497,10 @@ package
495497 InterClientManager. destroy();
496498 }
497499
498- public function clearCache (param1 :Boolean = false , param2 :Boolean = false ) : void {
500+ public function clearCache (selective :Boolean = false , reboot :Boolean = false ) : void {
499501 var soList: Array = null ;
500502 var file : File = null ;
501503 var fileName: String = null ;
502- var selective: Boolean = param1;
503- var reboot: Boolean = param2;
504504 StoreDataManager. getInstance (). reset ();
505505 var soFolder: File = new File(CustomSharedObject. getCustomSharedObjectDirectory());
506506 if ((soFolder) && (soFolder. exists))
@@ -545,23 +545,25 @@ package
545545 }
546546 catch (e: Error )
547547 {
548+ trace ("ClearCache method cannot delete " + file . nativePath);
548549 continue ;
549550 }
550551 }
551552 }
552553 if (reboot)
553554 {
554555 AppIdModifier. getInstance (). invalideCache();
556+ trace ("REBOOT" );
555557 this . reboot();
556558 }
557559 }
558560
559561 public function reboot () : void {
560562 this . saveClientSize();
561- var _loc1_ : Worker = Kernel. getWorker();
562- if (_loc1_ )
563+ var w : Worker = Kernel. getWorker();
564+ if (w )
563565 {
564- _loc1_ . clear ();
566+ w . clear ();
565567 }
566568 _log . fatal ("REBOOT" );
567569 if (AirScanner. hasAir())
@@ -572,15 +574,15 @@ package
572574 throw new Error ("Reboot not implemented with flash" );
573575 }
574576
575- public function renameApp (param1 :String ) : void {
577+ public function renameApp (name :String ) : void {
576578 if (AirScanner. hasAir())
577579 {
578- stage [ "nativeWindow" ] . title = param1 ;
580+ stage [ "nativeWindow" ] . title = name ;
579581 }
580582 }
581583
582- private function initKernel (param1 :Stage , param2 :DisplayObject ) : void {
583- Kernel. getInstance (). init (param1,param2 );
584+ private function initKernel (stage :Stage , rootClip :DisplayObject ) : void {
585+ Kernel. getInstance (). init (stage ,rootClip );
584586 LangManager. getInstance (). handler = Kernel. getWorker();
585587 FontManager. getInstance (). handler = Kernel. getWorker();
586588 Berilia. getInstance (). handler = Kernel. getWorker();
@@ -605,16 +607,16 @@ package
605607 this . _uiContainer = new Sprite ();
606608 addChild (this . _uiContainer );
607609 this . _uiContainer . mouseEnabled = false ;
608- var _loc1_ :* = BuildInfos. BUILD_TYPE == BuildTypeEnum. DEBUG ;
609- Berilia. getInstance (). verboseException = _loc1_ ;
610- Berilia. getInstance (). init (this . _uiContainer ,_loc1_ ,BuildInfos. BUILD_REVISION ,! _loc1_ );
610+ var isDebugMode : Boolean = BuildInfos. BUILD_TYPE == BuildTypeEnum. DEBUG ;
611+ Berilia. getInstance (). verboseException = isDebugMode ;
612+ Berilia. getInstance (). init (this . _uiContainer ,isDebugMode ,BuildInfos. BUILD_REVISION ,! isDebugMode );
611613 if (AirScanner. isStreamingVersion())
612614 {
613615 Berilia. embedIcons. SLOT_DEFAULT_ICON = EmbedAssets. getBitmap("DefaultBeriliaSlotIcon" ,true ). bitmapData ;
614616 }
615- var _loc2_ : Uri = new Uri("SharedDefinitions.swf" );
616- _loc2_ . loaderContext = new LoaderContext (false ,new ApplicationDomain ());
617- UiModuleManager. getInstance (BuildInfos. BUILD_TYPE == BuildTypeEnum. RELEASE ). sharedDefinitionContainer = _loc2_ ;
617+ var sharedDefUri : Uri = new Uri("SharedDefinitions.swf" );
618+ sharedDefUri . loaderContext = new LoaderContext (false ,new ApplicationDomain ());
619+ UiModuleManager. getInstance (BuildInfos. BUILD_TYPE == BuildTypeEnum. RELEASE ). sharedDefinitionContainer = sharedDefUri ;
618620 EntityDisplayer. setAnimationModifier(1 ,new CustomAnimStatiqueAnimationModifier());
619621 EntityDisplayer. setAnimationModifier(2 ,new CustomAnimStatiqueAnimationModifier());
620622 EntityDisplayer. setSkinModifier(1 ,new BreedSkinModifier());
@@ -654,56 +656,56 @@ package
654656 this . _fpsDisplay . visible = ! this . _fpsDisplay . visible ;
655657 }
656658
657- private function onClosed (param1 :Event ) : void {
659+ private function onClosed (e :Event ) : void {
658660 Console. getInstance (). close ();
659661 ConsoleLUA. getInstance (). close ();
660662 HttpServer. getInstance (). close ();
661663 }
662664
663- private function onOptionChange (param1 :PropertyChangeEvent ) : void {
664- if (param1 . propertyName == "flashQuality" )
665+ private function onOptionChange (e :PropertyChangeEvent ) : void {
666+ if (e . propertyName == "flashQuality" )
665667 {
666- if (param1 . propertyValue == 0 )
668+ if (e . propertyValue == 0 )
667669 {
668670 StageShareManager. stage . quality = StageQuality . LOW ;
669671 }
670672 else
671673 {
672- if (param1 . propertyValue == 1 )
674+ if (e . propertyValue == 1 )
673675 {
674676 StageShareManager. stage . quality = StageQuality . MEDIUM ;
675677 }
676678 else
677679 {
678- if (param1 . propertyValue == 2 )
680+ if (e . propertyValue == 2 )
679681 {
680682 StageShareManager. stage . quality = StageQuality . HIGH ;
681683 }
682684 }
683685 }
684686 }
685- if (param1 . propertyName == "fullScreen" )
687+ if (e . propertyName == "fullScreen" )
686688 {
687- StageShareManager. setFullScreen(param1 . propertyValue,false );
689+ StageShareManager. setFullScreen(e . propertyValue,false );
688690 }
689691 }
690692
691- public function onFps (param1 :uint ) : void {
692- var _loc2_ : Object = null ;
693+ public function onFps (fps :uint ) : void {
694+ var framesInfo : Object = null ;
693695 if (this . _fpsDisplay . visible )
694696 {
695- _loc2_ = RasterizedAnimation. countFrames();
696- this . _fpsDisplay . htmlText = "<font color=\' #FFFFFF\' >" + param1 + " fps - " + this . _buildType + "\n <font color=\' #B9B6ED\' >" + Memory. humanReadableUsage() + " - r" + BuildInfos. BUILD_REVISION + "\n <font color=\' #92D5D8\' > Anim/Img en cache - " + _loc2_ . animations + "/" + _loc2_ . frames;
697+ framesInfo = RasterizedAnimation. countFrames();
698+ this . _fpsDisplay . htmlText = "<font color=\' #FFFFFF\' >" + fps + " fps - " + this . _buildType + "\n <font color=\' #B9B6ED\' >" + Memory. humanReadableUsage() + " - r" + BuildInfos. BUILD_REVISION + "\n <font color=\' #92D5D8\' > Anim/Img en cache - " + framesInfo . animations + "/" + framesInfo . frames;
697699 }
698700 }
699701
700702 private function saveClientSize () : void {
701- var _loc1_ : CustomSharedObject = CustomSharedObject. getLocal ("clientData" );
702- _loc1_ . data . height = this . _stageHeight ;
703- _loc1_ . data . width = this . _stageWidth ;
704- _loc1_ . data . displayState = this . _displayState ;
705- _loc1_ . flush ();
706- _loc1_ . close ();
703+ var clientDimentionSo : CustomSharedObject = CustomSharedObject. getLocal ("clientData" );
704+ clientDimentionSo . data . height = this . _stageHeight ;
705+ clientDimentionSo . data . width = this . _stageWidth ;
706+ clientDimentionSo . data . displayState = this . _displayState ;
707+ clientDimentionSo . flush ();
708+ clientDimentionSo . close ();
707709 }
708710
709711 public var strProgress: Number = 0 ;
0 commit comments