@LabelIndex 421373
@StringIndex 63767
class 1 ice_fairy_sirr_maker : Close_Door_maker {
handler:
	EventHandler ON_START(i0,def0) {
		myself.i_ai0 = 0;
		super;
	}

	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1,maker0) {
		if( script_event_arg1 == 10005 ) {
			myself.i_ai0 = ( myself.i_ai0 + 1 );
			def0 = myself::GetSpawnDefine(0);
			def0::SendScriptEvent(10001,myself.i_ai0,0);
		}
		if( script_event_arg1 == 11040 ) {
			def0 = myself::GetSpawnDefine(0);
			def0::SendScriptEvent(11040,script_event_arg2,0);
		}
	}

	EventHandler ON_DOOR_EVENT(enabled,i0,i1,def0,maker0) {
		if( enabled == 0 ) {
			if( myself.enabled ) {
				return;
			}
			myself.enabled = 1;
			for(i0 = 0; i0 < myself.def_count; i0++) {
				def0 = myself::GetSpawnDefine(i0);
				if( gg::IsNull(def0) == 0 ) {
					if( myself::AtomicIncreaseTotal(def0,def0.total,1) ) {
						def0::Spawn2(def0.total,0,0);
						maker0 = gg::GetNpcMaker("schuttgart13_npc2314_1m1");
						if( gg::IsNull(maker0) == 0 ) {
							gg::SendMakerScriptEvent(maker0,11037,0,0);
						}
					}
				}
			}
		} else if( myself.enabled == 0 ) {
			return;
		}
		myself.enabled = 0;
		for(i1 = 0; i1 < myself.def_count; i1++) {
			def0 = myself::GetSpawnDefine(i1);
			if( gg::IsNull(def0) == 0 ) {
				def0::Despawn();
			}
		}
	}

	EventHandler ON_NPC_DELETED(deleted_def,i0,i1,maker0,reply) {
		myself.i_ai0 = 0;
		super;
	}

}
