Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function NTSI_findItemGID(GID){
- var _itemunit = getUnit(4,-1,-1,GID);
- if (!_itemunit) { //retry to find item
- var _itemfound = false;
- _itemunit = getUnit(4);
- if(_itemunit){
- do{
- if(_itemunit.gid == GID && (_itemunit.mode == 3 || _itemunit.mode == 5)){
- _itemfound = true;
- _itemunit = copyUnit(_itemunit);
- break;
- }
- } while(_itemunit.getNext());
- if (!_itemfound){
- //Dprint("finding failed "+GID);
- return false;
- }
- }
- }
- return _itemunit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement