@LabelIndex 422810
@StringIndex 0
class 1 c_tower_switch_maker : default_maker {
handler:
	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,def0,i0,i1) {
		switch(script_event_arg1) {
			case 1000: {
				for(i0 = 0; i0 < myself.def_count; i0++) {
					def0 = myself::GetSpawnDefine(i0);
					if( gg::IsNull(def0) == 0 ) {
						def0::Despawn();
					}
				}
				break;
			}
			case 1001: {
				for(i0 = 0; i0 < myself.def_count; i0++) {
					def0 = myself::GetSpawnDefine(i0);
					if( gg::IsNull(def0) == 0 ) {
						i1 = ( def0.total - def0.npc_count );
						if( i1 > 0 ) {
							if( myself::AtomicIncreaseTotal(def0,i1,1) ) {
								def0::Spawn2(i1,script_event_arg2,0);
							}
						}
					}
				}
				break;
			}
			case 88013: {
				def0 = myself::GetSpawnDefine(0);
				if( gg::IsNull(def0) == 0 ) {
					def0::SendScriptEvent(88013,0,0);
				}
				break;
			}
		}
	}

}
