Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     if (nCellNum > this.getCellCount())
  3.     {
  4.         ank.utils.Logger.err("[updateCell] Cellule " + nCellNum + " inexistante");
  5.         return;
  6.     } // end if
  7.     var _loc7 = this._oDatacenter.Map;
  8.     var _loc2 = _loc7.data[nCellNum];
  9.     if (!_loc2.active)
  10.     {
  11.         return;
  12.     } // end if
  13.     if (!bOrig)
  14.     {
  15.         var _loc5 = _loc7.originalsCellsBackup.getItemAt(String(nCellNum));
  16.         if (_loc5 == undefined)
  17.         {
  18.             ank.utils.Logger.err("La case est déjà dans son état init");
  19.             return;
  20.         } // end if
  21.         _loc2.layerGroundNum = _loc5.layerGroundNum;
  22.         if (_loc2.layerObject2Num != 25)
  23.         {
  24.             _loc2.layerObject2Num = _loc5.layerObject2Num;
  25.         } // end if
  26.         _loc2.layerObject1Num = _loc5.layerObject1Num;
  27.     }
  28.     else
  29.     {
  30.         if (_loc2.nPermanentLevel == 0)
  31.         {
  32.             var _loc3 = new ank.battlefield.datacenter.Cell();
  33.             for (var _loc6 in _loc2)
  34.             {
  35.                 _loc3[_loc6] = _loc2[_loc6];
  36.             } // end of for...in
  37.             this._oDatacenter.Map.originalsCellsBackup.addItemAt(nCellNum, _loc3);
  38.             _loc2.nPermanentLevel = 1;
  39.         } // end if
  40.         _loc2.layerGroundNum = 0;
  41.         if (_loc2.layerObject2Num != 25)
  42.         {
  43.             _loc2.layerObject2Num = 0;
  44.         } // end if
  45.         if (!_loc2.lineOfSight)
  46.         {
  47.             _loc2.layerObject1Num = 10000;
  48.         }
  49.         else if (_loc2.movement == 0 || _loc2.movement == 1)
  50.         {
  51.             _loc2.layerObject1Num = 10002;
  52.         }
  53.         else
  54.         {
  55.             _loc2.layerObject1Num = 10001;
  56.         } // end else if
  57.     } // end else if
  58.     this.build(this._oDatacenter.Map, nCellNum);
  59. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement