Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- if (nCellNum > this.getCellCount())
- {
- ank.utils.Logger.err("[updateCell] Cellule " + nCellNum + " inexistante");
- return;
- } // end if
- var _loc7 = this._oDatacenter.Map;
- var _loc2 = _loc7.data[nCellNum];
- if (!_loc2.active)
- {
- return;
- } // end if
- if (!bOrig)
- {
- var _loc5 = _loc7.originalsCellsBackup.getItemAt(String(nCellNum));
- if (_loc5 == undefined)
- {
- ank.utils.Logger.err("La case est déjà dans son état init");
- return;
- } // end if
- _loc2.layerGroundNum = _loc5.layerGroundNum;
- if (_loc2.layerObject2Num != 25)
- {
- _loc2.layerObject2Num = _loc5.layerObject2Num;
- } // end if
- _loc2.layerObject1Num = _loc5.layerObject1Num;
- }
- else
- {
- if (_loc2.nPermanentLevel == 0)
- {
- var _loc3 = new ank.battlefield.datacenter.Cell();
- for (var _loc6 in _loc2)
- {
- _loc3[_loc6] = _loc2[_loc6];
- } // end of for...in
- this._oDatacenter.Map.originalsCellsBackup.addItemAt(nCellNum, _loc3);
- _loc2.nPermanentLevel = 1;
- } // end if
- _loc2.layerGroundNum = 0;
- if (_loc2.layerObject2Num != 25)
- {
- _loc2.layerObject2Num = 0;
- } // end if
- if (!_loc2.lineOfSight)
- {
- _loc2.layerObject1Num = 10000;
- }
- else if (_loc2.movement == 0 || _loc2.movement == 1)
- {
- _loc2.layerObject1Num = 10002;
- }
- else
- {
- _loc2.layerObject1Num = 10001;
- } // end else if
- } // end else if
- this.build(this._oDatacenter.Map, nCellNum);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement