Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function NTSI_findItemGID(GID){
- if (!gid) {
- return false;
- }
- 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;
- }
- }
- }
- if (_itemunit.mode === 3 || _itemunit.mode === 5) {
- return _itemunit;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement