Advertisement
Guest User

gfdgsdgfsd

a guest
Dec 28th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Action script...
  2.  
  3. // [Initial MovieClip Action of sprite 20502]
  4. #initclip 23
  5. if (!dofus.datacenter.ServerInformations)
  6. {
  7.     if (!dofus)
  8.     {
  9.         _global.dofus = new Object();
  10.     } // end if
  11.     if (!dofus.datacenter)
  12.     {
  13.         _global.dofus.datacenter = new Object();
  14.     } // end if
  15.     var _loc1 = (_global.dofus.datacenter.ServerInformations = function ()
  16.     {
  17.         super();
  18.         this.initialize();
  19.     }).prototype;
  20.     _loc1.__get__problems = function ()
  21.     {
  22.         return (this._pProblems);
  23.     };
  24.     _loc1.__get__isOnFocus = function ()
  25.     {
  26.         return (this._bOnFocus);
  27.     };
  28.     _loc1.load = function ()
  29.     {
  30.         var _loc2 = this.api.lang.getConfigText("PROBLEMS_LINK");
  31.         var _loc3 = new ank.utils.XMLLoader();
  32.         _loc3.addEventListener("onXMLLoadComplete", this);
  33.         _loc3.addEventListener("onXMLLoadError", this);
  34.         _loc3.loadXML(_loc2);
  35.         this.dispatchEvent({type: "onLoadStarted"});
  36.     };
  37.     _loc1.initialize = function ()
  38.     {
  39.         this.api = _global.API;
  40.         mx.events.EventDispatcher.initialize(this);
  41.     };
  42.     _loc1.parseXml = function (xml)
  43.     {
  44.         this._pProblems = new Array();
  45.         var _loc3 = xml.firstChild;
  46.         var _loc4 = 0;
  47.        
  48.         while (++_loc4, _loc4 < _loc3.childNodes.length)
  49.         {
  50.             var _loc5 = _loc3.childNodes[_loc4];
  51.             var _loc6 = Number(_loc5.attributes.id);
  52.             var _loc7 = Number(_loc5.attributes.date);
  53.             var _loc8 = Number(_loc5.attributes.type);
  54.             var _loc9 = Number(_loc5.attributes.state);
  55.             var _loc10 = _loc5.attributes.visible == "true";
  56.             this._bOnFocus = this._bOnFocus || _loc10;
  57.             var _loc11 = _loc5.childNodes[0];
  58.             var _loc12 = new Array();
  59.             if (_loc11.attributes.cnx == "true")
  60.             {
  61.                 _loc12.push(this.api.lang.getText("CONNECTION_SERVER"));
  62.             } // end if
  63.             if (_loc11.attributes.all == "true")
  64.             {
  65.                 _loc12.push(this.api.lang.getText("EVERY_SERVERS"));
  66.             }
  67.             else
  68.             {
  69.                 var _loc13 = 0;
  70.                
  71.                 while (++_loc13, _loc13 < _loc11.childNodes.length)
  72.                 {
  73.                     _loc12.push(_loc11.childNodes[_loc13].attributes.name);
  74.                 } // end while
  75.             } // end else if
  76.             var _loc14 = _loc5.childNodes[1];
  77.             var _loc15 = new Array();
  78.             var _loc16 = 0;
  79.            
  80.             while (++_loc16, _loc16 < _loc14.childNodes.length)
  81.             {
  82.                 var _loc17 = _loc14.childNodes[_loc16];
  83.                 var _loc18 = Number(_loc17.attributes.timestamp);
  84.                 var _loc19 = Number(_loc17.attributes.id);
  85.                 var _loc20 = _loc17.attributes.translated == "true";
  86.                 var _loc21 = _loc17.firstChild.nodeValue;
  87.                 var _loc22 = new dofus.datacenter.ServerProblemEvent(_loc18, _loc19, _loc20, _loc21);
  88.                 _loc15.push(_loc22);
  89.             } // end while
  90.             var _loc23 = new dofus.datacenter.ServerProblem(_loc6, _loc7, _loc8, _loc9, _loc12, _loc15);
  91.             this._pProblems.push(_loc23);
  92.         } // end while
  93.         this.dispatchEvent({type: "onData"});
  94.     };
  95.     _loc1.onXMLLoadComplete = function (oEvent)
  96.     {
  97.         var _loc3 = oEvent.value;
  98.         this.parseXml(_loc3);
  99.     };
  100.     _loc1.onXMLLoadError = function ()
  101.     {
  102.         this.dispatchEvent({type: "onLoadError"});
  103.     };
  104.     _loc1.addProperty("isOnFocus", _loc1.__get__isOnFocus, function ()
  105.     {
  106.     });
  107.     _loc1.addProperty("problems", _loc1.__get__problems, function ()
  108.     {
  109.     });
  110.     ASSetPropFlags(_loc1, null, 1);
  111. } // end if
  112. #endinitclip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement